Ticket #9310: named_404.diff
File named_404.diff, 1.7 KB (added by , 16 years ago) |
---|
-
django/core/urlresolvers.py
180 180 try: 181 181 sub_match = pattern.resolve(new_path) 182 182 except Resolver404, e: 183 tried.extend([ (pattern.regex.pattern + ' ' + t) for t in e.args[0]['tried']])183 tried.extend([pattern] + t for t in e.args[0]['tried']) 184 184 else: 185 185 if sub_match: 186 186 sub_match_dict = dict([(smart_str(k), v) for k, v in match.groupdict().items()]) … … 188 188 for k, v in sub_match[2].iteritems(): 189 189 sub_match_dict[smart_str(k)] = v 190 190 return sub_match[0], sub_match[1], sub_match_dict 191 tried.append( pattern.regex.pattern)191 tried.append([pattern]) 192 192 raise Resolver404, {'tried': tried, 'path': new_path} 193 193 194 194 def _get_urlconf_module(self): -
django/views/debug.py
729 729 </p> 730 730 <ol> 731 731 {% for pattern in urlpatterns %} 732 <li>{{ pattern }}</li> 732 <li>{% for pat in pattern %} 733 {{ pat.regex.pattern }} {% if pat.name %}[name={{ pat.name }}]{% endif %} 734 {% endfor %}</li> 733 735 {% endfor %} 734 736 </ol> 735 737 <p>The current URL, <code>{{ request_path|escape }}</code>, didn't match any of these.</p>