welco/welco/urls.py

42 lines
1.6 KiB
Python
Raw Normal View History

2015-07-02 16:16:57 +02:00
# welco - multichannel request processing
# Copyright (C) 2015 Entr'ouvert
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
2015-07-02 10:46:33 +02:00
from django.conf.urls import patterns, include, url
2015-07-03 10:54:57 +02:00
from django.conf import settings
2015-07-08 10:43:00 +02:00
from django.contrib import admin
2015-07-02 10:46:33 +02:00
2015-07-03 11:03:25 +02:00
from . import apps
2015-07-02 16:16:57 +02:00
urlpatterns = patterns('',
url(r'^$', 'welco.views.home', name='home'),
url(r'^ajax/qualification$', 'welco.views.qualification', name='qualification'),
2015-07-08 10:43:00 +02:00
url(r'^admin/', include(admin.site.urls)),
url(r'^logout/$', 'welco.views.logout', name='auth_logout'),
url(r'^login/$', 'welco.views.login', name='auth_login'),
2015-07-02 10:46:33 +02:00
)
2015-07-03 10:54:57 +02:00
if 'mellon' in settings.INSTALLED_APPS:
urlpatterns += patterns('', url(r'^accounts/mellon/', include('mellon.urls')))
2015-07-03 10:54:57 +02:00
# static and media files
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns += staticfiles_urlpatterns()
from django.conf.urls.static import static
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
2015-07-03 11:03:25 +02:00
urlpatterns = apps.register_urls(urlpatterns)