#24931: 404 error for "Views by namespace admin" at Admin Docs -----------------------------------+-------------------------------------- Reporter: girishkumarkh | Owner: benmcnelly Type: Bug | Status: assigned Component: contrib.admindocs | Version: master Severity: Normal | Resolution: Keywords: Admin, AdminDocs | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------------+--------------------------------------
Comment (by lordscales91): I think I've spotted where the issue comes from. When you use namespaced urls on your ROOT_URL_CONF you will have RegexURLResolver instances in your patterns, but the _callback_strs are not properly added, maybe it's better to show you a snippet from the actual code on django.core.urlresolvers at version 1.8.4 (I added the comment at the end) {{{ if isinstance(pattern, RegexURLResolver): if pattern.namespace: namespaces[pattern.namespace] = (p_pattern, pattern) if pattern.app_name: apps.setdefault(pattern.app_name, []).append(pattern.namespace) else: parent_pat = pattern.regex.pattern for name in pattern.reverse_dict: for matches, pat, defaults in pattern.reverse_dict.getlist(name): new_matches = normalize(parent_pat + pat) lookups.appendlist( name, ( new_matches, p_pattern + pat, dict(defaults, **pattern.default_kwargs), ) ) for namespace, (prefix, sub_pattern) in pattern.namespace_dict.items(): namespaces[namespace] = (p_pattern + prefix, sub_pattern) for app_name, namespace_list in pattern.app_dict.items(): apps.setdefault(app_name, []).extend(namespace_list) self._callback_strs.update(pattern._callback_strs) # This should be done even if a namespace is specified I think }}} -- Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:8> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/071.6eee11436baa47b77c4d23b25234ebaf%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.