Skip to content

Commit

Permalink
logging out is fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
4-dash committed Nov 29, 2024
1 parent cd0c9bf commit 0b6f2dd
Show file tree
Hide file tree
Showing 10 changed files with 212 additions and 196 deletions.
16 changes: 6 additions & 10 deletions src/feedback/templatetags/translate_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ 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 :
view = resolve(context['request'].path)
request_language = translation.get_language()
translation.activate(language)
url = reverse(view.url_name, args=view.args, kwargs=view.kwargs)
translation.activate(request_language)
return url
return ""
view = resolve(context['request'].path)
request_language = translation.get_language()
translation.activate(language)
url = reverse(view.url_name, args=view.args, kwargs=view.kwargs)
translation.activate(request_language)
return url
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
Loading

0 comments on commit 0b6f2dd

Please sign in to comment.