diff --git a/bda/urls.py b/bda/urls.py index e3c5a9fb..8ec8f277 100644 --- a/bda/urls.py +++ b/bda/urls.py @@ -4,32 +4,32 @@ from __future__ import division from __future__ import print_function from __future__ import unicode_literals -from django.conf.urls import url, patterns +from django.conf.urls import url from bda.views import SpectacleListView +from bda import views -urlpatterns = patterns( - '', +urlpatterns = [ url(r'^inscription/(?P\d+)$', - 'bda.views.inscription', + views.inscription, name='bda-tirage-inscription'), url(r'^places/(?P\d+)$', - 'bda.views.places', + views.places, name="bda-places-attribuees"), url(r'^revente/(?P\d+)$', - 'bda.views.revente', + views.revente, name='bda-revente'), url(r'^etat-places/(?P\d+)$', - 'bda.views.etat_places', + views.etat_places, name='bda-etat-places'), - url(r'^tirage/(?P\d+)$', 'bda.views.tirage'), + url(r'^tirage/(?P\d+)$', views.tirage), url(r'^spectacles/(?P\d+)$', SpectacleListView.as_view(), name="bda-liste-spectacles"), url(r'^spectacles/(?P\d+)/(?P\d+)$', - "bda.views.spectacle", + views.spectacle, name="bda-spectacle"), url(r'^spectacles/unpaid/(?P\d+)$', - "bda.views.unpaid", + views.unpaid, name="bda-unpaid"), - url(r'^mails-rappel/(?P\d+)$', "bda.views.send_rappel"), -) + url(r'^mails-rappel/(?P\d+)$', views.send_rappel), +] diff --git a/cof/urls.py b/cof/urls.py index 79177170..5a4a49dc 100644 --- a/cof/urls.py +++ b/cof/urls.py @@ -5,23 +5,27 @@ from __future__ import print_function from __future__ import unicode_literals from django.conf import settings -from django.conf.urls import patterns, include, url +from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic.base import TemplateView import autocomplete_light +from django.contrib.auth import views as django_views +from django_cas_ng import views as django_cas_views +from gestioncof import views as gestioncof_views, csv_views from gestioncof.urls import export_patterns, petitcours_patterns, \ surveys_patterns, events_patterns, calendar_patterns +from gestioncof.autocomplete import autocomplete + autocomplete_light.autodiscover() admin.autodiscover() -urlpatterns = patterns( - '', +urlpatterns = [ # Page d'accueil - url(r'^$', 'gestioncof.views.home', name='home'), + url(r'^$', gestioncof_views.home, name='home'), # Le BdA url(r'^bda/', include('bda.urls')), # Les exports @@ -37,47 +41,44 @@ urlpatterns = patterns( # Authentification url(r'^cof/denied$', TemplateView.as_view(template_name='cof-denied.html'), name="cof-denied"), - url(r'^cas/login$', 'django_cas_ng.views.login', name="cas_login_view"), - url(r'^cas/logout$', 'django_cas_ng.views.logout'), - url(r'^outsider/login$', 'gestioncof.views.login_ext'), - url(r'^outsider/logout$', 'django.contrib.auth.views.logout', - {'next_page': 'home'}), - url(r'^login$', 'gestioncof.views.login'), - url(r'^logout$', 'gestioncof.views.logout'), + url(r'^cas/login$', django_cas_views.login, name="cas_login_view"), + url(r'^cas/logout$', django_cas_views.logout), + url(r'^outsider/login$', gestioncof_views.login_ext), + url(r'^outsider/logout$', django_views.logout, {'next_page': 'home'}), + url(r'^login$', gestioncof_views.login), + url(r'^logout$', gestioncof_views.logout), # Infos persos - url(r'^profile$', 'gestioncof.views.profile'), - url(r'^outsider/password-change$', - 'django.contrib.auth.views.password_change'), + url(r'^profile$', gestioncof_views.profile), + url(r'^outsider/password-change$', django_views.password_change), url(r'^outsider/password-change-done$', - 'django.contrib.auth.views.password_change_done', + django_views.password_change_done, name='password_change_done'), # Inscription d'un nouveau membre - url(r'^registration$', 'gestioncof.views.registration'), + url(r'^registration$', gestioncof_views.registration), url(r'^registration/clipper/(?P[\w-]+)$', - 'gestioncof.views.registration_form2', name="clipper-registration"), + gestioncof_views.registration_form2, name="clipper-registration"), url(r'^registration/user/(?P.+)$', - 'gestioncof.views.registration_form2', name="user-registration"), - url(r'^registration/empty$', 'gestioncof.views.registration_form2', + gestioncof_views.registration_form2, name="user-registration"), + url(r'^registration/empty$', gestioncof_views.registration_form2, name="empty-registration"), # Autocompletion - url(r'^autocomplete/registration$', - 'gestioncof.autocomplete.autocomplete'), + url(r'^autocomplete/registration$', autocomplete), url(r'^autocomplete/', include('autocomplete_light.urls')), # Interface admin - url(r'^admin/logout/', 'gestioncof.views.logout'), + url(r'^admin/logout/', gestioncof_views.logout), url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/(?P[\d\w]+)/(?P[\d\w]+)/csv/', - 'gestioncof.csv_views.admin_list_export', + csv_views.admin_list_export, {'fields': ['username', ]}), url(r'^admin/', include(admin.site.urls)), url(r'^grappelli/', include('grappelli.urls')), # Liens utiles du COF et du BdA - url(r'^utile_cof$', 'gestioncof.views.utile_cof'), - url(r'^utile_bda$', 'gestioncof.views.utile_bda'), - url(r'^utile_bda/bda_diff$', 'gestioncof.views.liste_bdadiff'), - url(r'^utile_cof/diff_cof$', 'gestioncof.views.liste_diffcof'), - url(r'^utile_bda/bda_revente$', 'gestioncof.views.liste_bdarevente'), -) + \ + url(r'^utile_cof$', gestioncof_views.utile_cof), + url(r'^utile_bda$', gestioncof_views.utile_bda), + url(r'^utile_bda/bda_diff$', gestioncof_views.liste_bdadiff), + url(r'^utile_cof/diff_cof$', gestioncof_views.liste_diffcof), + url(r'^utile_bda/bda_revente$', gestioncof_views.liste_bdarevente), +] + \ (static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG else []) diff --git a/gestioncof/urls.py b/gestioncof/urls.py index bf4089db..89cd5aa8 100644 --- a/gestioncof/urls.py +++ b/gestioncof/urls.py @@ -6,44 +6,45 @@ from __future__ import unicode_literals from django.conf.urls import url from gestioncof.petits_cours_views import DemandeListView +from gestioncof import views, petits_cours_views export_patterns = [ - url(r'^members$', 'gestioncof.views.export_members'), - url(r'^mega/avecremarques$', 'gestioncof.views.export_mega_remarksonly'), - url(r'^mega/participants$', 'gestioncof.views.export_mega_participants'), - url(r'^mega/orgas$', 'gestioncof.views.export_mega_orgas'), - url(r'^mega/(?P.+)$', 'gestioncof.views.export_mega_bytype'), - url(r'^mega$', 'gestioncof.views.export_mega'), + url(r'^members$', views.export_members), + url(r'^mega/avecremarques$', views.export_mega_remarksonly), + url(r'^mega/participants$', views.export_mega_participants), + url(r'^mega/orgas$', views.export_mega_orgas), + url(r'^mega/(?P.+)$', views.export_mega_bytype), + url(r'^mega$', views.export_mega), ] petitcours_patterns = [ - url(r'^inscription$', 'gestioncof.petits_cours_views.inscription', + url(r'^inscription$', petits_cours_views.inscription, name='petits-cours-inscription'), - url(r'^demande$', 'gestioncof.petits_cours_views.demande', + url(r'^demande$', petits_cours_views.demande, name='petits-cours-demande'), - url(r'^demande-raw$', 'gestioncof.petits_cours_views.demande_raw', + url(r'^demande-raw$', petits_cours_views.demande_raw, name='petits-cours-demande-raw'), url(r'^demandes$', DemandeListView.as_view(), name='petits-cours-demandes-list'), url(r'^demandes/(?P\d+)$', - 'gestioncof.petits_cours_views.details', + petits_cours_views.details, name='petits-cours-demande-details'), url(r'^demandes/(?P\d+)/traitement$', - 'gestioncof.petits_cours_views.traitement', + petits_cours_views.traitement, name='petits-cours-demande-traitement'), url(r'^demandes/(?P\d+)/retraitement$', - 'gestioncof.petits_cours_views.retraitement', + petits_cours_views.retraitement, name='petits-cours-demande-retraitement'), ] surveys_patterns = [ - url(r'^(?P\d+)/status$', 'gestioncof.views.survey_status'), - url(r'^(?P\d+)$', 'gestioncof.views.survey'), + url(r'^(?P\d+)/status$', views.survey_status), + url(r'^(?P\d+)$', views.survey), ] events_patterns = [ - url(r'^(?P\d+)$', 'gestioncof.views.event'), - url(r'^(?P\d+)/status$', 'gestioncof.views.event_status'), + url(r'^(?P\d+)$', views.event), + url(r'^(?P\d+)/status$', views.event_status), ] calendar_patterns = [ diff --git a/requirements.txt b/requirements.txt index b6f8cc6f..c1831e33 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,12 @@ configparser==3.5.0 -Django==1.8.13 +Django==1.8 django-autocomplete-light==2.3.3 -django-autoslug==1.8.0 +django-autoslug==1.9.3 django-cas-ng==3.5.4 django-grappelli==2.8.1 django-recaptcha==1.0.5 mysqlclient==1.3.7 -Pillow==2.9.0 +Pillow==3.3.0 simplejson==3.8.2 six==1.10.0 unicodecsv==0.14.1