summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAamir Khan <syst3m.w0rm@gmail.com>2012-06-11 18:14:11 -0400
committerAamir Khan <syst3m.w0rm@gmail.com>2012-06-11 18:14:11 -0400
commit0e4bf7c225fe2b68296f3a644755b49104459c14 (patch)
treea88682836a489890923fe81391c46d3d6a5924d1
parentef266b315341440006ac504dc24b688cdcdc2d51 (diff)
downloadhyperkitty-0e4bf7c225fe2b68296f3a644755b49104459c14.tar.gz
hyperkitty-0e4bf7c225fe2b68296f3a644755b49104459c14.tar.xz
hyperkitty-0e4bf7c225fe2b68296f3a644755b49104459c14.zip
Basic configuration stuff
-rw-r--r--settings.py7
-rw-r--r--templates/base.html17
-rw-r--r--urls.py8
3 files changed, 24 insertions, 8 deletions
diff --git a/settings.py b/settings.py
index b1feed0..fd23432 100644
--- a/settings.py
+++ b/settings.py
@@ -119,17 +119,16 @@ TEMPLATE_DIRS = (
)
INSTALLED_APPS = (
-# 'django.contrib.auth',
+ 'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
# 'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
- # Uncomment the next line to enable the admin:
- # 'django.contrib.admin',
- # Uncomment the next line to enable admin documentation:
+ 'django.contrib.admin',
# 'django.contrib.admindocs',
'rdbms',
+ 'social_auth',
'djangorestframework',
'gravatar',
)
diff --git a/templates/base.html b/templates/base.html
index dc84fcb..233d81b 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -15,6 +15,8 @@
{% endblock %}
</head>
+{% load i18n %}
+
<body>
<!-- Header -->
<div class="header">
@@ -28,6 +30,21 @@
{% endif %}
<li id="page_date">{{month}}</li>
</ul>
+ {% block usertools %}
+ {% if user.is_authenticated %}
+ <div id="user-tools">
+ {% if user.active %}
+ Logged in as: <a href="{% url user_profile %}">{% filter force_escape %}{% firstof user.first_name user.username %}{% endfilter %}</a>
+ {% else %}{% trans 'Welcome,' %}
+ <strong>{% filter force_escape %}{% firstof user.first_name user.username %}{% endfilter %}</strong>.
+ {% endif %}
+ <ul class="userlinks">
+ {% block userlinks %}{% endblock %}
+ </ul>
+ </div>
+ {% endif %}
+ {% endblock %}
+
{% if month_participants and month_discussions %}
<ul class="inline-block" id="top_right">
<li class="participant"> {{month_participants}} participants</li>
diff --git a/urls.py b/urls.py
index dfee604..665daf2 100644
--- a/urls.py
+++ b/urls.py
@@ -5,8 +5,8 @@ from api import EmailResource, ThreadResource, SearchResource
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
# Uncomment the next two lines to enable the admin:
-# from django.contrib import admin
-# admin.autodiscover()
+from django.contrib import admin
+admin.autodiscover()
urlpatterns = patterns('',
# Index
@@ -72,8 +72,8 @@ urlpatterns = patterns('',
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
- # Uncomment the next line to enable the admin:
- # url(r'^admin/', include(admin.site.urls)),
+ # Admin
+ url(r'^admin/', include(admin.site.urls)),
)
#) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += staticfiles_urlpatterns()