]> git.parisson.com Git - teleforma.git/commitdiff
upgrade to django 1.6.x
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 28 May 2015 21:58:17 +0000 (23:58 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 28 May 2015 21:58:17 +0000 (23:58 +0200)
29 files changed:
teleforma/exam/urls.py
teleforma/templates/postman/base.html
teleforma/templates/postman/base_folder.html
teleforma/templates/postman/view.html
teleforma/templates/teleforma/annals.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/inc/conference_list.html
teleforma/templates/teleforma/inc/document_list.html
teleforma/templates/teleforma/inc/media_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
teleforma/urls.py

index 43292404fc23ce264108224353ccbc20f0778ce3..0e056b2a301c614222449b72e92d4067954d8c7e 100644 (file)
@@ -33,9 +33,8 @@
 # Authors: Guillaume Pellerin <yomguy@parisson.com>
 
 import os.path
-from django.conf.urls.defaults import *
-from django.views.generic import *
-from django.views.generic.base import *
+from django.conf.urls import patterns, url, include
+from django.http import HttpResponse
 from teleforma.exam.models import *
 from teleforma.exam.views import *
 from jsonrpc import jsonrpc_site
index cc500fb3732438f42e8c398772df90e68072f1e9..254de435e4f6b1498c6eebc91fff0c2d21627eb0 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 a46c0661fcc80a662a9e267ac0a91392869227ff..e089c0048a946a88da3da505ac9690b758af53ff 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 }}">{% 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 }}">{% 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 }}">{{ 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 }}">{{ 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 4626eda4a68ee3e4e28378ccc90f2b81462db6d6..1d641d0cb812cfde36c6665b24e4b2c9b9accdce 100644 (file)
 {% for message in pm_messages %}
 <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">
-  <a href="{% url telemeta-profile-detail message.obfuscated_sender %}">
+  <a href="{% url 'telemeta-profile-detail' message.obfuscated_sender %}">
   <span class="pm_sender">{{ message.obfuscated_sender|or_me:user }}</span>
   </a>&raquo;
-  <a href="{% url telemeta-profile-detail message.obfuscated_recipient %}">
+  <a href="{% url 'telemeta-profile-detail' message.obfuscated_recipient %}">
   <span class="pm_recipient">{{ message.obfuscated_recipient|or_me:user }}</span>
   </a> |
   <span class="pm_date">{{ message.sent_at|date:"DATETIME_FORMAT"}}</span> |
 <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 2e0c8f5b55c8817392087b4007fce8a70dffc2b2..2d481f42c11cc0743d084f9e9eee48fb76135980 100644 (file)
 <div id="module-set-left" style="width: 20%">
 
 <div class="module">
-<h3><a href="{% url teleforma-home %}"><img src="{{ STATIC_URL }}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_URL }}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_URL }}/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_URL }}/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_URL }}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_URL }}teleforma/images/download.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" /></a>{% endif %}</td>
                                                </tr>
                                                {% endfor %}
                                            </tbody>
index 65d2f05dcc3bfbf87e2a5a05b94d14979d5dc6ec..cfda3e84e95d147e6707b840bd1891896798eb59 100644 (file)
@@ -36,7 +36,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 bbdd17edc3139864465af7465618b7d72d3ec7c9..7e931c4851f6b3151a3e31320a33f522cb566083 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' %}';
                 }
                 );
         }}
 
 <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>
 
 <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 %}
 <dt>{% trans "Begin date" %}</dt><dd>{{ conference.date_begin }}</dd>
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 de39e9fbe68f8fcda0efd53bca2f8c3190d5112b..d1c44e260ebcb6d870c4542c29169321dca41fa6 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 07ae0873dcaa061dfb2ec015bf18637615869414..6d15b3de0fae4f4002603638ebce3016a30090eb 100644 (file)
@@ -4,7 +4,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 %}
@@ -12,7 +12,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 %}
index 9a33fbb9c86d27308d735f2d13995ce7e252f5cd..ef780a44db00e000eab2484f711a56b7577783d5 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 076032c625c235c51718044d0af569f1893aa2d3..6b7ead0ee5a056688b419ea235a8a1f4a2927c44 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>
@@ -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>
 
@@ -131,11 +131,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 6e422a607aab0bb3034fe7f7795bcad9e6194523..b63c98996e30585003439a0a585b32e8cd41e1af 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 2c15236d9e5d7de2e5617238ab3debabd624b2b1..a00b803959b13b28b418b3a13f0c7212a09ba7cf 100644 (file)
@@ -7,7 +7,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 %}
@@ -26,7 +26,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(){
 {% 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 %}
 {% endblock module-action %}
@@ -73,7 +73,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>
 
         {% block conference %}
index 76e97b1a396044f3c9900c3350d8221437f8a293..418cbfceb821d9d3504ce87f912334d58c2ddf5a 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 4c64915866a7fd8d50f7eda81397fe36bbeebf35..e29645868997b87fd2d6d080112c5d6f29af335b 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_URL }}/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_URL }}/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_URL }}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_URL }}teleforma/images/download.png" style="vertical-align:middle" alt="" title="{% trans "Download" %}" /></a>{% endif %}</td>
         </tr>
         {% endif %}
     {% endfor %}
index 400cc1bae9fbaa32dea6617c4f3c567293fb8b3c..b41406300ccab94b8ae47ed96121cb3c695318d9 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 97d4c434eed34b7c2d65216ee7ba4484647478db..8d1ff77bf575f85b3245987c3b616769efbcf46f 100644 (file)
@@ -37,7 +37,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_URL }}teleforma/js/jquery-1.6.min.js" type="text/javascript"></script>
 <script src="{{ STATIC_URL }}teleforma/js/jquery-ui.js" type="text/javascript"></script>
 <script src="{{ STATIC_URL }}teleforma/js/jquery.expander.min.js" type="text/javascript"></script>
@@ -92,13 +92,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 %}
 
@@ -108,13 +108,13 @@ 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 exam_access %}
   {% 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>
@@ -124,7 +124,7 @@ 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>
@@ -133,9 +133,9 @@ alt="logo" />
 
  {% if user.is_authenticated %}
   {% if user.is_staff %}
-  <li><a href="{% url telemeta-admin-general %}" class="blue">{% trans "Admin" %}</a></li>
+  <li><a href="{% url 'telemeta-admin-general' %}" 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_URL }}telemeta/images/user_tr_bk.png; background-repeat: no-repeat;
@@ -145,12 +145,12 @@ alt="logo" />
  {{ 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>
 
@@ -202,7 +202,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 c4186c30268f4bf34c4ebff2293709d04af90e1f..e6230f65d4ad0f9a153374e3dc771007c97433e7 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 a8d503adc300bce0205460a03b7f548139920e90..a9c9ef60f07046a5691c2e9d9072aa10ceb00d10 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_URL }}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 2c6afb1de6b7c22fbfb2287ee37799c21b2d1c0d..66cb2d362e943c6ec5e3ee0e3d2564057116901e 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 e066fcc857f46b9a0c23eb83469b2dc99a08ebd7..4e385e24cb6b19b2bb1da3d9934a2a4981ee9e45 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_URL }}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 e0036fa7724ff26a0bcfca8d205ca2732bff2b37..756f3f4f4d2293ad557b90d96c7888c324605c8e 100644 (file)
@@ -31,8 +31,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 %}
@@ -69,7 +69,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 47e28c24c569ef6f9b321ad34cb90f5091228ea2..a1fc5695db42ab53a7e8ff4af21a9833a67ddd64 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 e883f5c029ad652c7c6480b7669b47632b17ef1a..7229f76a33582b3d6a923577e8a3c677156aec98 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 'password_reset' %}">{% trans "Password forgotten" %} ?</a></span>
 <a href="#" class="component_icon button" id="action_red" onclick="$('#_loginForm').submit();"><img src="{{STATIC_URL}}telemeta/images/password.png" alt="" style="vertical-align:middle" />&nbsp;{% trans "Sign in" %}</a>
 <input type="hidden" name="next" value="{{ next }}" />
 </div>
index 624523edb51166d077952533d069b7a3447e1700..a72371a65ac0e7d74b285f0259967cbb728a0bce 100644 (file)
@@ -13,7 +13,7 @@
   {% block modules %}
 
     <div class="module">
-    <h3><a href="{% url teleforma-home %}"><img src="{{ STATIC_URL }}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_URL }}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 bfee8ac2d5561e2f3de618becb1177d2f6f5cb90..26ca809e287bac4567f6fa2f273ce22cee95e82d 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 3409b83a974eac13b490b87234e75b91cb176dd2..52e000aaad46de6130286e634d23fd13e25afdd8 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 %}
 
index 3b5a59963be9ca71d2ab3c8fe64ecd8ef350102f..88f5fd4cd11b1d4365a3de37fa2d120ccf9f25ab 100644 (file)
 # Authors: Guillaume Pellerin <yomguy@parisson.com>
 
 import os.path
-from django.conf.urls.defaults import *
-from django.views.generic import *
-from django.views.generic.base import *
+from django.conf.urls import patterns, url, include
+from django.conf import settings
+from django.views.generic.base import RedirectView
+from django.views.generic.list import ListView
 from teleforma.models import *
 from teleforma.views import *
 from telemeta.views import *