Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logout fix #320

Merged
merged 5 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 14 additions & 17 deletions src/feedback/templatetags/translate_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,19 @@ def translate_url(context, language):
'''
used to translate urls for switching languages
'''
## this if is here only because of veranstalter.py > VeranstalterWizard > done method.
## see comment there, why we might not have request
if 'request' in context :
try:
view = resolve(context['request'].path_info)
except Resolver404:
return ""
try:
view = resolve(context['request'].path_info)
except Resolver404:
return ""

request_language = translation.get_language()
translation.activate(language)
request_language = translation.get_language()
translation.activate(language)

namespace = view.namespace
view_name = f"{namespace}:{view.url_name}" if namespace else view.url_name

url = reverse(view_name, args=view.args, kwargs=view.kwargs)

translation.activate(request_language)
return url

namespace = view.namespace
view_name = f"{namespace}:{view.url_name}" if namespace else view.url_name

url = reverse(view_name, args=view.args, kwargs=view.kwargs)

translation.activate(request_language)
return url
return ""
3 changes: 1 addition & 2 deletions src/feedback/views/veranstalter.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,7 @@ def done(self, form_list, **kwargs):
context = self.get_context_data('zusammenfassung')
send_mail_to_verantwortliche(ergebnis_empfaenger, context, instance)

# previously render_to_response was used which didn't require request, but later it was deprecated, leaving this only viable option
return render(request=None, template_name='formtools/wizard/bestellung_done.html', )
return render(request=self.request, template_name='formtools/wizard/bestellung_done.html', )



Expand Down
120 changes: 60 additions & 60 deletions src/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -523,18 +523,18 @@ msgstr ""
msgid "Evaluation"
msgstr ""

#: feedback/views/veranstalter.py:93 templates/feedback/person_form.html:16
#: templates/veranstalter/index.html:33 templates/veranstalter/index.html:40
#: feedback/views/veranstalter.py:93 templates/feedback/person_form.html:19
#: templates/veranstalter/index.html:36 templates/veranstalter/index.html:43
msgid "Basisdaten"
msgstr ""

#: feedback/views/veranstalter.py:95 templates/feedback/person_form.html:18
#: templates/veranstalter/index.html:35
#: feedback/views/veranstalter.py:95 templates/feedback/person_form.html:21
#: templates/veranstalter/index.html:38
msgid "Freie Fragen"
msgstr ""

#: feedback/views/veranstalter.py:97 templates/feedback/person_form.html:20
#: templates/veranstalter/index.html:37
#: feedback/views/veranstalter.py:97 templates/feedback/person_form.html:23
#: templates/veranstalter/index.html:40
msgid "Zusammenfassung"
msgstr ""

Expand All @@ -543,13 +543,13 @@ msgid ""
"Ihre Session ist abgelaufen. Bitte loggen Sie sich erneut über den Link ein."
msgstr ""

#: feedback/views/veranstalter.py:291
#: feedback/views/veranstalter.py:290
#, python-brace-format
msgid ""
"Evaluation der Lehrveranstaltungen - Zusammenfassung der Daten für {name}"
msgstr ""

#: feedback/views/veranstalter.py:292
#: feedback/views/veranstalter.py:291
msgid "Nachfolgend finder Sie Informationen zu Ihrer Bestellung"
msgstr ""

Expand Down Expand Up @@ -727,39 +727,39 @@ msgstr ""
msgid "%(veranstaltung.name)s (%(veranstaltung.semester.short)s)"
msgstr ""

#: templates/feedback/person_form.html:10
#: templates/formtools/wizard/base.html:74 templates/veranstalter/index.html:13
#: templates/feedback/person_form.html:12
#: templates/formtools/wizard/base.html:74 templates/veranstalter/index.html:15
msgid "ausloggen"
msgstr ""

#: templates/feedback/person_form.html:13
#: templates/feedback/person_form.html:16
msgid "Fragebogenbestellung Schritt 2 von 5"
msgstr ""

#: templates/feedback/person_form.html:14 templates/intern/index.html:25
#: templates/veranstalter/index.html:30
#: templates/feedback/person_form.html:17 templates/intern/index.html:30
#: templates/veranstalter/index.html:33
msgid "Ablauf"
msgstr ""

#: templates/feedback/person_form.html:17
#: templates/feedback/person_form.html:22 templates/veranstalter/index.html:34
#: templates/feedback/person_form.html:20
#: templates/feedback/person_form.html:25 templates/veranstalter/index.html:37
msgid "Datenüberprüfung"
msgstr ""

#: templates/feedback/person_form.html:19 templates/veranstalter/index.html:36
#: templates/feedback/person_form.html:22 templates/veranstalter/index.html:39
msgid "Details zur Übung"
msgstr ""

#: templates/feedback/person_form.html:24
#: templates/feedback/person_form.html:27
msgid "Bitte überprüfen Sie jetzt die Daten des Verantwortlichen "
msgstr ""

#: templates/feedback/person_form.html:24
#: templates/feedback/person_form.html:27
#, python-format
msgid "%(veranstaltung.verantwortlich)s"
msgstr ""

#: templates/feedback/person_form.html:27
#: templates/feedback/person_form.html:30
msgid "weiter"
msgstr ""

Expand All @@ -771,31 +771,31 @@ msgstr ""
msgid "Bestellprozess "
msgstr ""

#: templates/formtools/wizard/base.html:75
#: templates/formtools/wizard/base.html:79
msgid "Bestellung für "
msgstr ""

#: templates/formtools/wizard/base.html:102
#: templates/formtools/wizard/base.html:106
msgid "Pflichtfeld"
msgstr ""

#: templates/formtools/wizard/base.html:104
#: templates/formtools/wizard/base.html:108
#: templates/intern/import_vv_edit_users_update.html:26
#: templates/intern/import_vv_edit_users_update.html:29
#: templates/intern/tans/process_tans.html:21
#: templates/intern/tans/process_tans_preview.html:63
msgid "Zurück"
msgstr ""

#: templates/formtools/wizard/base.html:108
#: templates/formtools/wizard/base.html:112
#: templates/intern/import_vv_edit.html:87
#: templates/intern/tans/process_tans.html:23
#: templates/veranstalter/index.html:72
#: templates/veranstalter/index.html:75
msgid "Weiter"
msgstr ""

#: templates/formtools/wizard/base.html:112
#: templates/veranstalter/index.html:99
#: templates/formtools/wizard/base.html:116
#: templates/veranstalter/index.html:102
msgid "Speichern"
msgstr ""

Expand All @@ -805,7 +805,7 @@ msgstr ""

#: templates/formtools/wizard/basisdaten.html:10
#: templates/intern/lange_ohne_evaluation.html:26
#: templates/veranstalter/index.html:52
#: templates/veranstalter/index.html:55
msgid "Bestellte Bögen"
msgstr ""

Expand Down Expand Up @@ -880,7 +880,7 @@ msgid ""
msgstr ""

#: templates/formtools/wizard/evaluation.html:20
#: templates/veranstalter/index.html:17
#: templates/veranstalter/index.html:20
msgid "Information zur Vollerhebung"
msgstr ""

Expand Down Expand Up @@ -1072,7 +1072,7 @@ msgid "Fehler bei der Ausführung von pdflatex"
msgstr ""

#: templates/intern/import_ergebnisse.html:4
#: templates/intern/import_ergebnisse.html:7 templates/intern/index.html:37
#: templates/intern/import_ergebnisse.html:7 templates/intern/index.html:42
msgid "Ergebnisse aus EvaSys importieren"
msgstr ""

Expand Down Expand Up @@ -1143,8 +1143,8 @@ msgstr ""
msgid "Markierungen aufheben"
msgstr ""

#: templates/intern/import_vv_edit.html:88 templates/veranstalter/index.html:73
#: templates/veranstalter/index.html:100
#: templates/intern/import_vv_edit.html:88 templates/veranstalter/index.html:76
#: templates/veranstalter/index.html:103
msgid "Zurücksetzen"
msgstr ""

Expand Down Expand Up @@ -1251,89 +1251,89 @@ msgstr ""
msgid "Veranstaltungen die lange nicht mehr evaluiert wurden"
msgstr ""

#: templates/intern/index.html:18
#: templates/intern/index.html:23
msgid "Status der Rückmeldungen durch die Veranstalter"
msgstr ""

#: templates/intern/index.html:19
#: templates/intern/index.html:24
#, python-format
msgid ""
"Aktuell haben wir %(ruck_veranst)s Rückmeldungen von %(all_veranst)s "
"Veranstaltungen."
msgstr ""

#: templates/intern/index.html:26
#: templates/intern/index.html:31
#, python-format
msgid ""
"Dies sind nicht alle nötigen Schritte; siehe <a href=\"https://www.d120.de/"
"bookstack/books/feedback/page/feedback-ablauf%%C3%%BCbersicht\" "
"target=\"_blank\">Ablauf im bookstack</a>."
msgstr ""

#: templates/intern/index.html:29
#: templates/intern/index.html:34
msgid "neues Semester anlegen"
msgstr ""

#: templates/intern/index.html:29
#: templates/intern/index.html:34
msgid "aktuell"
msgstr ""

#: templates/intern/index.html:30
#: templates/intern/index.html:35
msgid "nicht Vorhanden"
msgstr ""

#: templates/intern/index.html:31
#: templates/intern/index.html:36
msgid "Veranstaltungen aus VV importieren"
msgstr ""

#: templates/intern/index.html:31 templates/intern/index.html:32
#: templates/intern/index.html:36 templates/intern/index.html:37
msgid "vor Bestellphase"
msgstr ""

#: templates/intern/index.html:32
#: templates/intern/index.html:37
msgid "Fehlende Personendaten nachtragen"
msgstr ""

#: templates/intern/index.html:33 templates/intern/status_final.html:9
#: templates/intern/index.html:38 templates/intern/status_final.html:9
msgid "Bestellphase abschließen"
msgstr ""

#: templates/intern/index.html:33 templates/intern/index.html:34
#: templates/intern/index.html:38 templates/intern/index.html:39
msgid "nach Bestellphase"
msgstr ""

#: templates/intern/index.html:34
#: templates/intern/index.html:39
msgid "Anschreiben für Veranstalter erzeugen"
msgstr ""

#: templates/intern/index.html:35
#: templates/intern/index.html:40
msgid "Veranstaltungen für EvaSys exportieren"
msgstr ""

#: templates/intern/index.html:36 templates/intern/tans/process_tans.html:3
#: templates/intern/index.html:41 templates/intern/tans/process_tans.html:3
#: templates/intern/tans/process_tans.html:5
#: templates/intern/tans/process_tans_preview.html:3
#: templates/intern/tans/process_tans_preview.html:5
msgid "TANs verarbeiten"
msgstr ""

#: templates/intern/index.html:36
#: templates/intern/index.html:41
msgid "nach der Bestellphase"
msgstr ""

#: templates/intern/index.html:38
#: templates/intern/index.html:43
msgid "Rankings berechnen"
msgstr ""

#: templates/intern/index.html:38
#: templates/intern/index.html:43
msgid "nach dem Ergebnis-Import"
msgstr ""

#: templates/intern/index.html:40
#: templates/intern/index.html:45
msgid "Ergebnisse veröffentlichen"
msgstr ""

#: templates/intern/index.html:40
#: templates/intern/index.html:45
#, python-format
msgid " (aktuell: sichtbar für %(cur_semester.get_sichtbarkeit_display)s)"
msgstr ""
Expand Down Expand Up @@ -1377,12 +1377,12 @@ msgid "Ausführliche Liste mit allen Bestellungen"
msgstr ""

#: templates/intern/lange_ohne_evaluation.html:25
#: templates/veranstalter/index.html:51
#: templates/veranstalter/index.html:54
msgid "Semester"
msgstr ""

#: templates/intern/lange_ohne_evaluation.html:27
#: templates/veranstalter/index.html:53
#: templates/veranstalter/index.html:56
msgid "Ausgefüllte Bögen"
msgstr ""

Expand Down Expand Up @@ -1706,7 +1706,7 @@ msgid ""
"(%(veranstaltung.semester.short)s)</strong>"
msgstr ""

#: templates/veranstalter/index.html:18
#: templates/veranstalter/index.html:21
msgid ""
"\n"
" In diesem Semester findet eine Vollerhebung aller "
Expand All @@ -1726,32 +1726,32 @@ msgid ""
" "
msgstr ""

#: templates/veranstalter/index.html:29
#: templates/veranstalter/index.html:32
msgid "Fragebogenbestellung Schritt 1 von 5"
msgstr ""

#: templates/veranstalter/index.html:43
#: templates/veranstalter/index.html:46
msgid ""
"Im Moment können keine Fragebögen bestellt werden. Sie erhalten eine E-Mail, "
"sobald dies wieder möglich ist."
msgstr ""

#: templates/veranstalter/index.html:46
#: templates/veranstalter/index.html:49
msgid ""
"Bitte geben Sie an, wie viele Fragebögen Sie in welcher Sprache benötigen."
msgstr ""

#: templates/veranstalter/index.html:48
#: templates/veranstalter/index.html:51
msgid ""
"Zur Orientierung finden Sie hier die Anzahl bestellter und ausgefüllter "
"Bögen vergangener Semester:"
msgstr ""

#: templates/veranstalter/index.html:79
#: templates/veranstalter/index.html:82
msgid "Kommentar"
msgstr ""

#: templates/veranstalter/index.html:86
#: templates/veranstalter/index.html:89
#, python-format
msgid ""
" %%}\n"
Expand All @@ -1762,7 +1762,7 @@ msgid ""
" "
msgstr ""

#: templates/veranstalter/index.html:93
#: templates/veranstalter/index.html:96
msgid ""
"Um einen Kommentar wieder zu entfernen, löschen Sie bitte den vorhandenen "
"Kommentartext."
Expand Down
Loading