]> git.parisson.com Git - teleforma.git/commitdiff
upgrade django urls thx to
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 5 Feb 2019 01:19:15 +0000 (02:19 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 5 Feb 2019 01:19:15 +0000 (02:19 +0100)
http://content.seedinvest.com/labs/backend/upgrading-from-django-1-4-to-django-1-7

42 files changed:
teleforma/templates/postman/base.html
teleforma/templates/postman/base_folder.html
teleforma/templates/postman/base_write.html
teleforma/templates/postman/view.html
teleforma/templates/quiz/quiz_detail.html
teleforma/templates/registration/activate.html
teleforma/templates/registration/activation_complete.html
teleforma/templates/registration/activation_email.html
teleforma/templates/registration/activation_email.txt
teleforma/templates/registration/login.html
teleforma/templates/registration/password_reset_email.html
teleforma/templates/registration/registration_complete.html
teleforma/templates/teleforma/annals.html
teleforma/templates/teleforma/appointments.html
teleforma/templates/teleforma/course.html
teleforma/templates/teleforma/course_conference.html
teleforma/templates/teleforma/course_conference_audio.html
teleforma/templates/teleforma/course_conference_record.html
teleforma/templates/teleforma/course_detail.html
teleforma/templates/teleforma/course_document.html
teleforma/templates/teleforma/course_media.html
teleforma/templates/teleforma/course_media_video_embed.html
teleforma/templates/teleforma/courses.html
teleforma/templates/teleforma/courses_pending.html
teleforma/templates/teleforma/inc/conference_list.html
teleforma/templates/teleforma/inc/document_list.html
teleforma/templates/teleforma/inc/media_list.html
teleforma/templates/teleforma/inc/media_list_pending.html
teleforma/templates/teleforma/inc/newsitem.html
teleforma/templates/teleforma/inc/newsitems_portlet.html
teleforma/templates/teleforma/newsitem_list.html
teleforma/templates/telemeta/base.html
teleforma/templates/telemeta/home.html
teleforma/templates/telemeta/inc/module_revisions.html
teleforma/templates/telemeta/inc/module_searches.html
teleforma/templates/telemeta/inc/module_user_revisions.html
teleforma/templates/telemeta/inc/user_list.html
teleforma/templates/telemeta/lists.html
teleforma/templates/telemeta/login.html
teleforma/templates/telemeta/profile_detail.html
teleforma/templates/telemeta/search_criteria.html
teleforma/templates/telemeta/users.html

index 480a7383d77864ce2446ffe6126cbfa9b950823e..12ea9d0a7d128c2cd7f2fbf5e5a9ef7df945b5a0 100644 (file)
 <div style="background: white;">
 {% postman_unread as unread_count %}
 <ul>
-<li><a href="{% url postman_inbox %}">{% if unread_count %} <strong>{% trans "Inbox" %} ({{ unread_count }})</strong>{% else %}{% trans "Inbox" %}{% endif %}</a></li>
-<li><a href="{% url postman_sent %}">{% trans "Sent Messages" %}</a></li>
-<li><a href="{% url postman_archives %}">{% trans "Archives" %}</a></li>
-<li><a href="{% url postman_trash %}">{% trans "Trash" %}</a></li>
+<li><a href="{% url 'postman_inbox' %}">{% if unread_count %} <strong>{% trans "Inbox" %} ({{ unread_count }})</strong>{% else %}{% trans "Inbox" %}{% endif %}</a></li>
+<li><a href="{% url 'postman_sent' %}">{% trans "Sent Messages" %}</a></li>
+<li><a href="{% url 'postman_archives' %}">{% trans "Archives" %}</a></li>
+<li><a href="{% url 'postman_trash' %}">{% trans "Trash" %}</a></li>
 </ul>
 </div>
 </div>
 <div class="module_action">
-<a href="{% url postman_write %}" class="component_icon button" id="action_orange">{% trans "New message" %}</a>
+<a href="{% url 'postman_write' %}" class="component_icon button" id="action_orange">{% trans "New message" %}</a>
 </div>
 </div>
 
index 1fd48140fe60f8cf593f08fc72f22be2f1c6ee97..e266da485bd4e6fb0f96f08a7e33b36b6682b0ed 100644 (file)
   <tr>
    <td><input type="checkbox" {% if by_conversation and message.thread_id %}name="tpks" value="{{ message.thread_id }}"{% else %}name="pks" value="{{ message.pk }}"{% endif %} /></td>
 
-   {% block pm_sender_cell %}<td><a href="{% if by_conversation and message.thread_id %}{% url postman_view_conversation message.thread_id %}{% else %}{{message.get_absolute_url }}{% endif %}?next={{ current_url|urlencode }}" title="{% get_training_profile message.sender %}">{% if message.is_new %}<strong>{% endif %}{{ message.obfuscated_sender|or_me:user }}{% if message.count %} ({{ message.count }}){% endif %}{% if message.is_new %}</strong>{% endif %}</a></td>{% endblock %}
+   {% block pm_sender_cell %}<td><a href="{% if by_conversation and message.thread_id %}{% url 'postman_view_conversation' message.thread_id %}{% else %}{{message.get_absolute_url }}{% endif %}?next={{ current_url|urlencode }}" title="{% get_training_profile message.sender %}">{% if message.is_new %}<strong>{% endif %}{{ message.obfuscated_sender|or_me:user }}{% if message.count %} ({{ message.count }}){% endif %}{% if message.is_new %}</strong>{% endif %}</a></td>{% endblock %}
 
-   {% block pm_recipient_cell %}<td><a href="{% if by_conversation and message.thread_id %}{% url postman_view_conversation message.thread_id %}{% else %}{{message.get_absolute_url }}{% endif %}?next={{ current_url|urlencode }}" title="{% get_training_profile message.recipient %}">{{ message.obfuscated_recipient|or_me:user }}{% if message.count %} ({{ message.count }}){% endif %}</a></td>{% endblock %}
+   {% block pm_recipient_cell %}<td><a href="{% if by_conversation and message.thread_id %}{% url 'postman_view_conversation' message.thread_id %}{% else %}{{message.get_absolute_url }}{% endif %}?next={{ current_url|urlencode }}" title="{% get_training_profile message.recipient %}">{{ message.obfuscated_recipient|or_me:user }}{% if message.count %} ({{ message.count }}){% endif %}</a></td>{% endblock %}
 
    <td>{% if message.is_new %}<strong>{% endif %}{% if message.is_replied %}<em>{% endif %}
    {% block pm_subject %}
-    <a href="{% if by_conversation and message.thread_id %}{% url postman_view_conversation message.thread_id %}{% else %}{{message.get_absolute_url }}{% endif %}?next={{ current_url|urlencode }}">
+    <a href="{% if by_conversation and message.thread_id %}{% url 'postman_view_conversation' message.thread_id %}{% else %}{{message.get_absolute_url }}{% endif %}?next={{ current_url|urlencode }}">
     {% include "postman/inc_subject_ex.html" %}
     </a>{% endblock %}
    {% if message.is_replied %}</em>{% endif %}{% if message.is_new %}</strong>{% endif %}</td>
 <br />
 {% block pm_form_buttons %}<span id="pm_buttons">
 {% block pm_delete_button %}
-<a href="#" class="component_icon button icon_delete" onclick="f=document.getElementById('_messageForm'); f.action='{% url postman_delete %}'; f.submit(); return false;">{% trans "Delete" %}</a>
+<a href="#" class="component_icon button icon_delete" onclick="f=document.getElementById('_messageForm'); f.action='{% url 'postman_delete' %}'; f.submit(); return false;">{% trans "Delete" %}</a>
 {% endblock %}
 {% block pm_archive_button %}
-<a href="#" class="component_icon button icon_save" onclick="f=document.getElementById('_messageForm'); f.action='{% url postman_archive %}'; f.submit(); return false;">{% trans "Archive" %}</a>
+<a href="#" class="component_icon button icon_save" onclick="f=document.getElementById('_messageForm'); f.action='{% url 'postman_archive' %}'; f.submit(); return false;">{% trans "Archive" %}</a>
 {% endblock %}
 {% block pm_undelete_button %}
-<a href="#" class="component_icon button icon_previous" onclick="f=document.getElementById('_messageForm'); f.action='{% url postman_undelete %}'; f.submit(); return false;">{% trans "Undelete" %}</a>
+<a href="#" class="component_icon button icon_previous" onclick="f=document.getElementById('_messageForm'); f.action='{% url 'postman_undelete' %}'; f.submit(); return false;">{% trans "Undelete" %}</a>
 {% endblock %}
 </span>{% endblock %}
 
index d3eb8d325d57b5bade5c22ada9e9c01496c2b3a9..c76bb9da980b916273fca45e2e159dd533c64fd6 100644 (file)
@@ -16,7 +16,7 @@
                 {% trans "Pour les questions concernant l'organisation des cours, le planning, les documents de cours ou les copies, adressez-vous à <b>Admin-CRFPA</b>." %}
                 <br/>
                 {% trans "Pour les questions concernant uniquement l'accès à la plateforme et aux médias vidéo ou audio, lire d'abord" %}
-                <a href="{% url teleforma-help %}">la page
+                <a href="{% url 'teleforma-help' %}">la page
                     d'aide</a> {% trans "puis adressez-vous à <b>Support technique</b>." %}
                 <br/><br/>
 
index 65e834069580311e621063d27ae8a72fdb7bc361..6461ef3b396cbf641d168366671f0ca364992470 100644 (file)
 <div class="pm_message{% if message.is_pending %} pm_pending{% endif %}{% if message.is_rejected %} pm_rejected{% endif %}{% if message.sender == user and message.sender_archived or message.recipient == user and message.recipient_archived %} pm_archived{% endif %}{% if message.sender == user and message.sender_deleted_at or message.recipient == user and message.recipient_deleted_at %} pm_deleted{% endif %}{% if message.recipient == user and not message.read_at %} pm_unread{% endif %}">
  <div class="pm_header">
   {% if message.obfuscated_sender %}
-         <a href="{% url telemeta-profile-detail message.obfuscated_sender %}" title="{% get_training_profile message.sender %}">
+         <a href="{% url 'telemeta-profile-detail' message.obfuscated_sender %}" title="{% get_training_profile message.sender %}">
          <span class="pm_sender">{{ message.obfuscated_sender|or_me:user }}</span>
          </a>&raquo;
   {% endif %}
   {% if message.obfuscated_recipient %}
-         <a href="{% url telemeta-profile-detail message.obfuscated_recipient %}" title="{% get_training_profile message.recipient %}">
+         <a href="{% url 'telemeta-profile-detail' message.obfuscated_recipient %}" title="{% get_training_profile message.recipient %}">
          <span class="pm_recipient">{{ message.obfuscated_recipient|or_me:user }}</span>
          </a> |
   {% endif %}
 <a href="{{ next_url }}" class="component_icon button icon_previous">{% trans "Back" %}</a>
 <span id="pm_buttons">
 {% block pm_delete_button %}
-<a href="#" class="component_icon button icon_delete" onclick="f=document.getElementById('_messageForm'); f.action='{% url postman_delete %}'; f.submit(); return false;">{% trans "Delete" %}</a>
+<a href="#" class="component_icon button icon_delete" onclick="f=document.getElementById('_messageForm'); f.action='{% url 'postman_delete' %}'; f.submit(); return false;">{% trans "Delete" %}</a>
 {% endblock %}
 {% block pm_archive_button %}
 {% if not archived %}
-<a href="#" class="component_icon button icon_save" onclick="f=document.getElementById('_messageForm'); f.action='{% url postman_archive %}'; f.submit(); return false;">{% trans "Archive" %}</a>
+<a href="#" class="component_icon button icon_save" onclick="f=document.getElementById('_messageForm'); f.action='{% url 'postman_archive' %}'; f.submit(); return false;">{% trans "Archive" %}</a>
 {% endif %}
 {% endblock %}
 
-{% if reply_to_pk %}<a class="component_icon button icon_next" href="{% url postman_reply reply_to_pk %}?next={{ next_url|urlencode }}">{% trans "Reply" %}</a>{% endif %}
+{% if reply_to_pk %}<a class="component_icon button icon_next" href="{% url 'postman_reply' reply_to_pk %}?next={{ next_url|urlencode }}">{% trans "Reply" %}</a>{% endif %}
 </form>
 {% if reply_to_pk %}<hr />
 <h2>{% trans 'Reply' %}</h2>
-<form id="_messageReply" action="{% url postman_reply reply_to_pk %}?next={{ next_url|urlencode }}" method="post">{% csrf_token %}
+<form id="_messageReply" action="{% url 'postman_reply' reply_to_pk %}?next={{ next_url|urlencode }}" method="post">{% csrf_token %}
 <div id="pm_reply">{{ form.body }}</div><br />
 <a href="#" class="component_icon button icon_next" onclick="f=document.getElementById('_messageReply'); f.submit(); return false;">{% trans "Reply" %}</a>
 
index 800afbc2ca1dc19b618f0ad3c8e2b0f0f569af01..6a66bc337ca72c58ffca7f5c141dd9256775cf45 100644 (file)
@@ -12,7 +12,7 @@
 {% endif %}
 <p>{{ quiz.description }}</p>
 <p>
-  <a href="{% url quiz_question quiz_name=quiz.url %}">
+  <a href="{% url 'quiz_question' quiz_name=quiz.url %}">
        {% trans "Start quiz" %}
   </a>
 </p>
index 6cf22cbcef5cabba1624287bb805d87991812782..4f3bdbe2ad6f7e3af42d419af4b870a0caac3e1b 100644 (file)
@@ -2,7 +2,7 @@
 {% load i18n %}
 {% block title %}{% if account %}{% trans "Activation complete" %}{% else %}{% trans "Activation problem" %}{% endif %}{% endblock %}
 {% block content %}
-{% url auth_login as auth_login_url %}
+{% url 'auth_login' as auth_login_url %}
 {% if account %}
 {% blocktrans %}
 Thanks {{ account }}, activation complete!
index 63f343bfa7274b9ab13cdd92e0d6c8f6d2baafa7..0eee8b6a913cbf2799470bd3076e8a44b7ef0782 100644 (file)
@@ -2,7 +2,7 @@
 {% load i18n %}
 {% block title %}{% trans "Activation complete" %}{% endblock %}
 {% block content %}
-{% url auth_login as auth_login_url %}
+{% url 'auth_login' as auth_login_url %}
 {% blocktrans %}
 Thanks, activation complete!  You may now <a href='{{ auth_login_url }}'>login</a> using the username and password you set at registration.
 {% endblocktrans %}
index 3c96af79fb4115fda58c2d97b080bb14c7976149..fa2bff55de9af89c8582d9ecc9d05b1e5bf04c47 100644 (file)
@@ -4,7 +4,7 @@ This template is used for the html alternative of the activation email
 if you use a django-registration backend that looks for it. e.g.
 https://github.com/huseyinyilmaz/django-registration-extended-backend
 {% endcomment %}
-{% url registration_activate activation_key as activation_key_url %}
+{% url 'registration_activate' activation_key as activation_key_url %}
 {% blocktrans with sitename=site.name sitedomain=site.domain%}<body>
 <h3>Account registration for {{ sitename }}</h3>
 <p>
index d54ccb34678e6f1b6f8d552c58c410768019186d..968e4dcab8d2be43c6cef169000a6564a4ccb4e0 100644 (file)
@@ -1,5 +1,5 @@
 {% load i18n %}
-{% url registration_activate activation_key as activation_key_url%}
+{% url 'registration_activate' activation_key as activation_key_url%}
 {% blocktrans with sitename=site.name siteurl=site.domain %}
 You (or someone pretending to be you) have asked to register an account at
 {{ sitename }}.  If this wasn't you, please ignore this email
index f8ceae746ca965f4f42912c46a9c3896f980329f..2fd6edb6619498414818a03a9018645ea90d95c1 100644 (file)
@@ -2,14 +2,14 @@
 {% load i18n %}
 {% block title %}{% trans "Login" %}{% endblock %}
 {% block content %}
-{% url auth_password_reset as auth_pwd_reset_url %}
-{% url registration_register as register_url%}
+{% url 'auth_password_reset' as auth_pwd_reset_url %}
+{% url 'registration_register' as register_url%}
 
 {% if form.errors %}
 <p>{% blocktrans %}Your username and password didn't match. Please try again.{% endblocktrans %}</p>
 {% endif %}
 
-<form method="post" action="{% url auth_login %}">{% csrf_token %}
+<form method="post" action="{% url 'auth_login' %}">{% csrf_token %}
 <table>
 <tr>
     <td>{% trans form.username.label_tag %}</td>
index c59f65a194f2fb12ce43c4ab43da8de146f2d435..287737fbaad4aac14fccef548d5e2c0ba00fc73e 100644 (file)
@@ -7,7 +7,7 @@ wish to reset your password, please ignore this message.
 To reset your password, please click the following link, or copy and paste it
 into your web browser:{% endblocktrans %}
 
-{{ protocol }}://{{ domain }}{% url auth_password_reset_confirm uid token %}
+{{ protocol }}://{{ domain }}{% url 'auth_password_reset_confirm' uid token %}
 
 {% blocktrans with username=user.username %}
 Your username, in case you've forgotten: {{ username }}
index d97564ceebd048213e84b71dd204787a1801d78a..858839369a34936a5f1ea7c2e05b23b9dedde1f6 100644 (file)
@@ -20,7 +20,7 @@ Service inscription<br>
 75006 Paris
 <br><br><br>
 
-<a href="{% url teleforma-registration-view username %}" class="component_icon button" id="action_green" target="_blank"><img src="/static/telemeta/images/download.png" alt="" style="vertical-align:middle" />&nbsp;{% trans "Download" %}</a>
+<a href="{% url 'teleforma-registration-view' username %}" class="component_icon button" id="action_green" target="_blank"><img src="/static/telemeta/images/download.png" alt="" style="vertical-align:middle" />&nbsp;{% trans "Download" %}</a>
 
 </center>
 </div>
index e14022617d05cd1cb96de86016db028c75f7d065..4d9e5e3fb0d82d871156f30146d9e2e10dbb5478 100644 (file)
 <div id="module-set-left" style="width: 20%">
 
 <div class="module">
-<h3><a href="{% url teleforma-home %}"><img src="/static/telemeta/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% trans "My courses" %}</a></h3>
+<h3><a href="{% url 'teleforma-home' %}"><img src="/static/telemeta/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% trans "My courses" %}</a></h3>
 <div style="background: white;">
 <ul>
 {% block courses %}
 {% for c in all_courses %}
   {% with c.course as course %}
-   <li><a href="{% url teleforma-annals-course course.id %}">{{ course.title }}</a></li>
+   <li><a href="{% url 'teleforma-annals-course' course.id %}">{{ course.title }}</a></li>
   {% endwith %}
  {% endfor %}
 {% endblock courses %}
@@ -33,7 +33,7 @@
                <ul>
                {% block iej %}
                {% for iej in iejs %}
-               <li><a href="{% url teleforma-annals-iej iej.id %}">{{ iej.name|lower|capfirst }}</a></li>
+               <li><a href="{% url 'teleforma-annals-iej' iej.id %}">{{ iej.name|lower|capfirst }}</a></li>
                {% endfor %}
                {% endblock iej %}
                </ul>
                                            <tbody>
                                                {% for doc in docs %}
                                                <tr>
-                                               <td {% if forloop.first %}class="border-top"{% endif %} width="50%">{% if doc.file %}<a href="{% url teleforma-document-view doc.id %}" target="_blank" title="{% trans "View" %}"><img src="/static//teleforma/images/application-msword.png" style="vertical-align:middle" alt="" />{% endif %} {{ doc.title }}{% if doc.file %}</a>{% endif %}</td>
+                                               <td {% if forloop.first %}class="border-top"{% endif %} width="50%">{% if doc.file %}<a href="{% url 'teleforma-document-view' doc.id %}" target="_blank" title="{% trans "View" %}"><img src="/static//teleforma/images/application-msword.png" style="vertical-align:middle" alt="" />{% endif %} {{ doc.title }}{% if doc.file %}</a>{% endif %}</td>
 
                                                        <td {% if forloop.first %}class="border-top"{% endif %} width="40%">{{ year }}</td>
 
-                                               <td {% if forloop.first %}class="border-top"{% endif %} width="10%" align="center">{% if doc.file %}<a href="{% url teleforma-document-download doc.id %}"><img src="/static/teleforma/images/download.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" /></a>{% endif %}</td>
+                                               <td {% if forloop.first %}class="border-top"{% endif %} width="10%" align="center">{% if doc.file %}<a href="{% url 'teleforma-document-download' doc.id %}"><img src="/static/teleforma/images/download.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" /></a>{% endif %}</td>
                                                </tr>
                                                {% endfor %}
                                            </tbody>
index 1231ad44d49a0fc8e83287fd752e9b6843dbe7c7..9c944bedcee63d799c15015eb417be863167d84f 100644 (file)
             </p>
 
             {% if ap_period.appointment.can_cancel %}
-                <form class="cancel_form" action="{% url teleforma-appointment-cancel %}" method="POST">
+                <form class="cancel_form" action="{% url 'teleforma-appointment-cancel' %}" method="POST">
                     {% csrf_token %}
                     <input type="hidden" name="period_id" value="{{ period_id }}"/>
                     <input type="hidden" name="appointment_id" value="{{ ap_period.appointment.id }}"/>
index 81d940f322967b8a5d1bb215b543869be0b37fae..41200c7bd6e3384d9fd6e0fe82cc66bf845a0874 100644 (file)
@@ -37,7 +37,7 @@
 </tr>
 {% for media in course.media.all %}
 <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-<td><a href="{% url telemeta-item-detail media.item.public_id %}">{{ media.item.title }}</a></td>
+<td><a href="{% url 'telemeta-item-detail' media.item.public_id %}">{{ media.item.title }}</a></td>
 <td>{{ media.item.description }}</td>
 <td>{{ media.date_added }}</td>
 </tr>
index 99a0c5273fd9153039c2d4ddaa15dbbed4ddacff..be1a10249d0480eebf855dde5a129f71943293ec 100644 (file)
@@ -10,7 +10,7 @@
     var conferenceUtils = {
         stop : function(id){
             json([id],'teleforma.stop_conference',function(){
-                location.href = '{% url teleforma-conference-record %}';
+                location.href = '{% url 'teleforma-conference-record' %}';
                 }
                 );
         }}
@@ -34,9 +34,9 @@
 
 <div class="course_title">
     <div style="float: right; font-size: 0.9em;">
-        <a href="{% url teleforma-conference-audio period.id conference.id %}" class="component_icon button icon_speaker">&nbsp;{% trans "Audio" %}</a>
+        <a href="{% url 'teleforma-conference-audio' period.id conference.id %}" class="component_icon button icon_speaker">&nbsp;{% trans "Audio" %}</a>
     </div>
-    <a href="{% url teleforma-desk-period-course period.id course.id %}" style="color: #000;">{{ course.title }}</a> - {{ type }} - {% trans "Session" %} {{ conference.session }}
+    <a href="{% url 'teleforma-desk-period-course' period.id course.id %}" style="color: #000;">{{ course.title }}</a> - {{ type }} - {% trans "Session" %} {{ conference.session }}
 </div>
 
 <div class="media">
 <dl class="listing">
 
 {% if conference.professor %}
-    <dt>{% trans "Course" %}</dt><dd><a href="{% url teleforma-desk-period-course period.id course.id %}">{{ conference.course.title }} - {{ conference.course_type }}</a></dd>
+    <dt>{% trans "Course" %}</dt><dd><a href="{% url 'teleforma-desk-period-course' period.id course.id %}">{{ conference.course.title }} - {{ conference.course_type }}</a></dd>
     <dt>{% trans "Session" %}</dt><dd>{{ conference.session }}</dd>
     <dt>{% trans "Professor" %}</dt>
-        <dd><a href="{% url telemeta-profile-detail conference.professor.user.username %}" target="_blank">{{ conference.professor }}</a></dd>
+        <dd><a href="{% url 'telemeta-profile-detail' conference.professor.user.username %}" target="_blank">{{ conference.professor }}</a></dd>
 {% endif %}
 
 {% if conference.comment %}<dt>{% trans "Comment" %}</dt><dd>{{ conference.comment }}</dd>{% endif %}
index bdd0648982e3af75196b817e4da99f6c2f752e1e..19783fa161075f5bdf6975e467606f93b60550c7 100644 (file)
@@ -8,7 +8,7 @@
     var conferenceUtils = {
         stop : function(id){
             json([id],'teleforma.conference_stop',function(){
-                location.href = '{% url teleforma-conference-record %}';});
+                location.href = '{% url 'teleforma-conference-record' %}';});
         }}
 
     jQuery(window).ready(function(){
@@ -33,7 +33,7 @@
 
 <div class="course_title">
     <div style="float: right; font-size: 0.9em;">
-        <a href="{% url teleforma-conference-detail period.id conference.id %}" class="component_icon button icon_clap">&nbsp;{% trans "Video" %}</a>
+        <a href="{% url 'teleforma-conference-detail' period.id conference.id %}" class="component_icon button icon_clap">&nbsp;{% trans "Video" %}</a>
     </div>
 
 {{ course.title }}{% if course.description %} - {{ course.description }}{% endif %} - {{ conference.session }} - {{ conference.professor }}
@@ -64,7 +64,7 @@
 <div class="course_content" id="media_infos">
 <dl class="listing">
 <dt>{% trans "Title" %}</dt><dd>{{ conference.course.title }}</dd>
-<dt>{% trans "Professor" %}</dt><dd><a href="{% url telemeta-profile-detail conference.professor.user.username %}" target="_blank">{{ conference.professor }}</a></dd>
+<dt>{% trans "Professor" %}</dt><dd><a href="{% url 'telemeta-profile-detail' conference.professor.user.username %}" target="_blank">{{ conference.professor }}</a></dd>
 <dt>{% trans "Session" %}</dt><dd>{{ conference.session }}</dd>
 <dt>{% trans "Room" %}</dt><dd>{{ conference.room }}</dd>
 <dt>{% trans "Begin" %}</dt><dd>{{ conference.date_begin }}</dd>
index 25effad977dd9b70ce4a8edcc07e272dc214c422..7e913cb9682c3118c687c60c369cb72ea62d6dc4 100644 (file)
@@ -16,7 +16,7 @@ jQuery(window).ready(function(){
 
 <script type="text/javascript">
 $(document).ready(function(){
-    InitChatWindow("{% url jqchat_ajax room.id %}", null);
+    InitChatWindow("{% url 'jqchat_ajax' room.id %}", null);
     });
 </script>
 
index af1ba6e57526c3ebfa1af2b75966739f23b35aae..13d0aabf8fd70b18dddfea2c1b800428cc554365 100644 (file)
@@ -5,7 +5,7 @@
 {% block extra_javascript %}
 <script type="text/javascript">
 $(document).ready(function(){
-    InitChatWindow("{% url jqchat_ajax room.id %}", null);
+    InitChatWindow("{% url 'jqchat_ajax' room.id %}", null);
     });
 </script>
 {% endblock extra_javascript %}
@@ -13,7 +13,7 @@ $(document).ready(function(){
 {% block courses %}
 {% for c in all_courses %}
   {% with c.course as course %}
-   <li><a href="{% url teleforma-desk-period-course period.id course.id %}">{{ course.title }}</a></li>
+   <li><a href="{% url 'teleforma-desk-period-course' period.id course.id %}">{{ course.title }}</a></li>
   {% endwith %}
  {% endfor %}
 {% endblock courses %}
@@ -39,7 +39,7 @@ $(document).ready(function(){
               <table class="listing" width="100%">
                   <tbody>
                   {% for quiz in course.quiz.all %}
-                  <td class="border-top"><a href="{% url quiz_start_page slug=quiz.url %}">{{quiz.title}}</a></td>
+                  <td class="border-top"><a href="{% url 'quiz_start_page' slug=quiz.url %}">{{quiz.title}}</a></td>
                   <td class="border-top">{{quiz.description}}</td>
                   {% endfor %}
                   </tbody>
index 03ae235578ffe48e65b63105daf02d30b9f0a4f3..805dd527a617451059e96ff61007f5ec8a7e8cd0 100644 (file)
@@ -7,7 +7,7 @@
 
 <script type="text/javascript">
 $(document).ready(function(){
-    InitChatWindow("{% url jqchat_ajax room.id %}", null);
+    InitChatWindow("{% url 'jqchat_ajax' room.id %}", null);
     });
 </script>
 
@@ -23,7 +23,7 @@ $(document).ready(function(){
 //
 // Fetch the PDF document from the URL using promices
 //
-PDFJS.getDocument('{% url teleforma-document-download document.id %}').then(function(pdf) {
+PDFJS.getDocument('{% url 'teleforma-document-download' document.id %}').then(function(pdf) {
   // Using promise to fetch the page
   pdf.getPage(1).then(function(page) {
     var scale = 1.5;
index 9feada4e9b97cdba7c0baa5c0cb3f5531065753d..928bb6a913dbcba4a0b26020bbb36e486edd0a10 100644 (file)
@@ -13,7 +13,7 @@
 
 <script type="text/javascript">
 $(document).ready(function(){
-    InitChatWindow("{% url jqchat_ajax room.id %}", null);
+    InitChatWindow("{% url 'jqchat_ajax' room.id %}", null);
     $('#my_video_1').bind('contextmenu',function() { return false; });
     });
 </script>
@@ -61,7 +61,7 @@ $(document).ready(function(){
 {% if media.item.file and media.is_published or user.is_superuser or user.is_staff %}
  {% if not "video" in media.mime_type or perms.telemeta.can_play_all_items or request.user_agent.os.family == 'iOS' %}
   <div class="module_action">
-   <a href="{% url teleforma-media-download period.id media.id %}" class="component_icon button" id="action_red"><img src="/static/teleforma/images/download_media.png" alt="" style="vertical-align:middle" />&nbsp;{% trans "Download" %}</a>
+   <a href="{% url 'teleforma-media-download' period.id media.id %}" class="component_icon button" id="action_red"><img src="/static/teleforma/images/download_media.png" alt="" style="vertical-align:middle" />&nbsp;{% trans "Download" %}</a>
   </div>
  {% endif %}
 {% endif %}
@@ -73,17 +73,17 @@ $(document).ready(function(){
 <div class="course_title">
     <div style="float: right; font-size: 0.9em;">
         {% if "video" in media.mime_type %}
-        <a href="{% url teleforma-media-detail period.id media|get_audio_id %}" class="component_icon button icon_speaker">&nbsp;{% trans "Audio" %}</a>
+        <a href="{% url 'teleforma-media-detail' period.id media|get_audio_id %}" class="component_icon button icon_speaker">&nbsp;{% trans "Audio" %}</a>
         {% endif %}
         {% if "audio" in media.mime_type %}
-        <a href="{% url teleforma-media-detail period.id media|get_video_id %}" class="component_icon button icon_clap">&nbsp;{% trans "Video" %}</a>
+        <a href="{% url 'teleforma-media-detail' period.id media|get_video_id %}" class="component_icon button icon_clap">&nbsp;{% trans "Video" %}</a>
         {% endif %}
         {% if user.is_staff %}
         <a id="publish" href="#" class="{% if media.is_published %}component_icon button icon_ok{% else %}component_icon button icon_delete{% endif %}">{% if media.is_published %}{% trans " published" %}{% else %}{% trans " rejected" %}{% endif %}</a>
         {% endif %}
     </div>
 
-    <a href="{% url teleforma-desk-period-course period.id course.id %}">{{ course.title }} - {{ type }}{% if media.conference.session %} - {% trans "Session" %} {{ media.conference.session }}{% endif %}</a>
+    <a href="{% url 'teleforma-desk-period-course' period.id course.id %}">{{ course.title }} - {{ type }}{% if media.conference.session %} - {% trans "Session" %} {{ media.conference.session }}{% endif %}</a>
 
 </div>
 
@@ -97,7 +97,7 @@ $(document).ready(function(){
 {% if "video" in media.mime_type %}
 <div class="video">
     <video id="my_video_1" class="video-js vjs-default-skin" width="864" height="480" controls preload="auto" data-setup='{}' {% if media.item.related.all %}{% for related in media.item.related.all %}{% if related.title == "preview" %}{% thumbnail related.file "640" as im %}poster="{{ im.url }}"{% endthumbnail %}{% endif %}{% endfor %}{% endif %}>
-        <source src="{% url teleforma-media-stream period.id media.id %}" type="{{ media.mime_type }}" />
+        <source src="{% url 'teleforma-media-stream' period.id media.id %}" type="{{ media.mime_type }}" />
     </video>
 </div>
 
@@ -121,7 +121,7 @@ $(document).ready(function(){
 </div>
 <div class="audio">
     <audio controls preload="auto">
-        <source src="{% url teleforma-media-stream period.id media.id %}" type="{{ media.mime_type }}" />
+        <source src="{% url 'teleforma-media-stream' period.id media.id %}" type="{{ media.mime_type }}" />
     </audio>
 </div>
 {% endif %}
@@ -134,11 +134,11 @@ $(document).ready(function(){
 <dl class="listing">
 
 {% if media.conference %}
-<dt>{% trans "Course" %}</dt><dd><a href="{% url teleforma-desk-period-course period.id course.id %}">{{ media.course.title }} - {{ media.course_type }}</a></dd>
+<dt>{% trans "Course" %}</dt><dd><a href="{% url 'teleforma-desk-period-course' period.id course.id %}">{{ media.course.title }} - {{ media.course_type }}</a></dd>
 <dt>{% trans "Session" %}</dt><dd>{{ media.conference.session }}</dd>
 {% if media.conference.professor %}
 <dt>{% trans "Professor" %}</dt>
-    <dd><a href="{% url telemeta-profile-detail media.conference.professor.user.username %}" target="_blank">{{ media.conference.professor }}</a></dd>
+    <dd><a href="{% url 'telemeta-profile-detail' media.conference.professor.user.username %}" target="_blank">{{ media.conference.professor }}</a></dd>
 {% endif %}
 {% if media.conference.comment %}<dt>{% trans "Comment" %}</dt><dd>{{ media.conference.comment }}</dd>{% endif %}
 <dt>{% trans "Begin date" %}</dt><dd>{{ media.conference.date_begin }}</dd>
index 97e90c65d1c9d6d563179507e32ec37e15906a3d..d58826c9f40c606b68a1abcf9b62339fc59ef7e7 100644 (file)
 <dl class="listing">
 
 {% if media.conference %}
-<dt>{% trans "Course" %}</dt><dd><a href="{% url teleforma-desk-period-course period.id course.id %}">{{ media.course.title }} - {{ media.course_type }}</a></dd>
+<dt>{% trans "Course" %}</dt><dd><a href="{% url 'teleforma-desk-period-course' period.id course.id %}">{{ media.course.title }} - {{ media.course_type }}</a></dd>
 <dt>{% trans "Session" %}</dt><dd>{{ media.conference.session }}</dd>
 {% if media.conference.professor %}
 <dt>{% trans "Professor" %}</dt>
-    <dd><a href="{% url telemeta-profile-detail media.conference.professor.user.username %}" target="_blank">{{ media.conference.professor }}</a></dd>
+    <dd><a href="{% url 'telemeta-profile-detail' media.conference.professor.user.username %}" target="_blank">{{ media.conference.professor }}</a></dd>
 {% endif %}
 {% if media.conference.comment %}<dt>{% trans "Comment" %}</dt><dd>{{ media.conference.comment }}</dd>{% endif %}
 <dt>{% trans "Begin date" %}</dt><dd>{{ media.conference.date_begin }}</dd>
index 5ee3435aa4fc9d29f345ecf551554faa7206928e..30dbdcc6705d7835be091da8aeca7b7490a24e63 100644 (file)
@@ -8,7 +8,7 @@
 {% block extra_javascript %}
 <script type="text/javascript">
 $(document).ready(function(){
-    InitChatWindow("{% url jqchat_ajax room.id %}", null);
+    InitChatWindow("{% url 'jqchat_ajax' room.id %}", null);
     });
 </script>
 {% endblock extra_javascript %}
@@ -27,7 +27,7 @@ $(document).ready(function(){
 {% block courses %}
 {% for c in all_courses %}
   {% with c.course as course %}
-   <li><a href="{% url teleforma-desk-period-course period.id course.id %}">{{ course.title }}</a></li>
+   <li><a href="{% url 'teleforma-desk-period-course' period.id course.id %}">{{ course.title }}</a></li>
   {% endwith %}
  {% endfor %}
 {% endblock courses %}
@@ -40,13 +40,13 @@ $(document).ready(function(){
 {% get_telecaster as telecaster %}
 {%  if telecaster %}
 <div class="module_action">
-<a href="{% url teleforma-conference-record %}" class="component_icon button" id="action_red">{% trans "New conference" %}</a>
+<a href="{% url 'teleforma-conference-record' %}" class="component_icon button" id="action_red">{% trans "New conference" %}</a>
 </div>
 {% endif %}
 
 {% if user.is_staff %}
 <div class="module_action">
-<a href="{% url teleforma-desk-period-pending period.id %}" class="component_icon button" id="action_red">{% trans "Pending" %}</a>
+<a href="{% url 'teleforma-desk-period-pending' period.id %}" class="component_icon button" id="action_red">{% trans "Pending" %}</a>
 </div>
 {% endif %}
 
@@ -78,7 +78,7 @@ $(document).ready(function(){
 
     {% if hasAppointment %}
         <div class="appointment">
-            <a href="{% url teleforma-appointments period.id %}"><button>Rendez-vous individuels aux simulations du grand-oral</button></a>
+            <a href="{% url 'teleforma-appointments' period.id %}"><button>Rendez-vous individuels aux simulations du grand-oral</button></a>
         </div>
         <br/>
     {% endif %}
@@ -90,7 +90,7 @@ $(document).ready(function(){
     {% if home_video.type == 'webm' %}
     <h3>{% if home_video.title %}{{ home_video.title }}{% else %}{{ home_video.course.title }}{% endif %}</h3>
         <div class="video" style="width:400px">
-         <a href="{% url teleforma-media-detail period.id home_video.id %}" title="{% trans "Play" %}">
+         <a href="{% url 'teleforma-media-detail' period.id home_video.id %}" title="{% trans "Play" %}">
           {% if home_video.item.related.all %}
              {% for related in home_video.item.related.all %}
               {% if related.title == "preview" %}
@@ -113,7 +113,7 @@ $(document).ready(function(){
       {% for type in c.types %}
       <div class="course">
         <div class="course_title">
-         <a href="{% url teleforma-desk-period-course period.id course.id %}">{{ course.title }} - {{ type }}{% if course.description %} - {{ course.description }}{% endif %}</a>
+         <a href="{% url 'teleforma-desk-period-course' period.id course.id %}">{{ course.title }} - {{ type }}{% if course.description %} - {{ course.description }}{% endif %}</a>
         </div>
 
         {% if show_media %}
index 9a7f52766d8928d9b0cc7c8cb59b1a159acbc955..e45e76f5e71bb0d5c5d68aed4f44ac9ba8975225 100644 (file)
@@ -14,7 +14,7 @@
       {% for type in c.types %}
       <div class="course">
         <div class="course_title">
-         <a href="{% url teleforma-desk-period-course period.id course.id %}">{{ course.title }} - {{ type }}{% if course.description %} - {{ course.description }}{% endif %}</a>
+         <a href="{% url 'teleforma-desk-period-course' period.id course.id %}">{{ course.title }} - {{ type }}{% if course.description %} - {{ course.description }}{% endif %}</a>
         </div>
 
         {% block media %}
index 8979649f24e7eceac80cf40445154236d7f5d019..583dae025b876dd5362af1a13091139cf06648d8 100644 (file)
@@ -15,7 +15,7 @@
             <tr>
             {% if stream.streaming %}
             <td {% if forloop.first %}class="border-top"{% endif %} width="230px">
-               <a href="{% url teleforma-conference-detail period.id stream.conference.id %}" title="{% trans "View" %}">
+               <a href="{% url 'teleforma-conference-detail' period.id stream.conference.id %}" title="{% trans "View" %}">
                <img id="snapshot-{{ stream.course.code }}-{{ stream.course_type }}" src="{{ stream.snapshot_url }}" width="100%" alt="{% trans 'Click here' %}" />
                </a>
             </td>
@@ -25,7 +25,7 @@
                     <dt>{% trans "Title" %}</dt><dd>{{ stream.conference.course.title }}</dd>
                     <dt>{% trans "Session" %}</dt><dd>{{ stream.conference.session }}</dd>
                     {% if stream.conference.professor.user.username %}
-                    <dt>{% trans "Professor" %}</dt><dd><a href="{% url telemeta-profile-detail stream.conference.professor.user.username %}" target="_blank">{{ stream.conference.professor }}</a></dd>
+                    <dt>{% trans "Professor" %}</dt><dd><a href="{% url 'telemeta-profile-detail' stream.conference.professor.user.username %}" target="_blank">{{ stream.conference.professor }}</a></dd>
                     {% endif %}
                     <dt>{% trans "Begin" %}</dt><dd>{{ stream.conference.date_begin }}</dd>
                     </dl>
index 3b84f3c6502bd72d66b36af2fb341086a95f3204..7971f89a38840ad79078093921c1d5fe988ed3d5 100644 (file)
@@ -17,9 +17,9 @@
         {% if doc.course_type.all|length > 1 and type_counter > 1 %}
         {% else %}
         <tr>
-        <td {% if forloop.first %}class="border-top"{% endif %} width="60%">{% if doc.file %}<a href="{% url teleforma-document-view doc.id %}" target="_blank" title="{% trans "View" %}"><img src="/static//teleforma/images/application-msword.png" style="vertical-align:middle" alt="" />{% endif %} {{ doc.title }}{% if doc.file %}</a>{% endif %}</td>
+        <td {% if forloop.first %}class="border-top"{% endif %} width="60%">{% if doc.file %}<a href="{% url 'teleforma-document-view' doc.id %}" target="_blank" title="{% trans "View" %}"><img src="/static//teleforma/images/application-msword.png" style="vertical-align:middle" alt="" />{% endif %} {{ doc.title }}{% if doc.file %}</a>{% endif %}</td>
         <td {% if forloop.first %}class="border-top"{% endif %} width="35%">{{ doc.date_added }}</td>
-        <td {% if forloop.first %}class="border-top"{% endif %} width="5%" align="center">{% if doc.file %}<a href="{% url teleforma-document-download doc.id %}"><img src="/static/teleforma/images/download.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" /></a>{% endif %}</td>
+        <td {% if forloop.first %}class="border-top"{% endif %} width="5%" align="center">{% if doc.file %}<a href="{% url 'teleforma-document-download' doc.id %}"><img src="/static/teleforma/images/download.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" /></a>{% endif %}</td>
         </tr>
         {% endif %}
     {% endfor %}
index 346bcfd53ec37353380c50df596e9e4c9e5589c5..59d0e1565e39432959c964b78a28c795638c0bf1 100644 (file)
@@ -14,7 +14,7 @@
           {% if media.type == 'webm' %}
             <tr>
             <td {% if forloop.first %}class="border-top"{% endif %} width="230px" style="vertical-align:middle">
-            <a href="{% url teleforma-media-detail period.id media.id %}" title="{% trans "Play" %}">
+            <a href="{% url 'teleforma-media-detail' period.id media.id %}" title="{% trans "Play" %}">
             {% if media.item.related.all %}
              {% for related in media.item.related.all %}
               {% if related.title == "preview" %}
@@ -36,7 +36,7 @@
                     <dt>{% trans "Title" %}</dt><dd>{{ media.conference.course.title }}</dd>
                     <dt>{% trans "Session" %}</dt><dd>{{ media.conference.session }}</dd>
                     {% if media.conference.professor %}
-                    <dt>{% trans "Professor" %}</dt><dd><a href="{% url telemeta-profile-detail media.conference.professor.user.username %}" target="_blank">{{ media.conference.professor }}</a></dd>
+                    <dt>{% trans "Professor" %}</dt><dd><a href="{% url 'telemeta-profile-detail' media.conference.professor.user.username %}" target="_blank">{{ media.conference.professor }}</a></dd>
                     {% endif %}
                     <dt>{% trans "Begin" %}</dt><dd>{{ media.conference.date_begin }}</dd>
                     {% if media.conference.comment %}
@@ -53,7 +53,7 @@
             {% endif %}
             {% if media.item.file and media.is_published or user.is_superuser or user.is_staff %}
                 {% if not "video" in media.mime_type or perms.telemeta.can_play_all_items or request.user_agent.os.family == 'iOS' %}
-                    <a href="{% url teleforma-media-download period.id media.id %}">
+                    <a href="{% url 'teleforma-media-download' period.id media.id %}">
                         <img src="/static/teleforma/images/download_media.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" />
                     </a>
                 {% endif %}
index 8bc5d11b7aab46f2da98f33d64cf2a3cfff4e7b9..7c4c6fbf4283a283581d84f7351db1b73431e524 100644 (file)
@@ -14,7 +14,7 @@
           {% if media.type == 'webm' %}
             <tr>
             <td {% if forloop.first %}class="border-top"{% endif %} width="230px" style="vertical-align:middle">
-            <a href="{% url teleforma-media-detail period.id media.id %}" title="{% trans "Play" %}">
+            <a href="{% url 'teleforma-media-detail' period.id media.id %}" title="{% trans "Play" %}">
             {% if media.item.related.all %}
              {% for related in media.item.related.all %}
               {% if related.title == "preview" %}
@@ -36,7 +36,7 @@
                     <dt>{% trans "Title" %}</dt><dd>{{ media.conference.course.title }}</dd>
                     <dt>{% trans "Session" %}</dt><dd>{{ media.conference.session }}</dd>
                     {% if media.conference.professor %}
-                    <dt>{% trans "Professor" %}</dt><dd><a href="{% url telemeta-profile-detail media.conference.professor.user.username %}" target="_blank">{{ media.conference.professor }}</a></dd>
+                    <dt>{% trans "Professor" %}</dt><dd><a href="{% url 'telemeta-profile-detail' media.conference.professor.user.username %}" target="_blank">{{ media.conference.professor }}</a></dd>
                     {% endif %}
                     <dt>{% trans "Begin" %}</dt><dd>{{ media.conference.date_begin }}</dd>
                     {% if media.conference.comment %}
index 1c8a43efe7902b674fade810a9b5745a477839f0..7f4692d4d9cf9ba9c001c966aca2c31e99d52d45 100644 (file)
@@ -7,13 +7,13 @@
         <ul class="actions">
                {% if newsitem.can_edit %}
                <li>
-                       <a href="{% url newsitem-update pk=newsitem.id %}?period_id={{ period_id }}"><img src="{% static 'teleforma/images/pencil-edit-button.png' %}" alt="éditer"/>
+                       <a href="{% url 'newsitem-update' pk=newsitem.id %}?period_id={{ period_id }}"><img src="{% static 'teleforma/images/pencil-edit-button.png' %}" alt="éditer"/>
 </a>
                </li>
                {% endif %}
                {% if newsitem.can_delete %}
                <li>
-                       <a href="{% url newsitem-delete pk=newsitem.id %}?period_id={{ period_id }}"><img src="{% static 'teleforma/images/rubbish-bin-delete-button.png' %}" alt="supprimer"/></a>
+                       <a href="{% url 'newsitem-delete' pk=newsitem.id %}?period_id={{ period_id }}"><img src="{% static 'teleforma/images/rubbish-bin-delete-button.png' %}" alt="supprimer"/></a>
                </li>
                {% endif %}
         </ul>          
index ce862d28057527e8aebd5a8f377e0655f912dc28..8c203bf9db2bf09acd84eacc2b426cddd828f66f 100644 (file)
@@ -7,10 +7,10 @@
     <h3><img src="{% static 'teleforma/images/actus.png' %}" alt="actualités"/>Actualités</h3>
     <ul>
         <li><a href="#news_local">{{ course.title_tweeter }}</a>
-            {% if can_add %}<a href="{% url newsitem-create %}?course_id={{course.id}}&period_id={{period_id}}">+</a>{% endif %}
+            {% if can_add %}<a href="{% url 'newsitem-create' %}?course_id={{course.id}}&period_id={{period_id}}">+</a>{% endif %}
         </li>
         <li><a href="#news_global">Générales</a>
-            {% if can_add %}<a href="{% url newsitem-create %}?period_id={{period_id}}">+</a>{% endif %}
+            {% if can_add %}<a href="{% url 'newsitem-create' %}?period_id={{period_id}}">+</a>{% endif %}
         </li>
     </ul>
     <div id="news_local">
@@ -19,7 +19,7 @@
         </section>
 {#        {% if course_newsitems|length >= 5 %}#}
 {#        <footer>#}
-{#            <a href="{% url newsitem-list %}?course_id={{ course.id }}">Voir plus</a>#}
+{#            <a href="{% url 'newsitem-list' %}?course_id={{ course.id }}">Voir plus</a>#}
 {#        </footer>#}
 {#        {% endif %}#}
     </div>
@@ -29,7 +29,7 @@
         </section>
 {#        {% if all_newsitems|length >= 5 %}#}
 {#        <footer>#}
-{#            <a href="{% url newsitem-list period_id=period_id %}">Voir plus</a>#}
+{#            <a href="{% url 'newsitem-list' period_id=period_id %}">Voir plus</a>#}
 {#        </footer>#}
 {#        {% endif %}#}
     </div>
index d5bd6a2b6de4e3e44cc84e424c9e395f8b3eba70..e3dce9825c28d2f719e07a8129697812ddf60987 100644 (file)
         <div class="pagination">
             <span class="page-links">
                 {% if page_obj.has_previous %}
-                    <a href="{% url newsitem-list period_id=period_id %}?page={{ page_obj.previous_page_number }}&course_id={{ course_id }}">Précédent</a>
+                    <a href="{% url 'newsitem-list' period_id=period_id %}?page={{ page_obj.previous_page_number }}&course_id={{ course_id }}">Précédent</a>
                 {% endif %}
                 <span class="page-current">
                     Page {{ page_obj.number }} sur {{ page_obj.paginator.num_pages }}
                 </span>
                 {% if page_obj.has_next %}
-                    <a href="{% url newsitem-list period_id=period_id %}?page={{ page_obj.next_page_number }}&course_id={{ course_id }}">Suivant</a>
+                    <a href="{% url 'newsitem-list' period_id=period_id %}?page={{ page_obj.next_page_number }}&course_id={{ course_id }}">Suivant</a>
                 {% endif %}
             </span>
         </div>
index 80487b4c3f1761b3c09d349cd59b9e8d746f915b..5339d3bdb8ed8ad5a043056e3f94fea5601a9b96 100644 (file)
@@ -38,7 +38,7 @@
 {% block extra_stylesheets %}{% endblock %}
 
 {% block javascript %}
-<script src="{% url django.views.i18n.javascript_catalog %}" type="text/javascript"></script>
+<script src="{% url 'django.views.i18n.javascript_catalog' %}" type="text/javascript"></script>
 <script src="/static/teleforma/js/jquery-1.6.min.js" type="text/javascript"></script>
 <script src="/static/teleforma/js/jquery-ui.js" type="text/javascript"></script>
 <script src="/static/teleforma/js/jquery.expander.min.js" type="text/javascript"></script>
@@ -94,13 +94,13 @@ alt="logo" />
     <li><a href="#desk#" class="red">&nbsp;{% trans "Desk" %}&nbsp;</a>
       <ul>
        {% for period in periods %}
-        <li><a href="{% url teleforma-desk-period-list period.id %}" class="red">{{ period.name }}</a></li>
+        <li><a href="{% url 'teleforma-desk-period-list' period.id %}" class="red">{{ period.name }}</a></li>
        {% endfor %}
       </ul>
     </li>
   {% else %}
   {% with periods.0 as period %}
-   <li><a href="{% url teleforma-desk-period-list period.id %}" class="red">{% trans "Desk" %}</a></li>
+   <li><a href="{% url 'teleforma-desk-period-list' period.id %}" class="red">{% trans "Desk" %}</a></li>
   {% endwith %}
   {% endif %}
 
@@ -110,12 +110,12 @@ alt="logo" />
 
  {% if user.is_authenticated %}
 
- <li><a href="{% url postman_inbox %}" class="orange">{% trans "Messaging" %}{% if postman_unread_count %} ({{ postman_unread_count }}){% endif %}</a></li>
+ <li><a href="{% url 'postman_inbox' %}" class="orange">{% trans "Messaging" %}{% if postman_unread_count %} ({{ postman_unread_count }}){% endif %}</a></li>
 
-  <li><a href="{% url teleforma-annals %}" class="yellow">{% trans "Annals" %}</a></li>
+  <li><a href="{% url 'teleforma-annals' %}" class="yellow">{% trans "Annals" %}</a></li>
 
   {% if periods|length == 1 %}
-      <li><a href="{% url teleforma-exam-scripts-pending periods.0.id %}" class="green">&nbsp;{% trans "Scripts" %}
+      <li><a href="{% url 'teleforma-exam-scripts-pending' periods.0.id %}" class="green">&nbsp;{% trans "Scripts" %}
       {% if user.is_staff or user.quotas.all %}{% untreated_scripts_count user periods.0.id %}
      {% else %}{% treated_scripts_count user periods.0.id %}{% endif %}</a>
      </li>
@@ -125,19 +125,19 @@ alt="logo" />
      {% else %}{% treated_scripts_count user periods.0.id %}{% endif %}</a>
       <ul>
        {% for period in periods %}
-        <li><a href="{% url teleforma-exam-scripts-pending period.id %}" class="green">{{ period.name }}</a></li>
+        <li><a href="{% url 'teleforma-exam-scripts-pending' period.id %}" class="green">{{ period.name }}</a></li>
        {% endfor %}
       </ul>
     </li>
   {% endif %}
 
   {% if periods|length == 1 %}
-      <li><a href="{% url teleforma-exam-scripts-scores-all periods.0.id %}" class="green">&nbsp;{% trans "Scores" %}</a></li>
+      <li><a href="{% url 'teleforma-exam-scripts-scores-all' periods.0.id %}" class="green">&nbsp;{% trans "Scores" %}</a></li>
   {% else %}
     <li><a href="#scores#" class="green">&nbsp;{% trans "Scores" %}</a>
       <ul>
         {% for period in periods %}
-        <li><a href="{% url teleforma-exam-scripts-scores-all period.id %}" class="green">{{ period.name }}</a></li>
+        <li><a href="{% url 'teleforma-exam-scripts-scores-all' period.id %}" class="green">{{ period.name }}</a></li>
         {% endfor %}
       </ul>
     </li>
@@ -147,18 +147,18 @@ alt="logo" />
   {% if user.is_superuser %}
   <li><a href="/admin/django/" target="_blank" class="blue">{% trans "Admin" %}</a></li>
   {% else %}
-   <li><a href="{% url teleforma-help %}" class="blue">{% trans "Help" %}</a></li>
+   <li><a href="{% url 'teleforma-help' %}" class="blue">{% trans "Help" %}</a></li>
  {% endif %}
 
  <li style="a.active{background-image:/static/telemeta/images/user_tr_bk.png; background-repeat: no-repeat; background-position: 1ex .5ex;}">
     <a href="#accounts#" class="blue">{% if user.first_name and user.last_name %}{{ user.first_name }} {{ user.last_name }}{% else %}{{ user.username }}{% endif %}</a>
     <ul>
-    <li><a href="{% url telemeta-profile-detail user.username %}" class="yellow">{% trans "Profile" %}</a></li>
+    <li><a href="{% url 'telemeta-profile-detail' user.username %}" class="yellow">{% trans "Profile" %}</a></li>
     {% if user.is_staff %}
-    <li><a href="{% url telemeta-desk-lists %}">{% trans "Lists" %}</a></li>
-    <li><a href="{% url teleforma-help %}">{% trans "Help" %}</a></li>
+    <li><a href="{% url 'telemeta-desk-lists' %}">{% trans "Lists" %}</a></li>
+    <li><a href="{% url 'teleforma-help' %}">{% trans "Help" %}</a></li>
     {% endif %}
-    <li><a href="{% url telemeta-logout %}">{% trans "Sign out" %}</a></li>
+    <li><a href="{% url 'telemeta-logout' %}">{% trans "Sign out" %}</a></li>
     </ul>
  </li>
 
@@ -210,7 +210,7 @@ alt="logo" />
    <td>
     <p class="right">
     Copyright &copy; {% current_year %} {% organization %} |
-    <a href="{% url telemeta-flatpage "legal_notices" %}">{% trans "Legal notices" %}</a>
+    <a href="{% url 'telemeta-flatpage' "legal_notices" %}">{% trans "Legal notices" %}</a>
     </p>
    </td>
   </tr>
index 45945c03366bd4222b53ced2e39dad1063ff1aba..47fd6fe1c822d68c4fea24599dfceb0d6cb60cf2 100644 (file)
@@ -23,7 +23,7 @@
 {{ page_content|render_flatpage }}
 </div>
 
-<a href="{% url telemeta-login %}" class="component_icon button" id="action_red">{% trans "Connexion" %}</a>
+<a href="{% url 'telemeta-login' %}" class="component_icon button" id="action_red">{% trans "Connexion" %}</a>
 
 </div>
 {% endblock %}
index f5bc9fb912f5de62b2f756229cbd5f5bcb0a9797..2353b2b22200abc1871444c4f8c71e48cc21e382 100644 (file)
@@ -4,10 +4,10 @@
    <div class="module">
 
     {% block rss_title %}
-      <a href="{% url telemeta-rss %}">
+      <a href="{% url 'telemeta-rss' %}">
       <img src="/static/telemeta/images/rss.png" alt="rss" style="vertical-align:middle" />
       <h3>{% trans title %}</h3></a>
-      <a href="{% url telemeta-rss %}" style="float:right" class="icon_rss">&nbsp;&nbsp;</a>
+      <a href="{% url 'telemeta-rss' %}" style="float:right" class="icon_rss">&nbsp;&nbsp;</a>
     {% endblock rss_title %}
 
     <div class="vscroll">
         <td>
         {% if r.element %}
             {% if r.revision.element_type == "corpus" or r.revision.element_type == "fonds"%}
-            <a href="{% url telemeta-resource-detail r.revision.element_type r.element.public_id %}">{{ r.element.title }}</a>
+            <a href="{% url 'telemeta-resource-detail' r.revision.element_type r.element.public_id %}">{{ r.element.title }}</a>
             {% endif %}
             {% if r.revision.element_type == "collection" %}
-            <a href="{% url telemeta-collection-detail r.element.public_id %}">{{ r.element.title }}</a>
+            <a href="{% url 'telemeta-collection-detail' r.element.public_id %}">{{ r.element.title }}</a>
             {% endif %}
             {% if r.revision.element_type == "item" %}
-            <a href="{% url telemeta-item-detail r.element.public_id %}">
+            <a href="{% url 'telemeta-item-detail' r.element.public_id %}">
             {% if r.element.title != '' %}{{ r.element.title }}{% else %}{{ r.element.collection.title }} - {{ r.element.track }}{% endif %}</a>
             {% endif %}
             {% if r.revision.element_type == "marker" %}
-            <a href="{% url telemeta-item-detail-marker r.element.public_id %}">{{ r.element.title }}</a>
+            <a href="{% url 'telemeta-item-detail-marker' r.element.public_id %}">{{ r.element.title }}</a>
             {% endif %}
         {% else %}
             {% trans "deleted" %}
         {% endif %}
         </td>
         <td>{{ r.revision.element_type }}</td>
-        <td>{% if r.revision.user %}<a href="{% url telemeta-profile-detail r.revision.user.username %}">{{ r.revision.user.username }}</a>{% endif %}</td>
+        <td>{% if r.revision.user %}<a href="{% url 'telemeta-profile-detail' r.revision.user.username %}">{{ r.revision.user.username }}</a>{% endif %}</td>
       </tr>
     {% endfor %}
     </table>
index abd74306c2dc651cf510a1d2c022578397ebc4ba..20bbe7dd5f598905d79d6726f2266fde038bcba3 100644 (file)
@@ -13,7 +13,7 @@
       </tr>
     {% for s in searches %}
      <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
-        <td><a href="{% url telemeta-search-items %}?{{s.criteria.all|build_pattern_string|build_query_string}}">
+        <td><a href="{% url 'telemeta-search-items' %}?{{s.criteria.all|build_pattern_string|build_query_string}}">
             {% for c in s.criteria.all %}
                 <li>{% trans c.key %} : {{ c.value}}</li>
             {% endfor %}
index 90ce33c0c158662795314e1d8c82f1dec85f58db..669cd9ddefdcbbc034802f8b252a2db151f2e7e1 100644 (file)
@@ -3,9 +3,9 @@
 {% load i18n %}
 
 {% block rss_title %}
-<a href="{% url telemeta-user-rss user.username %}">
+<a href="{% url 'telemeta-user-rss' user.username %}">
 <img src="/static/telemeta/images/rss.png" alt="rss" style="vertical-align:middle" />
 <h3>{% trans title %}</h3></a>
-<a href="{% url telemeta-user-rss user.username %}" style="float:right" class="icon_rss">&nbsp;&nbsp;</a>
+<a href="{% url 'telemeta-user-rss' user.username %}" style="float:right" class="icon_rss">&nbsp;&nbsp;</a>
 {% endblock rss_title %}
 
index e91ee306b2ad5f9e59b14c61eefe5e6cd8fe01c9..cb36f5486ce68f881cd20f3613fc5c71a2b64f42 100644 (file)
@@ -32,8 +32,8 @@
     <tbody id="spacing">
     {% for user in page.object_list %}
     <tr>
-     <td><a href="{% url teleforma-profile-detail user.username %}">{{ user.last_name }}</a></td>
-     <td><a href="{% url teleforma-profile-detail user.username %}">{{ user.first_name }}</a></td>
+     <td><a href="{% url 'teleforma-profile-detail' user.username %}">{{ user.last_name }}</a></td>
+     <td><a href="{% url 'teleforma-profile-detail' user.username %}">{{ user.first_name }}</a></td>
 
      {% if user.student.get %}
       {% with user.student.get as student %}
@@ -70,7 +70,7 @@
         <td></td>
         <td></td>
     {%  endif %}
-    <td><a href="{% url postman_write user.username %}" class="component_icon button" id="action_orange">{% trans "Message" %}</a></td>
+    <td><a href="{% url 'postman_write' user.username %}" class="component_icon button" id="action_orange">{% trans "Message" %}</a></td>
     </tr>
     {% endfor %}
     </tbody>
index f53c257ff2b2f4a022010c1a0c19b49c00987adb..9558d8e2cf60f36c748b809adbc41cea0eb73268 100644 (file)
@@ -53,8 +53,8 @@
             <td style="border-bottom:1px solid #6A0307;color:#6A0307;font-size: 100%">{{ playlist.playlist.title }}</td>
             <td style="width:86ex; padding-right: 0; border-bottom:1px solid #6A0307; text-align:right">
             <a href="#" id="{{playlist.playlist.public_id}}" onclick="playlistUtils.showEdit(this, this.id); return false;" class="component_icon button icon_edit">{% trans "Edit" %}</a>
-                <a href="{% url telemeta-playlist-csv-export playlist.playlist.public_id 'collections' %}" class="component_icon button icon_csv">CSV Collections</a>
-                <a href="{% url telemeta-playlist-csv-export playlist.playlist.public_id 'items' %}" class="component_icon button icon_csv">CSV Items</a>
+                <a href="{% url 'telemeta-playlist-csv-export' playlist.playlist.public_id 'collections' %}" class="component_icon button icon_csv">CSV Collections</a>
+                <a href="{% url 'telemeta-playlist-csv-export' playlist.playlist.public_id 'items' %}" class="component_icon button icon_csv">CSV Items</a>
                 <a href="#" id="{{playlist.playlist.public_id}}" onclick="if(confirm(gettrans('delete the playlist permanently?'))){playlistUtils.remove(this.id);};return false;" class="component_icon button icon_cancel">{% trans "Delete" %}</a>
             </td>
         </tr>
         <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
             <td>
                 {% if resource.type == "item" and not resource.element == None %}
-                <a href="{% url telemeta-item-detail resource.element.public_id %}">{{ resource.element }}</a>
+                <a href="{% url 'telemeta-item-detail' resource.element.public_id %}">{{ resource.element }}</a>
                 {% endif %}
                 {% if resource.type == "collection" and not resource.element == None %}
-                <a href="{% url telemeta-collection-detail resource.element.public_id %}">{% if resource.element.title %}{{ resource.element.title }}{% else %}{{ resource.element }}{% endif %}</a>
+                <a href="{% url 'telemeta-collection-detail' resource.element.public_id %}">{% if resource.element.title %}{{ resource.element.title }}{% else %}{{ resource.element }}{% endif %}</a>
                 {% endif %}
                 {% if resource.type == "marker" and not resource.element == None  %}
-                <a href="{% url telemeta-item-detail-marker resource.element.public_id %}">{{ resource.element }}</a>
+                <a href="{% url 'telemeta-item-detail-marker' resource.element.public_id %}">{{ resource.element }}</a>
                 {% endif %}
                 {% if resource.type == "corpus" or resource.type == "fonds" %}
-                <a href="{% url telemeta-resource-detail resource.type resource.element.public_id %}">{{ resource.element.title }}</a>
+                <a href="{% url 'telemeta-resource-detail' resource.type resource.element.public_id %}">{{ resource.element.title }}</a>
                 {% endif %}
                 {% if resource.element == None %}{% trans "deleted" %}{% endif %}
             </td>
index b658469da41a812c850d13da50d22ef134418acf..826eacd9046dc7ab22d144bc509c5b73fa410e34 100644 (file)
@@ -18,7 +18,7 @@ $(document).ready(function() {
 {% if form.errors %}
 <p class="login-error">{% trans "Your username and password didn't match. Please try again." %}</p>
 {% endif %}
-<form class="login" id="_loginForm" method="post" action="{% url telemeta-login %}">{% csrf_token %}
+<form class="login" id="_loginForm" method="post" action="{% url 'telemeta-login' %}">{% csrf_token %}
 <p>
 {{ form.username.label_tag }}
 {{ form.username }}<br />
@@ -26,7 +26,7 @@ $(document).ready(function() {
 {{ form.password }}
 </p>
 <div style="margin-top: 2em;">
-<span style="align: right; font-weight: bold; margin-right: 2em;"><a href="{% url telemeta-password-reset %}">{% trans "Password forgotten" %} ?</a></span>
+<span style="align: right; font-weight: bold; margin-right: 2em;"><a href="{% url 'telemeta-password-reset' %}">{% trans "Password forgotten" %} ?</a></span>
 <a href="#" class="component_icon button" id="action_red" onclick="$('#_loginForm').submit();"><img src="/static/telemeta/images/password.png" alt="" style="vertical-align:middle" />&nbsp;{% trans "Sign in" %}</a>
 <input type="hidden" name="next" value="{{ next }}" />
 </div>
index a395b885f3aeea0908dc7011e849ce19f6dfc5ac..958ed0ad9602ef14bb8229783273afa68ad8f6d4 100644 (file)
@@ -13,7 +13,7 @@
   {% block modules %}
 
     <div class="module">
-    <h3><a href="{% url teleforma-home %}"><img src="/static/telemeta/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% if user.username != usr.username%}{% trans "His courses" %}{% else %}{% trans "My courses" %}{% endif %}</a></h3>
+    <h3><a href="{% url 'teleforma-home' %}"><img src="/static/telemeta/images/module_playlist.png" alt="playlists" style="vertical-align:middle" />{% if user.username != usr.username%}{% trans "His courses" %}{% else %}{% trans "My courses" %}{% endif %}</a></h3>
     <div style="background: white;">
     <ul>
     {% block courses %}
@@ -33,7 +33,7 @@
 
   {% if user.is_authenticated and user.username != usr.username %}
    <div class="module_action">
-    <a href="{% url postman_write usr.username %}" class="component_icon button" id="action_orange">{% trans "Send a message" %}</a>
+    <a href="{% url 'postman_write' usr.username %}" class="component_icon button" id="action_orange">{% trans "Send a message" %}</a>
    </div>
   {%  endif %}
  </div>
@@ -46,9 +46,9 @@
 
     <div id="password" style="float: right;">
     {% if user.is_authenticated and user.username == usr.username %}
-    <a href="{% url telemeta-password-change %}" class="component_icon button icon_login">{% trans "Change password" %}</a>
+    <a href="{% url 'telemeta-password-change' %}" class="component_icon button icon_login">{% trans "Change password" %}</a>
     {% elif user.is_staff %}
-        <a href="{% url teleforma-user-login usr.id %}" class="component_icon button icon_login">{% trans "Login as" %}</a>
+        <a href="{% url 'teleforma-user-login' usr.id %}" class="component_icon button icon_login">{% trans "Login as" %}</a>
     {%  endif %}
     </div>
 
   </div>
 
 <div class="buttons">
-<!--<a href="{% url telemeta-password-change %}" class="component_icon button icon_login">{% trans "Password reset" %}</a>-->
+<!--<a href="{% url 'telemeta-password-change' %}" class="component_icon button icon_login">{% trans "Password reset" %}</a>-->
 </div>
 
 </div>
index a2d10f0c51600cb5f8b1814e5e8fb59fd531fd88..4fb24f808c48a352dcf5eb785212868786773df7 100644 (file)
@@ -32,7 +32,7 @@ function update_period(source, from_field, to_field) {
 }
 
 $(document).ready(function () {
-    $('#location').autocomplete('{% url telemeta-complete-location %}', {
+    $('#location').autocomplete('{% url 'telemeta-complete-location' %}', {
         max: 20,
         formatResult: function(data) {
             return data[0].replace(/ *\([0-9]+.*\) *$/, '');
@@ -75,7 +75,7 @@ $(document).ready(function () {
 <div class="course">
 <h1>{% trans "Advanced Search" %}</h1>
 
-<form action="{% url telemeta-search %}" id="searchform">{% csrf_token %}
+<form action="{% url 'telemeta-search' %}" id="searchform">{% csrf_token %}
 <fieldset>
 
     <p>
index 7ac9a1fd4e168ace9e00767c558306eb3f9101bb..ab58ed65460b6e5eed2e5c6448139f71ae92e5a3 100644 (file)
@@ -17,7 +17,7 @@
 <ul>
 {% block trainings %}
 {% for t in trainings %}
-<li><a href="{% url teleforma-users t.id iej.id course.id %}">{{ t.code|lower|capfirst }} - {{ t.period|lower|capfirst }}</a></li>
+<li><a href="{% url 'teleforma-users' t.id iej.id course.id %}">{{ t.code|lower|capfirst }} - {{ t.period|lower|capfirst }}</a></li>
 {% endfor %}
 {% endblock trainings %}
 </ul>
@@ -30,7 +30,7 @@
 <ul>
 {% block iej %}
 {% for i in iejs %}
-<li><a href="{% url teleforma-users training.id i.id course.id %}">{{ i.name|lower|capfirst }}</a></li>
+<li><a href="{% url 'teleforma-users' training.id i.id course.id %}">{{ i.name|lower|capfirst }}</a></li>
 {% endfor %}
 {% endblock iej %}
 </ul>
@@ -43,7 +43,7 @@
 <ul>
 {% block courses %}
 {% for c in courses %}
-<li><a href="{% url teleforma-users training.id iej.id c.id %}">{{ c }}</a></li>
+<li><a href="{% url 'teleforma-users' training.id iej.id c.id %}">{{ c }}</a></li>
 {% endfor %}
 {% endblock courses %}
 </ul>
@@ -52,7 +52,7 @@
 
 {% if users %}
 <div class="module_action">
-<a href="{% url postman_write users|to_recipients %}" class="component_icon button" id="action_orange">{% trans "Grouped message" %}</a>
+<a href="{% url 'postman_write' users|to_recipients %}" class="component_icon button" id="action_orange">{% trans "Grouped message" %}</a>
 </div>
 {% endif %}
 
@@ -62,7 +62,7 @@
 
 {% if user.is_staff %}
 <div style="float:right;">
-<a href="{% url teleforma-users-export training.id iej.id course.id %}" class="component_icon button icon_csv">XLS Export</a>
+<a href="{% url 'teleforma-users-export' training.id iej.id course.id %}" class="component_icon button icon_csv">XLS Export</a>
 </div>
 {% endif %}