diff --git a/bda/templates/bda/resume_places.html b/bda/templates/bda/resume_places.html index 226e697a..7cbd06ea 100644 --- a/bda/templates/bda/resume_places.html +++ b/bda/templates/bda/resume_places.html @@ -16,7 +16,7 @@

Total à payer : {{ total|floatformat }}€


Ne manque pas un spectacle avec le - calendrier + calendrier automatique !

{% else %}

Vous n'avez aucune place :(

diff --git a/cof/templates/cof/base_header.html b/cof/templates/cof/base_header.html index 4713a286..dd9c1967 100644 --- a/cof/templates/cof/base_header.html +++ b/cof/templates/cof/base_header.html @@ -3,7 +3,7 @@ {% block content %}
@@ -105,8 +105,8 @@

Liens utiles

diff --git a/cof/templates/registration.html b/cof/templates/registration.html index 559226b7..e81d7b2b 100644 --- a/cof/templates/registration.html +++ b/cof/templates/registration.html @@ -16,7 +16,7 @@ // On attend que la page soit prête pour executer le code $(document).ready(function() { $('input#search_autocomplete').yourlabsAutocomplete({ - url: '{% url 'cof.autocomplete.autocomplete' %}', + url: '{% url 'autocomplete' %}', minimumCharacters: 3, id: 'search_autocomplete', choiceSelector: 'li:has(a)', diff --git a/cof/templates/registration/password_change_done.html b/cof/templates/registration/password_change_done.html index 2f2e4eea..9f2c4a60 100644 --- a/cof/templates/registration/password_change_done.html +++ b/cof/templates/registration/password_change_done.html @@ -5,5 +5,5 @@ {% block realcontent %}

Mot de passe modifié avec succès !

-

Retour au menu principal

+

Retour au menu principal

{% endblock %} diff --git a/cof/templates/registration/password_change_form.html b/cof/templates/registration/password_change_form.html index f579fb31..d9a3f66a 100644 --- a/cof/templates/registration/password_change_form.html +++ b/cof/templates/registration/password_change_form.html @@ -5,7 +5,7 @@ {% block realcontent %}

Changement de mot de passe

- + {% csrf_token %} {{ form | bootstrap }} diff --git a/cof/templates/registration_form.html b/cof/templates/registration_form.html index 97bc375c..2f9bb340 100644 --- a/cof/templates/registration_form.html +++ b/cof/templates/registration_form.html @@ -7,7 +7,7 @@ {% else %}

Inscription d'un nouveau compte (extérieur ?)

{% endif %} - + {% csrf_token %} {{ user_form | bootstrap }} diff --git a/cof/templates/survey_status.html b/cof/templates/survey_status.html index 2e8b28fd..820aeb38 100644 --- a/cof/templates/survey_status.html +++ b/cof/templates/survey_status.html @@ -11,7 +11,7 @@ {% endif %}

Filtres

{% include "tristate_js.html" %} - + {% csrf_token %} {{ form.as_p }} diff --git a/cof/templates/utile_bda.html b/cof/templates/utile_bda.html index 83b96fb8..854009c1 100644 --- a/cof/templates/utile_bda.html +++ b/cof/templates/utile_bda.html @@ -7,7 +7,7 @@

Liens utiles du BdA

Listes mail

{% endblock %} diff --git a/cof/urls.py b/cof/urls.py index ca310382..cc9df782 100644 --- a/cof/urls.py +++ b/cof/urls.py @@ -7,12 +7,20 @@ from . import views, petits_cours_views export_patterns = [ - url(r'^members$', views.export_members), + url(r'^members$', + views.export_members, + name="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/participants$', + views.export_mega_participants, + name="export.mega.participants"), + url(r'^mega/orgas$', + views.export_mega_orgas, + name="export.mega.orgas"), url(r'^mega/(?P.+)$', views.export_mega_bytype), - url(r'^mega$', views.export_mega), + url(r'^mega$', + views.export_mega, + name="export.mega"), ] petitcours_patterns = [ @@ -37,19 +45,30 @@ petitcours_patterns = [ ] surveys_patterns = [ - url(r'^(?P\d+)/status$', views.survey_status), - url(r'^(?P\d+)$', views.survey), + url(r'^(?P\d+)/status$', + views.survey_status, + name="survey.status"), + url(r'^(?P\d+)$', + views.survey, + name="survey"), ] events_patterns = [ - url(r'^(?P\d+)$', views.event), - url(r'^(?P\d+)/status$', views.event_status), + url(r'^(?P\d+)$', + views.event, + name="event"), + url(r'^(?P\d+)/status$', + views.event_status, + name="event.status"), ] calendar_patterns = [ - url(r'^subscription$', 'cof.views.calendar'), + url(r'^subscription$', + views.calendar, + name="calendar"), url(r'^(?P[a-z0-9-]+)/calendar.ics$', - 'cof.views.calendar_ics') + views.calendar_ics, + name="calendar.ics") ] clubs_patterns = [ diff --git a/gestioCOF/urls.py b/gestioCOF/urls.py index ec531778..e95bb924 100644 --- a/gestioCOF/urls.py +++ b/gestioCOF/urls.py @@ -5,6 +5,9 @@ Fichier principal de configuration des urls du projet GestioCOF """ import autocomplete_light +import gestion.urls +import kfet.urls +import bda.urls from django.conf import settings from django.conf.urls import include, url @@ -21,19 +24,20 @@ from cof.autocomplete import autocomplete from gestion import views as gestion_views autocomplete_light.autodiscover() + admin.autodiscover() urlpatterns = [ # Page d'accueil url(r'^$', cof_views.home, name='home'), # The common views - url(r"^", include("gestion.urls", namespace='gestion')), + 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)), + url(r'^admin/', admin.site.urls), # Le BdA - url(r'^bda/', include('bda.urls')), + url(r'^bda/', include(bda.urls)), # Les exports url(r'^export/', include(export_patterns)), # Les petits cours @@ -47,12 +51,16 @@ urlpatterns = [ # Clubs url(r'^clubs/', include(clubs_patterns)), # Infos persos - url(r'^outsider/password-change$', django_views.password_change), + url(r'^outsider/password-change$', + django_views.password_change, + name="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$', + cof_views.registration, + name="registration"), url(r'^registration/clipper/(?P[\w-]+)$', cof_views.registration_form2, name="clipper-registration"), url(r'^registration/user/(?P.+)$', @@ -60,21 +68,33 @@ urlpatterns = [ url(r'^registration/empty$', cof_views.registration_form2, name="empty-registration"), # Autocompletion - url(r'^autocomplete/registration$', autocomplete), + url(r'^autocomplete/registration$', + autocomplete, + name="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')), + url(r'^utile_cof$', + cof_views.utile_cof, + name="utile_cof"), + url(r'^utile_bda$', + cof_views.utile_bda, + name="utile_bda"), + url(r'^utile_bda/bda_diff$', + cof_views.liste_bdadiff, + name="liste_bdadiff"), + url(r'^utile_cof/diff_cof$', + cof_views.liste_diffcof, + name="liste_diffcof"), + url(r'^utile_bda/bda_revente$', + cof_views.liste_bdarevente, + name="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)), + url(r'^__debug__/', debug_toolbar.urls), ] # Si on est en production, MEDIA_ROOT est servi par Apache. diff --git a/gestion/urls.py b/gestion/urls.py index 0e7d63ac..c1cb3db6 100644 --- a/gestion/urls.py +++ b/gestion/urls.py @@ -5,7 +5,7 @@ from django_cas_ng import views as django_cas_views from . import views - +app_name = "gestion" urlpatterns = [ # Profile edition url(r"^profile/?$", views.profile, name="profile"), diff --git a/gestion/views.py b/gestion/views.py index 7b3a4997..0a210918 100644 --- a/gestion/views.py +++ b/gestion/views.py @@ -16,7 +16,7 @@ from .forms import ProfileForm, UserForm def login(request): if request.user.is_authenticated(): - return redirect("cof.views.home") + return redirect("home") context = {} # Fetch the next page from the request data if request.method == "GET" and 'next' in request.GET: