Changeset 2703
- Timestamp:
- 04/15/06 15:14:51 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/magic-removal/django/views/defaults.py
r2615 r2703 27 27 object_domain = None 28 28 29 # Otherwise, we need to introspect the object's relationships for a 29 # Otherwise, we need to introspect the object's relationships for a 30 30 # relation to the Site object 31 31 opts = obj._meta … … 58 58 except Site.DoesNotExist: 59 59 pass 60 60 61 61 # If all that malarky found an object domain, use it; otherwise fall back 62 62 # to whatever get_absolute_url() returned. … … 65 65 else: 66 66 return http.HttpResponseRedirect(absurl) 67 68 def page_not_found(request, template_name='404 '):67 68 def page_not_found(request, template_name='404.html'): 69 69 """ 70 70 Default 404 handler, which looks for the requested URL in the redirects 71 71 table, redirects if found, and displays 404 page if not redirected. 72 72 73 Templates: `404 `73 Templates: `404.html` 74 74 Context: None 75 75 """ … … 77 77 return http.HttpResponseNotFound(t.render(Context())) 78 78 79 def server_error(request, template_name='500 '):79 def server_error(request, template_name='500.html'): 80 80 """ 81 81 500 error handler. 82 82 83 Templates: `500 `83 Templates: `500.html` 84 84 Context: None 85 85 """
