Skip to content

Commit

Permalink
Merge pull request #1 from fsinfuhh/oidc_login_form
Browse files Browse the repository at this point in the history
  • Loading branch information
lilioid authored Feb 14, 2024
2 parents 3d1ac4a + ee7c89e commit 44d3ab4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
"project_name": "",
"project_slug": "{{ cookiecutter.project_name | slugify(separator='_') }}",
"author": "Fachschaft Informatik der Universität Hamburg (Mafiasi-AG)",
"openid_scope": "openid"
"openid_scope": "openid",

"_copy_without_render": [
"src/{{ cookiecutter.project_slug }}/*/templates/*"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
from . import models

admin.site.register(models.MafiasiUser, UserAdmin)
admin.site.login_template = 'core/login.html'
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% extends "admin/login.html" %}
{% load i18n %}
{% block content %}
<div id="content-main">

{% if user.is_authenticated %}
<p class="errornote">
{% 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 %}
</p>
{% endif %}

<form id="login-form" method="get" action="{% url 'simple_openid_connect:login' %}">
<div class="submit-row">
<input type="submit" value="{% translate 'Log in with Mafiasi' %}">
</div>
</form>

</div>
{% endblock %}

0 comments on commit 44d3ab4

Please sign in to comment.