diff options
Diffstat (limited to 'meetingtools')
-rw-r--r-- | meetingtools/context_processors.py | 3 | ||||
-rw-r--r-- | meetingtools/multiresponse.py | 3 | ||||
-rw-r--r-- | meetingtools/settings.py | 2 | ||||
-rw-r--r-- | meetingtools/urls.py | 7 |
4 files changed, 13 insertions, 2 deletions
diff --git a/meetingtools/context_processors.py b/meetingtools/context_processors.py index 491e785..af83fbe 100644 --- a/meetingtools/context_processors.py +++ b/meetingtools/context_processors.py @@ -1,4 +1,5 @@ from django.core.exceptions import ImproperlyConfigured +from utils import base_url __author__ = 'leifj' @@ -23,4 +24,4 @@ def theme(request): return _w(ctx) def misc_urls(request): - return {'LOGIN_URL': settings.LOGIN_URL}
\ No newline at end of file + return {'LOGIN_URL': settings.LOGIN_URL,'BASE_URL':base_url(request)}
\ No newline at end of file diff --git a/meetingtools/multiresponse.py b/meetingtools/multiresponse.py index fa46cc4..6d62fe0 100644 --- a/meetingtools/multiresponse.py +++ b/meetingtools/multiresponse.py @@ -49,6 +49,9 @@ def json_response(data,request=None): return r +def render500(request): + return render_to_response("500.html",RequestContext(request,{},[context_processors.misc_urls])) + def render403(message="You don't seem to have enough rights for what you are trying to do....",dict={}): dict['message'] = message return HttpResponseForbidden(loader.render_to_string("403.html",dict)) diff --git a/meetingtools/settings.py b/meetingtools/settings.py index 8e72dca..873a74d 100644 --- a/meetingtools/settings.py +++ b/meetingtools/settings.py @@ -4,7 +4,7 @@ from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS import meetingtools.site_logging import os -DEBUG = True +DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( diff --git a/meetingtools/urls.py b/meetingtools/urls.py index 1aa688f..30f8efd 100644 --- a/meetingtools/urls.py +++ b/meetingtools/urls.py @@ -11,6 +11,11 @@ admin.autodiscover() def welcome(request): return redirect_to('/rooms') +def crap(request): + raise ValueError("Bad crab!") + +handler500 = "meetingtools.multiresponse.render500" + urlpatterns = patterns('', (r'^$',welcome), (r'^saml2/sp/',include('djangosaml2.urls')), @@ -21,6 +26,8 @@ urlpatterns = patterns('', (r'^accounts/login-federated$','meetingtools.apps.auth.views.accounts_login_federated'), (r'^accounts/logout$','meetingtools.apps.auth.views.logout'), (r'^user/?(.*)$','meetingtools.apps.room.views.list_rooms'), + (r'^crab/',crap), + ('^myroom/?','meetingtools.apps.room.views.myroom'), (r'^(?:room|rooms)$','meetingtools.apps.room.views.list_rooms'), (r'^go/(\d+)$','meetingtools.apps.room.views.go_by_id'), (r'^go/(.+)$','meetingtools.apps.room.views.go_by_path'), |