summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hyperkitty/middleware.py2
-rw-r--r--hyperkitty/templates/base.html2
-rw-r--r--hyperkitty/urls.py6
3 files changed, 5 insertions, 5 deletions
diff --git a/hyperkitty/middleware.py b/hyperkitty/middleware.py
index 7a92e25..25aab6e 100644
--- a/hyperkitty/middleware.py
+++ b/hyperkitty/middleware.py
@@ -45,7 +45,7 @@ class SSLRedirect(object):
secure = view_kwargs.pop(SSL, False)
if request.user.is_authenticated():
secure = True
- if settings.DEBUG: # Development server (runserver)
+ if not settings.USE_SSL: # User-disabled (e.g: development server)
secure = False
if not secure == self._is_secure(request):
diff --git a/hyperkitty/templates/base.html b/hyperkitty/templates/base.html
index 93e0a6c..6f48158 100644
--- a/hyperkitty/templates/base.html
+++ b/hyperkitty/templates/base.html
@@ -23,7 +23,7 @@
<ul class="nav auth">
{% if user.is_authenticated %}
- <li><a class="mm_logout" href="{% url user_logout %}">Logout</a></li>
+ <li><a class="mm_logout" href="{% url user_logout %}?next={% url root %}">Logout</a></li>
<li><a href="{% url user_profile %}">{{ user.username }}</a></li>
{% else %}
<li><a class="mm_user" href="{% url user_login %}?next={{next|default:request.path|urlencode}}">Login</a></li>
diff --git a/hyperkitty/urls.py b/hyperkitty/urls.py
index 6e5d1a6..f6cfa18 100644
--- a/hyperkitty/urls.py
+++ b/hyperkitty/urls.py
@@ -42,7 +42,7 @@ urlpatterns = patterns('hyperkitty.views',
url(r'^accounts/login/$', login_view, {'template_name': 'login.html', 'SSL': True}, name='user_login'),
url(r'^accounts/logout/$', logout_view, {'next_page': '/'}, name='user_logout'),
url(r'^accounts/profile/$', 'accounts.user_profile', name='user_profile'),
- url(r'^accounts/register/$', 'accounts.user_registration', name='user_registration'),
+ url(r'^accounts/register/$', 'accounts.user_registration', {'SSL': True}, name='user_registration'),
# List archives and overview
@@ -100,14 +100,14 @@ urlpatterns = patterns('hyperkitty.views',
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Admin
- url(r'^admin/', include(admin.site.urls)),
+ url(r'^admin/', include(admin.site.urls), {"SSL": True}),
# Robots.txt
url(r'^robots\.txt$', direct_to_template,
{'template': 'robots.txt', 'mimetype': 'text/plain'}),
# Social Auth
- url(r'', include('social_auth.urls')),
+ url(r'', include('social_auth.urls'), {"SSL": True}),
# Mailman 2.X compatibility
url(r'^listinfo/?$', 'compat.summary'),