#10223: Admin has a bug for primary keys that contain slashes
-------------------------------------------+--------------------------------
Reporter: HuCy | Owner: nobody
Status: new | Milestone: 1.1
Component: django.contrib.admin | Version: SVN
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 1 |
-------------------------------------------+--------------------------------
Changes (by russellm):
* needs_better_patch: 0 => 1
Comment:
The problem appears to be much deeper than just the link on site. Consider
a model with a CharField primary key, and an instance with a key value of
foo/bar/whiz, using the include() style of admin URL declaration:
1. If you use the admin to add an object with a slash in the primary key,
and use the "save and continue editing" button, you get redirected to
/admin/app/model/foo/bar/whiz, but if you use save, then use the admin to
go back into the object definition, the url is
/admin/app/model/foo_2Fbar_2Fwhiz/
1. If you are on /admin/app/model/foo/bar/whiz, the breadcrumb links are
wrong - they slice the path at the wrong slash.
1. If you are on /admin/app/model/foo/bar/whiz, the view on site links to
/admin/myapp/charpkmodel/r/28/foo/bar/whiz/, not /admin/r/28/foo/bar/whiz/
1. If you are on /admin/app/model/foo_2Fbar_2Fwhiz/, the link on site is
to /admin/r/28/foo_2Fbar_2Fwhiz/ - which raises a 404, since there is no
object with PK foo_2Fbar_2Fwhiz
I'm guessing there will be other problems.
--
Ticket URL: <http://code.djangoproject.com/ticket/10223#comment:8>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---