Fix in example project.
This commit is contained in:
parent
9c071831fa
commit
93c0bc2382
5 changed files with 38 additions and 31 deletions
|
@ -87,3 +87,5 @@ LOGIN_REDIRECT_URL = '/'
|
|||
# OIDC Provider settings
|
||||
|
||||
SITE_URL = 'http://localhost:8000'
|
||||
|
||||
LOGIN_URL = '/admin/login/'
|
||||
|
|
|
@ -19,13 +19,12 @@
|
|||
<a href="{% url 'home' %}" class=" item">django-oidc-provider</a>
|
||||
<div class="right menu">
|
||||
{% if user.is_authenticated %}
|
||||
<a href="#" class="item">{{ user.email }}</a>
|
||||
{% if user.is_superuser %}
|
||||
<a href="{% url 'admin:index' %}" class="item">Admin</a>
|
||||
{% endif %}
|
||||
<a href="{% url 'logout' %}" class="item"><i class="remove icon"></i></a>
|
||||
<a href="{% url 'admin:logout' %}" class="item"><i class="remove icon"></i></a>
|
||||
{% else %}
|
||||
<a href="{% url 'login' %}" class="item">Login</a>
|
||||
<a href="{% url 'admin:login' %}" class="item">Login</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
<div class="ui page grid">
|
||||
<div class="nine wide centered column">
|
||||
<div class="ui container" style="margin-top:100px">
|
||||
<div class="ui stackable grid">
|
||||
<div class="row">
|
||||
<div class="eight wide centered column">
|
||||
<div class="ui segment">
|
||||
<h1 class="ui dividing header">Request for Permission</h1>
|
||||
<p>Client <i>{{ client.name }}</i> would like to access this information of you.</p>
|
||||
|
@ -24,5 +26,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
|
@ -2,8 +2,10 @@
|
|||
|
||||
{% block content %}
|
||||
|
||||
<div class="ui page grid">
|
||||
<div class="nine wide centered column">
|
||||
<div class="ui container" style="margin-top:100px">
|
||||
<div class="ui stackable grid">
|
||||
<div class="row">
|
||||
<div class="eight wide centered column">
|
||||
<div class="ui icon negative large message">
|
||||
<i class="meh icon"></i>
|
||||
<div class="content">
|
||||
|
@ -13,5 +15,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
|
@ -6,10 +6,8 @@ from django.views.generic import TemplateView
|
|||
|
||||
urlpatterns = [
|
||||
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'^openid/', include('oidc_provider.urls', namespace='oidc_provider')),
|
||||
url(r'^', include('oidc_provider.urls', namespace='oidc_provider')),
|
||||
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue