kpsul/gestioCOF/urls.py
Martin Pépin 8b905f66dc Remove dependencies of an old version of dal
Django-autocomplete-light does not support the `modelform_factory`
anymore in recent versions. We are actually using an old version of dal
because of this.

This had to be dropped at some point… So now is a good time
2017-02-23 01:57:50 +01:00

80 lines
2.9 KiB
Python

# -*- coding: utf-8 -*-
"""
Fichier principal de configuration des urls du projet GestioCOF
"""
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth import views as django_views
from cof import views as cof_views
from cof.urls import export_patterns, petitcours_patterns, \
surveys_patterns, events_patterns, calendar_patterns, \
clubs_patterns
from cof.autocomplete import autocomplete
from gestion import views as gestion_views
admin.autodiscover()
urlpatterns = [
# Page d'accueil
url(r'^$', cof_views.home, name='home'),
# The common views
url(r"^", include("gestion.urls", namespace='gestion')),
# Admin urls
url(r'^admin/logout/', gestion_views.logout),
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
# Le BdA
url(r'^bda/', include('bda.urls')),
# Les exports
url(r'^export/', include(export_patterns)),
# Les petits cours
url(r'^petitcours/', include(petitcours_patterns)),
# Les sondages
url(r'^survey/', include(surveys_patterns)),
# Evenements
url(r'^event/', include(events_patterns)),
# Calendrier
url(r'^calendar/', include(calendar_patterns)),
# Clubs
url(r'^clubs/', include(clubs_patterns)),
# Infos persos
url(r'^outsider/password-change$', django_views.password_change),
url(r'^outsider/password-change-done$',
django_views.password_change_done,
name='password_change_done'),
# Inscription d'un nouveau membre
url(r'^registration$', cof_views.registration),
url(r'^registration/clipper/(?P<login_clipper>[\w-]+)$',
cof_views.registration_form2, name="clipper-registration"),
url(r'^registration/user/(?P<username>.+)$',
cof_views.registration_form2, name="user-registration"),
url(r'^registration/empty$', cof_views.registration_form2,
name="empty-registration"),
# Autocompletion
url(r'^autocomplete/registration$', autocomplete),
url(r'^autocomplete/', include('autocomplete_light.urls')),
# Liens utiles du COF et du BdA
url(r'^utile_cof$', cof_views.utile_cof),
url(r'^utile_bda$', cof_views.utile_bda),
url(r'^utile_bda/bda_diff$', cof_views.liste_bdadiff),
url(r'^utile_cof/diff_cof$', cof_views.liste_diffcof),
url(r'^utile_bda/bda_revente$', cof_views.liste_bdarevente),
url(r'^k-fet/', include('kfet.urls')),
]
if 'debug_toolbar' in settings.INSTALLED_APPS:
import debug_toolbar
urlpatterns += [
url(r'^__debug__/', include(debug_toolbar.urls)),
]
# Si on est en production, MEDIA_ROOT est servi par Apache.
# Il faut dire à Django de servir MEDIA_ROOT lui-même en développement.
urlpatterns += static(settings.MEDIA_URL,
document_root=settings.MEDIA_ROOT)