changed the handler404 and handler500 to a custom view, passing scope to get proper formed urls when displaying 404 and 500 pages
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project/scipycon/views.py Sat Oct 01 03:59:03 2011 +0530
@@ -0,0 +1,22 @@
+from django.shortcuts import render_to_response
+from django.template import RequestContext
+from django.conf import settings
+
+
+def handler404(request, template_name='404.html'):
+ """
+ Loads 404 page while passing scope
+ """
+ scope = settings.CURRENT_SCOPE
+ return render_to_response(template_name, RequestContext(request, {
+ 'params': {'scope': scope},
+ }))
+
+def handler500(request, template_name='500.html'):
+ """
+ Loads 500 page while passing scope
+ """
+ scope = settings.CURRENT_SCOPE
+ return render_to_response(template_name, RequestContext(request, {
+ 'params': {'scope': scope},
+ }))
--- a/project/urls.py Sat Oct 01 03:57:37 2011 +0530
+++ b/project/urls.py Sat Oct 01 03:59:03 2011 +0530
@@ -166,7 +166,8 @@
url(r'^password-reset-complete/$', 'password_reset_complete'),
)
-handler404 = 'django.views.defaults.page_not_found'
+handler404 = 'project.scipycon.views.handler404'
+handler500 = 'project.scipycon.views.handler404'
# Serve static files in DEBUG = True mode
if settings.DEBUG: