Répare et nettoie les URLs

This commit is contained in:
Evarin 2018-06-25 20:33:14 +02:00
parent 8d74be936b
commit e5a35251cd
7 changed files with 18 additions and 18 deletions

View file

@ -22,11 +22,11 @@ Fanfaron de passage, musicien intrigué, Ernestophoniste en quête de sensations
<table width="100%">
<tr>
<td width="20%" align="left">
&lt;&lt; <a href="/calendar/{{PreviousYear}}/{{PreviousMonth}}/">{{PreviousMonthName|frenchmonth}} {{PreviousYear}}</a>
&lt;&lt; <a href="{% url "calendrier:view-month" PreviousYear PreviousMonth %}">{{PreviousMonthName|frenchmonth}} {{PreviousYear}}</a>
</td>
<td width="20%" align="center"><a href="/calendar">Aujourd'hui</a></td>
<td width="20%" align="center"><a href="{% url "calendrier:home" %}">Aujourd'hui</a></td>
<td width="20%" align="right">
<a href="/calendar/{{NextYear}}/{{NextMonth}}/">{{NextMonthName|frenchmonth}} {{NextYear}}</a> &gt;&gt;
<a href="{% url "calendrier:view-month" NextYear NextMonth %}">{{NextMonthName|frenchmonth}} {{NextYear}}</a> &gt;&gt;
</td>
</tr>
</table>

View file

@ -16,9 +16,9 @@
{% if user.is_authenticated %}
<div id="actions">
{% if user.profile.is_chef %}
<p><a href="/calendar/edition/{{ev.id}}">Modifier l'événement</a></p>
<p><a href="/calendar/supprimer/{{ev.id}}">Supprimer l'événement</a></p>
<p><a href="/calendar/resend/{{ev.id}}">Renvoyer les mails</a></p>
<p><a href="{% url "calendrier:edit_event" ev.id %}">Modifier l'événement</a></p>
<p><a href="{% url "calendrier:delete_event" ev.id %}">Supprimer l'événement</a></p>
<p><a href="{% url "calendrier:resend" ev.id %}">Renvoyer les mails</a></p>
{% endif %}
<p><a href="{% url "calendrier:change-doodle-name" %}">Changer mon nom pour le doodle</a></p>
</div>

View file

@ -8,13 +8,13 @@ app_name = "calendrier"
urlpatterns = [
path("", views.home, name="home"),
path("new", views.create_event, name="create_event"),
path("edition/<int:pk>", EventUpdate.as_view()),
path("supprimer/<int:pk>", EventDelete.as_view()),
path("edition/<int:pk>", EventUpdate.as_view(), name="edit_event"),
path("supprimer/<int:pk>", EventDelete.as_view(), name="delete_event"),
path("resend/<int:id>", views.resend, name="resend"),
path("changename", views.changename, name="change-doodle-name"),
path("<int:id>/reponse", views.reponse, name="reponse"),
path("rep/<slug:codeus>/<slug:codeev>/<slug:coderep>", views.reponse_event, name="reponse_event"),
path("<int:pYear>/<int:pMonth>/<int:id>", views.view_event),
path("<int:pYear>/<int:pMonth>", views.calendar),
path("<int:id>", views.view_eventbis, name="view-event"),
path("<int:pYear>/<int:pMonth>/<int:id>", views.view_event, name="view-event"),
path("<int:pYear>/<int:pMonth>", views.calendar, name="view-month"),
path("<int:id>", views.view_eventbis, name="view-event2"),
]

View file

@ -3,7 +3,7 @@
{%block titre %}Ajout d'un pad{% endblock %}
{% block content %}
<p><a href="{% url "pads-liste" %}">Retour à la liste</a></p>
<p><a href="{% url "pads:list" %}">Retour à la liste</a></p>
{% if envoi %}<p>Ce pad a été enregistré.{% endif %}
<form action="" method="post">
{% csrf_token %}

View file

@ -3,7 +3,7 @@
{% block titre %}Suppression d'un pad{% endblock %}
{% block content %}<form action="" method="post">
{% csrf_token %}
<p><a href="{% url "pads-liste" %}">Retour aux pads</a></p>
<p><a href="{% url "pads:list" %}">Retour aux pads</a></p>
<p>Voulez vous vraiment supprimer le pad {{ object }}?</p>
<input type="submit" value="Oui" />
</form>

View file

@ -6,14 +6,14 @@
<p>{{ error }}</p>
{% endif %}
{% if user.profile.is_chef %}
<p><a href="{% url "pads-add" %}">Ajouter un pad</a></p>
<p><a href="{% url "pads:add" %}">Ajouter un pad</a></p>
{% endif %}
<ul class="filelist">
{% for p in pads %}
<li><a class="fichier" href="{{ p.url }}">{{ p.nom }}</a>
{% if user.profile.is_chef %}
<a class="telecharger" href="/pads/edition/{{p.id}}">Modifier</a>
<a class="supprimer" href="/pads/supprimer/{{p.id}}">Supprimer</a>
<a class="telecharger" href="{% url "pads:edit" p.id %}">Modifier</a>
<a class="supprimer" href="{% url "pads:delete" p.id %}">Supprimer</a>
{% endif %}
</li>

View file

@ -8,6 +8,6 @@ app_name = "pads"
urlpatterns = [
path("", views.liste_pads, name="list"),
path("ajouter", views.add_pad, name="add"),
path("edition/<int:pk>", PadUpdate.as_view()),
path("supprimer/<int:pk>", PadDelete.as_view()),
path("edition/<int:pk>", PadUpdate.as_view(), name="edit"),
path("supprimer/<int:pk>", PadDelete.as_view(), name="delete"),
]