Edit templates in example project.
This commit is contained in:
parent
559f90c5a6
commit
9adfa7e6bc
4 changed files with 26 additions and 24 deletions
|
@ -87,5 +87,3 @@ LOGIN_REDIRECT_URL = '/'
|
||||||
# OIDC Provider settings
|
# OIDC Provider settings
|
||||||
|
|
||||||
SITE_URL = 'http://localhost:8000'
|
SITE_URL = 'http://localhost:8000'
|
||||||
|
|
||||||
LOGIN_URL = '/admin/login/'
|
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
{% if user.is_superuser %}
|
{% if user.is_superuser %}
|
||||||
<a href="{% url 'admin:index' %}" class="item">Admin</a>
|
<a href="{% url 'admin:index' %}" class="item">Admin</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{% url 'admin:logout' %}" class="item"><i class="remove icon"></i></a>
|
<a href="{% url 'logout' %}" class="item"><i class="remove icon"></i></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{% url 'admin:login' %}" class="item">Login</a>
|
<a href="{% url 'login' %}" class="item">Login</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,27 +2,29 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="ui page grid">
|
<div class="ui container" style="margin-top:100px">
|
||||||
<div class="row">
|
<div class="ui stackable grid">
|
||||||
<div class="six wide centered column">
|
<div class="row">
|
||||||
{% if form.errors %}
|
<div class="eight wide centered column">
|
||||||
<div class="ui negative message">
|
{% if form.errors %}
|
||||||
<p>Your username and password didn't match. Please try again.</p>
|
<div class="ui negative message">
|
||||||
|
<p>Your username and password didn't match. Please try again.</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<form class="ui form segment" method="post" action="{% url 'login' %}">
|
||||||
|
{% csrf_token %}
|
||||||
|
<input type="hidden" name="next" value="{{ next }}">
|
||||||
|
<div class="field">
|
||||||
|
<label>Username</label>
|
||||||
|
<input type="text" name="username">
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label>Password</label>
|
||||||
|
<input type="password" name="password">
|
||||||
|
</div>
|
||||||
|
<input class="ui submit big primary fluid button" type="submit" value="Enter" />
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
<form class="ui form segment" method="post" action="{% url 'login' %}">
|
|
||||||
{% csrf_token %}
|
|
||||||
<input type="hidden" name="next" value="{{ next }}">
|
|
||||||
<div class="field">
|
|
||||||
<label>Username</label>
|
|
||||||
<input type="text" name="username">
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<label>Password</label>
|
|
||||||
<input type="password" name="password">
|
|
||||||
</div>
|
|
||||||
<input class="ui submit big primary fluid button" type="submit" value="Enter" />
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,6 +6,8 @@ from django.views.generic import TemplateView
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^$', TemplateView.as_view(template_name='home.html'), name='home'),
|
url(r'^$', TemplateView.as_view(template_name='home.html'), name='home'),
|
||||||
|
url(r'^accounts/login/$', auth_views.login, { 'template_name': 'login.html' }, name='login'),
|
||||||
|
url(r'^accounts/logout/$', auth_views.logout, { 'next_page': '/' }, name='logout'),
|
||||||
|
|
||||||
url(r'^', include('oidc_provider.urls', namespace='oidc_provider')),
|
url(r'^', include('oidc_provider.urls', namespace='oidc_provider')),
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue