Write modern-style urls
- Proper use of include - Defining namespaces (I do not use them for now because many urls are going to change) - Do not try to reverse with old-style references: 'cof.views.XXX'
This commit is contained in:
parent
859f191894
commit
1aed36330f
18 changed files with 92 additions and 54 deletions
|
@ -16,7 +16,7 @@
|
||||||
<h4 class="bda-prix">Total à payer : {{ total|floatformat }}€</h4>
|
<h4 class="bda-prix">Total à payer : {{ total|floatformat }}€</h4>
|
||||||
<br/>
|
<br/>
|
||||||
<p>Ne manque pas un spectacle avec le
|
<p>Ne manque pas un spectacle avec le
|
||||||
<a href="{% url "cof.views.calendar" %}">calendrier
|
<a href="{% url "calendar" %}">calendrier
|
||||||
automatique !</a></p>
|
automatique !</a></p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h3>Vous n'avez aucune place :(</h3>
|
<h3>Vous n'avez aucune place :(</h3>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<header>
|
<header>
|
||||||
<div class="container banner">
|
<div class="container banner">
|
||||||
<a href="{% url "cof.views.home" %}">
|
<a href="{% url "home" %}">
|
||||||
<h1>GestioCOF</h1>
|
<h1>GestioCOF</h1>
|
||||||
{% block homelink %}
|
{% block homelink %}
|
||||||
<span class="glyphicon glyphicon-home" aria-hidden=true></span>
|
<span class="glyphicon glyphicon-home" aria-hidden=true></span>
|
||||||
|
|
|
@ -12,7 +12,7 @@ souscrire aux événements du COF et/ou aux spectacles BdA.
|
||||||
|
|
||||||
{% if token %}
|
{% if token %}
|
||||||
<p>Votre calendrier (compatible avec toutes les applications d'agenda) se trouve à
|
<p>Votre calendrier (compatible avec toutes les applications d'agenda) se trouve à
|
||||||
<a href="{% url 'cof.views.calendar_ics' token %}">cette adresse</a>.</p>
|
<a href="{% url 'calendar.ics' token %}">cette adresse</a>.</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Pour l'ajouter à Thunderbird (lightning), il faut copier ce lien et aller
|
<li>Pour l'ajouter à Thunderbird (lightning), il faut copier ce lien et aller
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{% if event.details %}
|
{% if event.details %}
|
||||||
<p>{{ event.details }}</p>
|
<p>{{ event.details }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form method="post" action="{% url 'cof.views.event' event.id %}">
|
<form method="post" action="{% url 'event' event.id %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{{ form.as_p }}
|
||||||
<input type="submit" class="btn-submit" value="Enregistrer" />
|
<input type="submit" class="btn-submit" value="Enregistrer" />
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
{% if survey.details %}
|
{% if survey.details %}
|
||||||
<p>{{ survey.details }}</p>
|
<p>{{ survey.details }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form class="form-horizontal" method="post" action="{% url 'cof.views.survey' survey.id %}">
|
<form class="form-horizontal" method="post" action="{% url 'survey' survey.id %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form | bootstrap}}
|
{{ form | bootstrap}}
|
||||||
|
|
||||||
|
|
|
@ -7,15 +7,15 @@
|
||||||
<h2>Liens utiles du COF</h2>
|
<h2>Liens utiles du COF</h2>
|
||||||
<h3>COF</h3>
|
<h3>COF</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{% url 'cof.views.export_members' %}">Export des membres du COF</a></li>
|
<li><a href="{% url 'export.members' %}">Export des membres du COF</a></li>
|
||||||
<li><a href="{% url 'cof.views.liste_diffcof' %}">Diffusion COF</a></li>
|
<li><a href="{% url 'liste_diffcof' %}">Diffusion COF</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3>Mega</h3>
|
<h3>Mega</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{% url 'cof.views.export_mega_participants' %}">Export des non-orgas uniquement</a></li>
|
<li><a href="{% url 'export.mega.participants' %}">Export des non-orgas uniquement</a></li>
|
||||||
<li><a href="{% url 'cof.views.export_mega_orgas' %}">Export des orgas uniquement</a></li>
|
<li><a href="{% url 'export.mega.orgas' %}">Export des orgas uniquement</a></li>
|
||||||
<li><a href="{% url 'cof.views.export_mega' %}">Export de tout le monde</a></li>
|
<li><a href="{% url 'export.mega' %}">Export de tout le monde</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>Note : pour ouvrir les fichiers .csv avec Excel, il faut
|
<p>Note : pour ouvrir les fichiers .csv avec Excel, il faut
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include "tristate_js.html" %}
|
{% include "tristate_js.html" %}
|
||||||
<h3>Filtres</h3>
|
<h3>Filtres</h3>
|
||||||
<form method="post" action="{% url 'cof.views.event_status' event.id %}">
|
<form method="post" action="{% url 'event.status' event.id %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{{ form.as_p }}
|
||||||
<input style="margin-top:10px;" type="submit" class="btn btn-primary" value="Filtrer" />
|
<input style="margin-top:10px;" type="submit" class="btn btn-primary" value="Filtrer" />
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="hm-block">
|
<div class="hm-block">
|
||||||
<ul>
|
<ul>
|
||||||
{% for event in open_events %}
|
{% for event in open_events %}
|
||||||
<li><a href="{% url "cof.views.event" event.id %}">{{ event.title }}</a></li>
|
<li><a href="{% url "event" event.id %}">{{ event.title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<div class="hm-block">
|
<div class="hm-block">
|
||||||
<ul>
|
<ul>
|
||||||
{% for survey in open_surveys %}
|
{% for survey in open_surveys %}
|
||||||
<li><a href="{% url "cof.views.survey" survey.id %}">{{ survey.title }}</a></li>
|
<li><a href="{% url "survey" survey.id %}">{{ survey.title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -54,11 +54,11 @@
|
||||||
<h3 class="block-title">Divers<span class="pull-right glyphicon glyphicon-question-sign"></span></h3>
|
<h3 class="block-title">Divers<span class="pull-right glyphicon glyphicon-question-sign"></span></h3>
|
||||||
<div class="hm-block">
|
<div class="hm-block">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{% url "cof.views.calendar" %}">Calendrier dynamique</a></li>
|
<li><a href="{% url "calendar" %}">Calendrier dynamique</a></li>
|
||||||
{% if user.profile.cof.is_cof %}<li><a href="{% url "petits-cours-inscription" %}">Inscription pour donner des petits cours</a></li>{% endif %}
|
{% if user.profile.cof.is_cof %}<li><a href="{% url "petits-cours-inscription" %}">Inscription pour donner des petits cours</a></li>{% endif %}
|
||||||
|
|
||||||
<li><a href="{% url "gestion:profile" %}">Éditer mon profil</a></li>
|
<li><a href="{% url "gestion:profile" %}">Éditer mon profil</a></li>
|
||||||
{% if not user.profile.login_clipper %}<li><a href="{% url "django.contrib.auth.views.password_change" %}">Changer mon mot de passe</a></li>{% endif %}
|
{% if not user.profile.login_clipper %}<li><a href="{% url "password_change" %}">Changer mon mot de passe</a></li>{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -71,16 +71,16 @@
|
||||||
<h4>Général</h4>
|
<h4>Général</h4>
|
||||||
<li><a href="{% url "admin:index" %}">Administration générale</a></li>
|
<li><a href="{% url "admin:index" %}">Administration générale</a></li>
|
||||||
<li><a href="{% url "petits-cours-demandes-list" %}">Demandes de petits cours</a></li>
|
<li><a href="{% url "petits-cours-demandes-list" %}">Demandes de petits cours</a></li>
|
||||||
<li><a href="{% url "cof.views.registration" %}">Inscription d'un nouveau membre</a></li>
|
<li><a href="{% url "registration" %}">Inscription d'un nouveau membre</a></li>
|
||||||
<li><a href="{% url "liste-clubs" %}">Gestion des clubs</a></li>
|
<li><a href="{% url "liste-clubs" %}">Gestion des clubs</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
<h4>Évènements & Sondages</h4>
|
<h4>Évènements & Sondages</h4>
|
||||||
{% for event in events %}
|
{% for event in events %}
|
||||||
<li><a href="{% url "cof.views.event_status" event.id %}">Événement : {{ event.title }}</a></li>
|
<li><a href="{% url "event.status" event.id %}">Événement : {{ event.title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for survey in surveys %}
|
{% for survey in surveys %}
|
||||||
<li><a href="{% url "cof.views.survey_status" survey.id %}">Sondage : {{ survey.title }}</a></li>
|
<li><a href="{% url "survey.status" survey.id %}">Sondage : {{ survey.title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -105,8 +105,8 @@
|
||||||
<h3 class="block-title">Liens utiles<span class="pull-right glyphicon glyphicon-link"></span></h3>
|
<h3 class="block-title">Liens utiles<span class="pull-right glyphicon glyphicon-link"></span></h3>
|
||||||
<div class="hm-block">
|
<div class="hm-block">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{% url "cof.views.utile_cof" %}">Liens utiles du COF</a></li>
|
<li><a href="{% url "utile_cof" %}">Liens utiles du COF</a></li>
|
||||||
<li><a href="{% url "cof.views.utile_bda" %}">Liens utiles BdA</a></li>
|
<li><a href="{% url "utile_bda" %}">Liens utiles BdA</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
// On attend que la page soit prête pour executer le code
|
// On attend que la page soit prête pour executer le code
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('input#search_autocomplete').yourlabsAutocomplete({
|
$('input#search_autocomplete').yourlabsAutocomplete({
|
||||||
url: '{% url 'cof.autocomplete.autocomplete' %}',
|
url: '{% url 'autocomplete' %}',
|
||||||
minimumCharacters: 3,
|
minimumCharacters: 3,
|
||||||
id: 'search_autocomplete',
|
id: 'search_autocomplete',
|
||||||
choiceSelector: 'li:has(a)',
|
choiceSelector: 'li:has(a)',
|
||||||
|
|
|
@ -5,5 +5,5 @@
|
||||||
|
|
||||||
{% block realcontent %}
|
{% block realcontent %}
|
||||||
<h2>Mot de passe modifié avec succès !</h2>
|
<h2>Mot de passe modifié avec succès !</h2>
|
||||||
<h3><a href="{% url "cof.views.home" %}">Retour au menu principal</a></h3>
|
<h3><a href="{% url "home" %}">Retour au menu principal</a></h3>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
{% block realcontent %}
|
{% block realcontent %}
|
||||||
<h2>Changement de mot de passe</h2>
|
<h2>Changement de mot de passe</h2>
|
||||||
<form class="form-horizontal" method="post" action="{% url 'django.contrib.auth.views.password_change' %}">
|
<form class="form-horizontal" method="post" action="{% url 'password_change' %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form | bootstrap }}
|
{{ form | bootstrap }}
|
||||||
<input type="submit" class="btn btn-primary pull-right" value="Changer" />
|
<input type="submit" class="btn btn-primary pull-right" value="Changer" />
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<h3>Inscription d'un nouveau compte (extérieur ?)</h3>
|
<h3>Inscription d'un nouveau compte (extérieur ?)</h3>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form role="form" id="profile" method="post" action="{% url 'cof.views.registration' %}">
|
<form role="form" id="profile" method="post" action="{% url 'registration' %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<table>
|
<table>
|
||||||
{{ user_form | bootstrap }}
|
{{ user_form | bootstrap }}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h3>Filtres</h3>
|
<h3>Filtres</h3>
|
||||||
{% include "tristate_js.html" %}
|
{% include "tristate_js.html" %}
|
||||||
<form method="post" action="{% url 'cof.views.survey_status' survey.id %}">
|
<form method="post" action="{% url 'survey.status' survey.id %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{{ form.as_p }}
|
||||||
<input style="margin-top:10px;" type="submit" class="btn btn-primary" value="Filtrer" />
|
<input style="margin-top:10px;" type="submit" class="btn btn-primary" value="Filtrer" />
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<h2>Liens utiles du BdA</h2>
|
<h2>Liens utiles du BdA</h2>
|
||||||
<h3>Listes mail</h3>
|
<h3>Listes mail</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{% url 'cof.views.liste_bdadiff' %}">BdA diffusion</a></li>
|
<li><a href="{% url 'liste_bdadiff' %}">BdA diffusion</a></li>
|
||||||
<li><a href="{% url 'cof.views.liste_bdarevente' %}">BdA revente</a></li>
|
<li><a href="{% url 'liste_bdarevente' %}">BdA revente</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
39
cof/urls.py
39
cof/urls.py
|
@ -7,12 +7,20 @@ from . import views, petits_cours_views
|
||||||
|
|
||||||
|
|
||||||
export_patterns = [
|
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/avecremarques$', views.export_mega_remarksonly),
|
||||||
url(r'^mega/participants$', views.export_mega_participants),
|
url(r'^mega/participants$',
|
||||||
url(r'^mega/orgas$', views.export_mega_orgas),
|
views.export_mega_participants,
|
||||||
|
name="export.mega.participants"),
|
||||||
|
url(r'^mega/orgas$',
|
||||||
|
views.export_mega_orgas,
|
||||||
|
name="export.mega.orgas"),
|
||||||
url(r'^mega/(?P<type>.+)$', views.export_mega_bytype),
|
url(r'^mega/(?P<type>.+)$', views.export_mega_bytype),
|
||||||
url(r'^mega$', views.export_mega),
|
url(r'^mega$',
|
||||||
|
views.export_mega,
|
||||||
|
name="export.mega"),
|
||||||
]
|
]
|
||||||
|
|
||||||
petitcours_patterns = [
|
petitcours_patterns = [
|
||||||
|
@ -37,19 +45,30 @@ petitcours_patterns = [
|
||||||
]
|
]
|
||||||
|
|
||||||
surveys_patterns = [
|
surveys_patterns = [
|
||||||
url(r'^(?P<survey_id>\d+)/status$', views.survey_status),
|
url(r'^(?P<survey_id>\d+)/status$',
|
||||||
url(r'^(?P<survey_id>\d+)$', views.survey),
|
views.survey_status,
|
||||||
|
name="survey.status"),
|
||||||
|
url(r'^(?P<survey_id>\d+)$',
|
||||||
|
views.survey,
|
||||||
|
name="survey"),
|
||||||
]
|
]
|
||||||
|
|
||||||
events_patterns = [
|
events_patterns = [
|
||||||
url(r'^(?P<event_id>\d+)$', views.event),
|
url(r'^(?P<event_id>\d+)$',
|
||||||
url(r'^(?P<event_id>\d+)/status$', views.event_status),
|
views.event,
|
||||||
|
name="event"),
|
||||||
|
url(r'^(?P<event_id>\d+)/status$',
|
||||||
|
views.event_status,
|
||||||
|
name="event.status"),
|
||||||
]
|
]
|
||||||
|
|
||||||
calendar_patterns = [
|
calendar_patterns = [
|
||||||
url(r'^subscription$', 'cof.views.calendar'),
|
url(r'^subscription$',
|
||||||
|
views.calendar,
|
||||||
|
name="calendar"),
|
||||||
url(r'^(?P<token>[a-z0-9-]+)/calendar.ics$',
|
url(r'^(?P<token>[a-z0-9-]+)/calendar.ics$',
|
||||||
'cof.views.calendar_ics')
|
views.calendar_ics,
|
||||||
|
name="calendar.ics")
|
||||||
]
|
]
|
||||||
|
|
||||||
clubs_patterns = [
|
clubs_patterns = [
|
||||||
|
|
|
@ -5,6 +5,9 @@ Fichier principal de configuration des urls du projet GestioCOF
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import autocomplete_light
|
import autocomplete_light
|
||||||
|
import gestion.urls
|
||||||
|
import kfet.urls
|
||||||
|
import bda.urls
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls import include, url
|
from django.conf.urls import include, url
|
||||||
|
@ -21,19 +24,20 @@ from cof.autocomplete import autocomplete
|
||||||
from gestion import views as gestion_views
|
from gestion import views as gestion_views
|
||||||
|
|
||||||
autocomplete_light.autodiscover()
|
autocomplete_light.autodiscover()
|
||||||
|
|
||||||
admin.autodiscover()
|
admin.autodiscover()
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
# Page d'accueil
|
# Page d'accueil
|
||||||
url(r'^$', cof_views.home, name='home'),
|
url(r'^$', cof_views.home, name='home'),
|
||||||
# The common views
|
# The common views
|
||||||
url(r"^", include("gestion.urls", namespace='gestion')),
|
url(r"^", include(gestion.urls, namespace="gestion")),
|
||||||
# Admin urls
|
# Admin urls
|
||||||
url(r'^admin/logout/', gestion_views.logout),
|
url(r'^admin/logout/', gestion_views.logout),
|
||||||
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
||||||
url(r'^admin/', include(admin.site.urls)),
|
url(r'^admin/', admin.site.urls),
|
||||||
# Le BdA
|
# Le BdA
|
||||||
url(r'^bda/', include('bda.urls')),
|
url(r'^bda/', include(bda.urls)),
|
||||||
# Les exports
|
# Les exports
|
||||||
url(r'^export/', include(export_patterns)),
|
url(r'^export/', include(export_patterns)),
|
||||||
# Les petits cours
|
# Les petits cours
|
||||||
|
@ -47,12 +51,16 @@ urlpatterns = [
|
||||||
# Clubs
|
# Clubs
|
||||||
url(r'^clubs/', include(clubs_patterns)),
|
url(r'^clubs/', include(clubs_patterns)),
|
||||||
# Infos persos
|
# 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$',
|
url(r'^outsider/password-change-done$',
|
||||||
django_views.password_change_done,
|
django_views.password_change_done,
|
||||||
name='password_change_done'),
|
name='password_change_done'),
|
||||||
# Inscription d'un nouveau membre
|
# Inscription d'un nouveau membre
|
||||||
url(r'^registration$', cof_views.registration),
|
url(r'^registration$',
|
||||||
|
cof_views.registration,
|
||||||
|
name="registration"),
|
||||||
url(r'^registration/clipper/(?P<login_clipper>[\w-]+)$',
|
url(r'^registration/clipper/(?P<login_clipper>[\w-]+)$',
|
||||||
cof_views.registration_form2, name="clipper-registration"),
|
cof_views.registration_form2, name="clipper-registration"),
|
||||||
url(r'^registration/user/(?P<username>.+)$',
|
url(r'^registration/user/(?P<username>.+)$',
|
||||||
|
@ -60,21 +68,33 @@ urlpatterns = [
|
||||||
url(r'^registration/empty$', cof_views.registration_form2,
|
url(r'^registration/empty$', cof_views.registration_form2,
|
||||||
name="empty-registration"),
|
name="empty-registration"),
|
||||||
# Autocompletion
|
# Autocompletion
|
||||||
url(r'^autocomplete/registration$', autocomplete),
|
url(r'^autocomplete/registration$',
|
||||||
|
autocomplete,
|
||||||
|
name="autocomplete"),
|
||||||
url(r'^autocomplete/', include('autocomplete_light.urls')),
|
url(r'^autocomplete/', include('autocomplete_light.urls')),
|
||||||
# Liens utiles du COF et du BdA
|
# Liens utiles du COF et du BdA
|
||||||
url(r'^utile_cof$', cof_views.utile_cof),
|
url(r'^utile_cof$',
|
||||||
url(r'^utile_bda$', cof_views.utile_bda),
|
cof_views.utile_cof,
|
||||||
url(r'^utile_bda/bda_diff$', cof_views.liste_bdadiff),
|
name="utile_cof"),
|
||||||
url(r'^utile_cof/diff_cof$', cof_views.liste_diffcof),
|
url(r'^utile_bda$',
|
||||||
url(r'^utile_bda/bda_revente$', cof_views.liste_bdarevente),
|
cof_views.utile_bda,
|
||||||
url(r'^k-fet/', include('kfet.urls')),
|
name="utile_bda"),
|
||||||
|
url(r'^utile_bda/bda_diff$',
|
||||||
|
cof_views.liste_bdadiff,
|
||||||
|
name="liste_bda_diff"),
|
||||||
|
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:
|
if 'debug_toolbar' in settings.INSTALLED_APPS:
|
||||||
import debug_toolbar
|
import debug_toolbar
|
||||||
urlpatterns += [
|
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.
|
# Si on est en production, MEDIA_ROOT est servi par Apache.
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
from django.conf.urls import url, include
|
from django.conf.urls import url
|
||||||
from django.views.generic.base import TemplateView
|
from django.views.generic.base import TemplateView
|
||||||
from django.contrib.auth import views as django_views
|
from django.contrib.auth import views as django_views
|
||||||
from django.contrib import admin
|
|
||||||
from django_cas_ng import views as django_cas_views
|
from django_cas_ng import views as django_cas_views
|
||||||
|
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
|
app_name = "gestion"
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
# Profile edition
|
# Profile edition
|
||||||
url(r"^profile/?$", views.profile, name="profile"),
|
url(r"^profile/?$", views.profile, name="profile"),
|
||||||
|
|
|
@ -16,7 +16,7 @@ from .forms import ProfileForm, UserForm
|
||||||
|
|
||||||
def login(request):
|
def login(request):
|
||||||
if request.user.is_authenticated():
|
if request.user.is_authenticated():
|
||||||
return redirect("cof.views.home")
|
return redirect("home")
|
||||||
context = {}
|
context = {}
|
||||||
# Fetch the next page from the request data
|
# Fetch the next page from the request data
|
||||||
if request.method == "GET" and 'next' in request.GET:
|
if request.method == "GET" and 'next' in request.GET:
|
||||||
|
|
Loading…
Reference in a new issue