From 2a7145c920c3a4c4ffa00b0a66f22ee992adfaea Mon Sep 17 00:00:00 2001 From: test test Date: Wed, 26 May 2021 18:01:17 +0200 Subject: [PATCH] Migrate url to django 3 --- app/urls.py | 2 +- .../exam/templates/exam/inc/script_list.html | 10 ++-- .../templates/exam/messages/script_marked.txt | 2 +- teleforma/exam/templates/exam/quotas.html | 2 +- teleforma/exam/templates/exam/score_form.html | 2 +- teleforma/exam/templates/exam/scores.html | 8 ++-- .../exam/templates/exam/script_detail.html | 4 +- .../exam/templates/exam/script_detail2.html | 4 +- teleforma/exam/templates/exam/scripts.html | 10 ++-- teleforma/templates/admin/base.html | 2 +- teleforma/templates/payment/email_initial.txt | 2 +- .../templates/payment/email_reminder.txt | 2 +- .../templates/payment/payment_summary.html | 2 +- teleforma/templates/postman/view.html | 4 +- .../templates/registration/activate.html | 2 +- .../registration/activation_complete.html | 2 +- teleforma/templates/registration/login.html | 2 +- .../registration/password_change_done.html | 2 +- .../registration/password_change_form.html | 2 +- .../registration/password_reset_email.html | 2 +- teleforma/templates/teleforma/base.html | 46 +++++++++---------- teleforma/templates/teleforma/course.html | 2 +- .../teleforma/course_conference_record.html | 6 --- .../templates/teleforma/course_detail.html | 10 +--- .../templates/teleforma/course_document.html | 6 --- .../templates/teleforma/course_media.html | 3 +- .../teleforma/course_media_transcoded.html | 13 +++--- teleforma/templates/teleforma/courses.html | 14 ++---- teleforma/templates/teleforma/home.html | 2 +- .../templates/teleforma/inc/media_list.html | 4 +- .../teleforma/inc/media_list_pending.html | 2 +- .../teleforma/inc/module_searches.html | 2 +- teleforma/templates/teleforma/lists.html | 12 ++--- teleforma/templates/teleforma/login.html | 4 +- .../templates/teleforma/profile_detail.html | 4 +- teleforma/templates/telemeta/base.html | 10 ++-- .../webclassrecord/add_records_links.html | 2 +- .../webclass/appointments_professor.html | 2 +- .../templates/webclass/inc/webclass_list.html | 6 +-- 39 files changed, 94 insertions(+), 124 deletions(-) diff --git a/app/urls.py b/app/urls.py index c9d8ce94..132935a2 100644 --- a/app/urls.py +++ b/app/urls.py @@ -22,7 +22,7 @@ urlpatterns = [ # Languages url(r'^i18n/', include('django.conf.urls.i18n')), - url(r'^jsi18n/$', JavaScriptCatalog.as_view(packages=js_info_dict)), + url(r'^jsi18n/$', JavaScriptCatalog.as_view(packages=js_info_dict), name="js_catalog"), url(r'^robots\.txt$', lambda r: HttpResponse( "User-agent: *\nDisallow: /", mimetype="text/plain")), diff --git a/teleforma/exam/templates/exam/inc/script_list.html b/teleforma/exam/templates/exam/inc/script_list.html index c6edfbfd..911318c7 100644 --- a/teleforma/exam/templates/exam/inc/script_list.html +++ b/teleforma/exam/templates/exam/inc/script_list.html @@ -23,11 +23,11 @@ {% for script in object_list %} - {% if script.status != 2 and script.file %}{% endif %}{{ script.course.title }}{% if script.status != 2 and script.file %}{% endif %} - {% if script.status != 2 and script.file%}{% endif %}{{ script.session }}{% if script.status != 2 and script.file %}{% endif %} - {% if script.status != 2 and script.file %}{% endif %}{{ script.type }}{% if script.status != 2 and script.file %}{% endif %} - {% if script.author.username %}{{ script.author.last_name }}{% endif %} - {% if script.author.username %}{{ script.author.first_name }}{% endif %} + {% if script.status != 2 and script.file %}{% endif %}{{ script.course.title }}{% if script.status != 2 and script.file %}{% endif %} + {% if script.status != 2 and script.file%}{% endif %}{{ script.session }}{% if script.status != 2 and script.file %}{% endif %} + {% if script.status != 2 and script.file %}{% endif %}{{ script.type }}{% if script.status != 2 and script.file %}{% endif %} + {% if script.author.username %}{{ script.author.last_name }}{% endif %} + {% if script.author.username %}{{ script.author.first_name }}{% endif %} {{ script.date_added }} {% if script.date_marked %}{{ script.date_marked }}{% endif %} diff --git a/teleforma/exam/templates/exam/messages/script_marked.txt b/teleforma/exam/templates/exam/messages/script_marked.txt index 6d62e43c..79de53d5 100644 --- a/teleforma/exam/templates/exam/messages/script_marked.txt +++ b/teleforma/exam/templates/exam/messages/script_marked.txt @@ -4,7 +4,7 @@ Votre copie soumise le {{ script.date_added }} en {{ script.course }} pour la s La note, les commentaires et les annotations sont disponibles à cette adresse : -http://{{ site.domain }}{% url teleforma-exam-script-detail script.period.id script.id %} +http://{{ site.domain }}{% url 'teleforma-exam-script-detail' script.period.id script.id %} {% trans "Best regards" %}, {% trans "The site administrator" %} {% trans "of the" %} {% organization %} diff --git a/teleforma/exam/templates/exam/quotas.html b/teleforma/exam/templates/exam/quotas.html index 171eea13..dedc3e16 100644 --- a/teleforma/exam/templates/exam/quotas.html +++ b/teleforma/exam/templates/exam/quotas.html @@ -29,7 +29,7 @@ {% for quota in object_list %} - {{ quota.corrector.username }} + {{ quota.corrector.username }} {{ quota.course.title }} {{ quota.date_start }} {{ quota.date_end }} diff --git a/teleforma/exam/templates/exam/score_form.html b/teleforma/exam/templates/exam/score_form.html index 1846de9e..3bc6e24f 100644 --- a/teleforma/exam/templates/exam/score_form.html +++ b/teleforma/exam/templates/exam/score_form.html @@ -42,7 +42,7 @@
Ce formulaire vous permet d'enregistrer la note d'une copie papier déjà corrigée hors de la plateforme e-learning.
-
Pour soumettre une nouvelle copie d'épreuve scannée à la correction en ligne, merci d'utiliser ce formulaire.
+
Pour soumettre une nouvelle copie d'épreuve scannée à la correction en ligne, merci d'utiliser ce formulaire.

Veuillez indiquer tous les champs du formulaire suivant :
diff --git a/teleforma/exam/templates/exam/scores.html b/teleforma/exam/templates/exam/scores.html index 283a687f..27ad9bc3 100644 --- a/teleforma/exam/templates/exam/scores.html +++ b/teleforma/exam/templates/exam/scores.html @@ -16,11 +16,11 @@ {% block modules %}
-

playlists{% trans "My courses" %}

+

playlists{% trans "My courses" %}

@@ -29,12 +29,12 @@ {% block module-action %} {% if upload %} {% endif %} {% if admin %} {% endif %} {% endblock module-action %} diff --git a/teleforma/exam/templates/exam/script_detail.html b/teleforma/exam/templates/exam/script_detail.html index 525dc74d..0281e1e0 100644 --- a/teleforma/exam/templates/exam/script_detail.html +++ b/teleforma/exam/templates/exam/script_detail.html @@ -47,11 +47,11 @@
- {{ script.title }} + {{ script.title }}
{% if topic.file %} -  {% trans "Topic" %} +  {% trans "Topic" %} {% endif %} {% if script.score %} {% trans "Score" %} : {{ script.score|floatformat }}/20 diff --git a/teleforma/exam/templates/exam/script_detail2.html b/teleforma/exam/templates/exam/script_detail2.html index 2adc1932..825800c9 100644 --- a/teleforma/exam/templates/exam/script_detail2.html +++ b/teleforma/exam/templates/exam/script_detail2.html @@ -31,11 +31,11 @@
- {{ script.title }} + {{ script.title }}
{% if topic.file %} -  {% trans "Topic" %} +  {% trans "Topic" %} {% endif %} {% if script.score %} {% trans "Score" %} : {{ script.score|floatformat }}/20 diff --git a/teleforma/exam/templates/exam/scripts.html b/teleforma/exam/templates/exam/scripts.html index 9c04f3fc..76ab9ba6 100644 --- a/teleforma/exam/templates/exam/scripts.html +++ b/teleforma/exam/templates/exam/scripts.html @@ -17,13 +17,13 @@ {% block modules %}
-

playlists{% trans "Scripts" %}

+

playlists{% trans "Scripts" %}

@@ -32,7 +32,7 @@ {% block module-action %} {% if upload %} {% endif %} {% endblock module-action %} diff --git a/teleforma/templates/admin/base.html b/teleforma/templates/admin/base.html index 4eb89166..888f3fb4 100644 --- a/teleforma/templates/admin/base.html +++ b/teleforma/templates/admin/base.html @@ -153,7 +153,7 @@ {% block quick-search %} {% with 'SEARCH_URL'|suit_conf as search_url %} {% if search_url %} -