summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Noel <thomas@univnautes-idp.dev>2014-03-16 18:39:20 (GMT)
committerThomas Noel <thomas@univnautes-idp.dev>2014-03-16 18:39:20 (GMT)
commitf56508132d31ce08d685b993e221c6187f0cd015 (patch)
tree5b943429354f6a73824feb6793d6b751d664b98f
parente8524acf30dd9a8219fbae8ce44db6dd38ee4e28 (diff)
downloadunivnautes-idp-f56508132d31ce08d685b993e221c6187f0cd015.zip
univnautes-idp-f56508132d31ce08d685b993e221c6187f0cd015.tar.gz
univnautes-idp-f56508132d31ce08d685b993e221c6187f0cd015.tar.bz2
homepage for public
-rw-r--r--base/templates/base.html11
-rw-r--r--base/templates/univnautes-idp/homepage.html3
-rw-r--r--univnautes_idp/urls_public.py5
3 files changed, 12 insertions, 7 deletions
diff --git a/base/templates/base.html b/base/templates/base.html
index df06fe6..97ac474 100644
--- a/base/templates/base.html
+++ b/base/templates/base.html
@@ -1,6 +1,5 @@
-{% load i18n %}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+{% load i18n %}
+<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="{{ STATIC_URL }}authentic2/css/style.css" />
@@ -16,7 +15,7 @@
<div id="wrap">
<a href="/"><div id="header">
{% block header %}
- <span>Tenant</span>
+ <span>Tenant {{request.tenant.schema_name}}</span>
<h1>{{request.tenant.name|default:request.tenant.schema_name}}</h1>
{% endblock %}
</div></a>
@@ -27,7 +26,9 @@
{% if request.user.is_authenticated %}
<div id="user">
<p>
- {% blocktrans with request.user.get_full_name as username %}Hello {{ username }}.{% endblocktrans %}
+ Connect&eacute; en tant que {{ request.user.get_full_name|default:request.user }}
+ &mdash;
+ <a id="logout" href="{% url 'auth_logout' %}">{% trans "Logout" %}</a>
</p>
</div>
{% endif %}
diff --git a/base/templates/univnautes-idp/homepage.html b/base/templates/univnautes-idp/homepage.html
index 9aa641e..612a2c8 100644
--- a/base/templates/univnautes-idp/homepage.html
+++ b/base/templates/univnautes-idp/homepage.html
@@ -3,4 +3,7 @@
{% block content %}
<h1>Gestion des tenants</h1>
+<p>
+<a href="/admin">Administration</a>
+</p>
{% endblock %}
diff --git a/univnautes_idp/urls_public.py b/univnautes_idp/urls_public.py
index ec4ec37..e2e2024 100644
--- a/univnautes_idp/urls_public.py
+++ b/univnautes_idp/urls_public.py
@@ -1,12 +1,13 @@
from django.conf.urls import patterns, url, include
-from django.views.generic import TemplateView
+from django.views.generic import TemplateView, RedirectView
from authentic2.urls import urlpatterns as authentic2_urlpatterns
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
- url(r'^$', TemplateView.as_view(template_name="univnautes-idp/homepage.html")),
+ url(r'^$', TemplateView.as_view(template_name='univnautes-idp/homepage.html')),
url(r'^admin/', include(admin.site.urls)),
url(r'^admin_tools/', include('admin_tools.urls')),
+ url(r'^logout/$', RedirectView.as_view(url='/admin/logout'), name='auth_logout'),
)