diff options
author | Leif Johansson <leifj@sunet.se> | 2012-10-22 23:53:39 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2012-10-22 23:53:39 +0200 |
commit | f2f11c712dfbc4f0baee767505c42c8203427a23 (patch) | |
tree | 6ad35d837e1799478c1ca9c96c01fd0d1d209d25 | |
parent | cfeb62cf2d835581c1dcd10a9f1945add3b64db4 (diff) |
better top-page
-rw-r--r-- | meetingtools/urls.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/meetingtools/urls.py b/meetingtools/urls.py index c4a2855..7aacc1c 100644 --- a/meetingtools/urls.py +++ b/meetingtools/urls.py @@ -8,7 +8,10 @@ from meetingtools.apps.room.feeds import RoomAtomTagFeed,RoomRSSTagField,\ admin.autodiscover() def welcome(request): - return redirect_to('/rooms') + if request.is_authenticated(): + return redirect_to('/rooms') + else: + return redirect_to('/accounts/login') def crap(request): raise ValueError("Bad crab!") @@ -16,7 +19,7 @@ def crap(request): handler500 = "meetingtools.multiresponse.render500" urlpatterns = patterns('', - (r'^$',welcome), + (r'^/?$',welcome), (r'^saml2/sp/',include('djangosaml2.urls')), (r'^admin/', include(admin.site.urls)), (r'^static/(?P<path>.*)$','django.views.static.serve',{'document_root': STATIC_ROOT}), |