### Eclipse Workspace Patch 1.0
#P djangotrunk
|
|
|
|
| 2 | 2 | import re |
| 3 | 3 | import sys |
| 4 | 4 | import datetime |
| | 5 | import types |
| 5 | 6 | |
| 6 | 7 | from django.conf import settings |
| 7 | 8 | from django.template import Template, Context, TemplateDoesNotExist |
| … |
… |
|
| 252 | 253 | # tried exists but is an empty list. The URLconf must've been empty. |
| 253 | 254 | return empty_urlconf(request) |
| 254 | 255 | |
| | 256 | urlconf = getattr(request,'urlconf',settings.ROOT_URLCONF) |
| | 257 | if isinstance(urlconf, types.ModuleType): |
| | 258 | urlconf = request.urlconf.__name__ |
| | 259 | |
| 255 | 260 | t = Template(TECHNICAL_404_TEMPLATE, name='Technical 404 template') |
| 256 | 261 | c = Context({ |
| 257 | | 'root_urlconf': settings.ROOT_URLCONF, |
| | 262 | 'urlconf': urlconf, |
| 258 | 263 | 'request_path': request.path_info[1:], # Trim leading slash |
| 259 | 264 | 'urlpatterns': tried, |
| 260 | 265 | 'reason': smart_str(exception, errors='replace'), |
| … |
… |
|
| 746 | 751 | <div id="info"> |
| 747 | 752 | {% if urlpatterns %} |
| 748 | 753 | <p> |
| 749 | | Using the URLconf defined in <code>{{ settings.ROOT_URLCONF }}</code>, |
| | 754 | Using the URLconf defined in <code>{{ urlconf }}</code>, |
| 750 | 755 | Django tried these URL patterns, in this order: |
| 751 | 756 | </p> |
| 752 | 757 | <ol> |