[Django] #24931: 404 error for "Views by namespace admin" at Admin Docs

31 views
Skip to first unread message

Django

unread,
Jun 5, 2015, 5:58:58 AM6/5/15
to django-...@googlegroups.com
#24931: 404 error for "Views by namespace admin" at Admin Docs
-----------------------------------+------------------------------
Reporter: girishkumarkh | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.admindocs | Version: master
Severity: Normal | Keywords: Admin, AdminDocs
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------
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'''.

--
Ticket URL: <https://code.djangoproject.com/ticket/24931>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 5, 2015, 6:39:34 AM6/5/15
to django-...@googlegroups.com
#24931: 404 error for "Views by namespace admin" at Admin Docs
-----------------------------------+--------------------------------------
Reporter: girishkumarkh | Owner: nobody
Type: Bug | Status: new
Component: contrib.admindocs | Version: master
Severity: Normal | Resolution:

Keywords: Admin, AdminDocs | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by girishkumarkh):

* 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>

Django

unread,
Jun 5, 2015, 7:41:25 AM6/5/15
to django-...@googlegroups.com
#24931: 404 error for "Views by namespace admin" at Admin Docs
-----------------------------------+--------------------------------------
Reporter: girishkumarkh | Owner: nobody
Type: Bug | Status: new
Component: contrib.admindocs | Version: master
Severity: Normal | Resolution:

Keywords: Admin, AdminDocs | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Description changed by girishkumarkh:

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>

Django

unread,
Jun 6, 2015, 11:30:34 AM6/6/15
to django-...@googlegroups.com
#24931: 404 error for "Views by namespace admin" at Admin Docs
-----------------------------------+------------------------------------
Reporter: girishkumarkh | Owner: nobody
Type: Bug | Status: new
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
-----------------------------------+------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:3>

Django

unread,
Jun 8, 2015, 4:00:54 AM6/8/15
to django-...@googlegroups.com
#24931: 404 error for "Views by namespace admin" at Admin Docs
-----------------------------------+------------------------------------
Reporter: girishkumarkh | Owner: zedr
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
-----------------------------------+------------------------------------
Changes (by zedr):

* owner: nobody => zedr
* status: new => assigned


Comment:

I'll take a look at it.

--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:4>

Django

unread,
Jun 9, 2015, 4:16:10 AM6/9/15
to django-...@googlegroups.com
#24931: 404 error for "Views by namespace admin" at Admin Docs
-----------------------------------+------------------------------------
Reporter: girishkumarkh | Owner: zedr
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 zedr):

I am able to reproduce this in 1.9.dev20150607202342.

--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:5>

Django

unread,
Jun 9, 2015, 5:50:05 PM6/9/15
to django-...@googlegroups.com
#24931: 404 error for "Views by namespace admin" at Admin Docs
-----------------------------------+------------------------------------
Reporter: girishkumarkh | Owner: zedr
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 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>

Django

unread,
Jul 12, 2015, 11:18:04 AM7/12/15
to django-...@googlegroups.com
#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
-----------------------------------+--------------------------------------
Changes (by benmcnelly):

* owner: zedr => benmcnelly


--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:7>

Django

unread,
Nov 23, 2015, 8:26:15 AM11/23/15
to django-...@googlegroups.com
#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

unread,
Jun 17, 2016, 2:21:13 PM6/17/16
to django-...@googlegroups.com
#24931: 404 error for "Views by namespace admin" at Admin Docs
-------------------------------------+-------------------------------------
Reporter: girishkumarkh | Owner: MarkusH
Type: Bug | Status: assigned
Component: Core (URLs) | Version: master
Severity: Normal | Resolution:
Keywords: Admin, AdminDocs, | Triage Stage: Accepted
urlresolver |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by MarkusH):

* 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>

Django

unread,
Jun 17, 2016, 2:41:04 PM6/17/16
to django-...@googlegroups.com
#24931: 404 error for "Views by namespace admin" at Admin Docs
-------------------------------------+-------------------------------------
Reporter: girishkumarkh | Owner: MarkusH
Type: Bug | Status: assigned
Component: Core (URLs) | Version: master
Severity: Normal | Resolution:
Keywords: Admin, AdminDocs, | Triage Stage: Accepted
urlresolver |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by MarkusH):

PR: https://github.com/django/django/pull/6795

--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:10>

Django

unread,
Jun 17, 2016, 5:45:34 PM6/17/16
to django-...@googlegroups.com
#24931: 404 error for "Views by namespace admin" at Admin Docs
-------------------------------------+-------------------------------------
Reporter: girishkumarkh | Owner: MarkusH
Type: Bug | Status: assigned
Component: Core (URLs) | Version: master
Severity: Normal | Resolution:
Keywords: Admin, AdminDocs, | Triage Stage: Accepted
urlresolver |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by MarkusH):

This is a regression from #23601

--
Ticket URL: <https://code.djangoproject.com/ticket/24931#comment:11>

Django

unread,
Jun 18, 2016, 10:39:50 AM6/18/16
to django-...@googlegroups.com
#24931: 404 error for "Views by namespace admin" at Admin Docs
-------------------------------------+-------------------------------------
Reporter: girishkumarkh | Owner: MarkusH
Type: Bug | Status: closed

Component: Core (URLs) | Version: master
Severity: Normal | Resolution: fixed

Keywords: Admin, AdminDocs, | Triage Stage: Accepted
urlresolver |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* 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>

Django

unread,
Jun 18, 2016, 10:44:23 AM6/18/16
to django-...@googlegroups.com
#24931: 404 error for "Views by namespace admin" at Admin Docs
-------------------------------------+-------------------------------------
Reporter: girishkumarkh | Owner: MarkusH
Type: Bug | Status: closed
Component: Core (URLs) | Version: master
Severity: Normal | Resolution: fixed
Keywords: Admin, AdminDocs, | Triage Stage: Accepted
urlresolver |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages