Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 year ago
123456789101112131415
  1. from django.middleware.csrf import get_token
  2. from django.utils.functional import lazy
  3. from django.utils.html import format_html
  4. from django.utils.safestring import SafeString
  5. def csrf_input(request):
  6. return format_html(
  7. '<input type="hidden" name="csrfmiddlewaretoken" value="{}">',
  8. get_token(request),
  9. )
  10. csrf_input_lazy = lazy(csrf_input, SafeString, str)
  11. csrf_token_lazy = lazy(get_token, str)