I followed the instructions
(https://docs.djangoproject.com/en/1.8/ref/contrib/admin/admindocs/)
to install the admin docs to my django application. Don't forget to
install '''docutils''' using pip.
If you go the following url ('''Admin doc'''):
http://127.0.0.1:8000/admin/doc/
and choose ''' Views''' and you should get to
http://127.0.0.1:8000/admin/doc/views/
there you should find two section
1. Views by empty namespace
2. Views by namespace admin
the links to '''Views by empty namespace''' works fine but '''Views by
namespace admin''' leads to
'''404 error'''.
--
Ticket URL: <https://code.djangoproject.com/ticket/24931>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* type: Uncategorized => Bug
* needs_tests: => 0
* needs_docs: => 0
Old description:
> I am currently running the '''master''' version of the django github
> project (on 5th Jun 2015 10:46 am).
>
> I followed the instructions
> (https://docs.djangoproject.com/en/1.8/ref/contrib/admin/admindocs/)
> to install the admin docs to my django application. Don't forget to
> install '''docutils''' using pip.
>
> If you go the following url ('''Admin doc'''):
> http://127.0.0.1:8000/admin/doc/
>
> and choose ''' Views''' and you should get to
> http://127.0.0.1:8000/admin/doc/views/
>
> there you should find two section
> 1. Views by empty namespace
> 2. Views by namespace admin
>
> the links to '''Views by empty namespace''' works fine but '''Views by
> namespace admin''' leads to
> '''404 error'''.
New description:
I am currently running the '''master''' version of the django github
project (on 5th Jun 2015 10:46 am).
I followed the instructions
(https://docs.djangoproject.com/en/1.8/ref/contrib/admin/admindocs/)
to install the admin docs to my django application. Don't forget to
install '''docutils''' using pip.
If you go the following url ('''Admin doc'''):
http://127.0.0.1:8000/admin/doc/
and choose ''' Views''' and you should get to
http://127.0.0.1:8000/admin/doc/views/
there you should find two section
1. Views by empty namespace
2. Views by namespace admin
the links to '''Views by empty namespace''' works fine but '''Views by
namespace admin''' leads to
'''404 error'''.
[[Image(https://dl.dropboxusercontent.com/u/53911954/djangobugs/er1.png)]]
[[Image(https://dl.dropboxusercontent.com/u/53911954/djangobugs/er2.png)]]
--
--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:1>
Old description:
> I am currently running the '''master''' version of the django github
> project (on 5th Jun 2015 10:46 am).
>
> I followed the instructions
> (https://docs.djangoproject.com/en/1.8/ref/contrib/admin/admindocs/)
> to install the admin docs to my django application. Don't forget to
> install '''docutils''' using pip.
>
> If you go the following url ('''Admin doc'''):
> http://127.0.0.1:8000/admin/doc/
>
> and choose ''' Views''' and you should get to
> http://127.0.0.1:8000/admin/doc/views/
>
> there you should find two section
> 1. Views by empty namespace
> 2. Views by namespace admin
>
> the links to '''Views by empty namespace''' works fine but '''Views by
> namespace admin''' leads to
> '''404 error'''.
>
> [[Image(https://dl.dropboxusercontent.com/u/53911954/djangobugs/er1.png)]]
>
> [[Image(https://dl.dropboxusercontent.com/u/53911954/djangobugs/er2.png)]]
New description:
I am currently running the '''master''' version of the django github
project (on 5th Jun 2015 10:46 am).
I followed the instructions
(https://docs.djangoproject.com/en/dev/ref/contrib/admin/admindocs/)
to install the admin docs to my django application. Don't forget to
install '''docutils''' using pip.
If you go the following url ('''Admin doc'''):
http://127.0.0.1:8000/admin/doc/
and choose ''' Views''' and you should get to
http://127.0.0.1:8000/admin/doc/views/
there you should find two section
1. Views by empty namespace
2. Views by namespace admin
the links to '''Views by empty namespace''' works fine but '''Views by
namespace admin''' leads to
'''404 error'''.
[[Image(https://dl.dropboxusercontent.com/u/53911954/djangobugs/er1.png)]]
[[Image(https://dl.dropboxusercontent.com/u/53911954/djangobugs/er2.png)]]
--
--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:2>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:3>
* owner: nobody => zedr
* status: new => assigned
Comment:
I'll take a look at it.
--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:4>
Comment (by zedr):
I am able to reproduce this in 1.9.dev20150607202342.
--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:5>
Comment (by zedr):
I believe the problem might be due to the fact that those views are
actually methods of `django.contrib.admin.sites.AdminSite`.
--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:6>
* owner: zedr => benmcnelly
--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:7>
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>
* keywords: Admin, AdminDocs => Admin, AdminDocs, urlresolver
* owner: benmcnelly => MarkusH
* has_patch: 0 => 1
* component: contrib.admindocs => Core (URLs)
--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:9>
Comment (by MarkusH):
PR: https://github.com/django/django/pull/6795
--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:10>
Comment (by MarkusH):
This is a regression from #23601
--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:11>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"625b8e9295d79650208bfb3fca8bf9e6aaf578e4" 625b8e92]:
{{{
#!CommitTicketReference repository=""
revision="625b8e9295d79650208bfb3fca8bf9e6aaf578e4"
Fixed #24931 -- Made namespaced RegexURLResolvers populate callback
strings.
Fixed a regression in 2f16ff5a6cbd71fc6c50e88e4087f3657222e90e.
Thanks Tim Graham for the review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:12>
Comment (by Tim Graham <timograham@…>):
In [changeset:"31a789f646d0d9af3e8464f2f9a06aa018df5f90" 31a789f]:
{{{
#!CommitTicketReference repository=""
revision="31a789f646d0d9af3e8464f2f9a06aa018df5f90"
[1.10.x] Fixed #24931 -- Made namespaced RegexURLResolvers populate
callback strings.
Fixed a regression in 2f16ff5a6cbd71fc6c50e88e4087f3657222e90e.
Thanks Tim Graham for the review.
Backport of 625b8e9295d79650208bfb3fca8bf9e6aaf578e4 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:13>