+{% blocktranslate trimmed %} + You are authenticated as {{ username }}, but are not authorized to + access this page. Would you like to login to a different account? +{% endblocktranslate %} +
+{% endif %} + + + +diff --git a/{{ cookiecutter.project_slug }}/src/{{ cookiecutter.project_slug }}/core/admin.py b/{{ cookiecutter.project_slug }}/src/{{ cookiecutter.project_slug }}/core/admin.py index 9e0c953..d96dc90 100644 --- a/{{ cookiecutter.project_slug }}/src/{{ cookiecutter.project_slug }}/core/admin.py +++ b/{{ cookiecutter.project_slug }}/src/{{ cookiecutter.project_slug }}/core/admin.py @@ -4,3 +4,4 @@ from . import models admin.site.register(models.MafiasiUser, UserAdmin) +admin.site.login_template = 'core/login.html' diff --git a/{{ cookiecutter.project_slug }}/src/{{ cookiecutter.project_slug }}/core/templates/core/login.html b/{{ cookiecutter.project_slug }}/src/{{ cookiecutter.project_slug }}/core/templates/core/login.html new file mode 100644 index 0000000..df3abae --- /dev/null +++ b/{{ cookiecutter.project_slug }}/src/{{ cookiecutter.project_slug }}/core/templates/core/login.html @@ -0,0 +1,22 @@ +{% extends "admin/login.html" %} +{% load i18n %} +{% block content %} +
+{% blocktranslate trimmed %} + You are authenticated as {{ username }}, but are not authorized to + access this page. Would you like to login to a different account? +{% endblocktranslate %} +
+{% endif %} + + + +