#29805 closed New feature (wontfix)
Add documentation for changing admin breadcrumbs
Reported by: | Ben Tiessen | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 2.1 |
Severity: | Normal | Keywords: | breadcrumbs pagination |
Cc: | Vishvajit Pathak | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
There is no documentation how to change the represented value of the breadcrumb object selected in the django admin panel.
For example if you have a model named Project and an admin model named ProjectAdmin associated with eachother clicking on a project object will display it as a Object(1) inside of the breadcrumbs. You can find the breadcrumbs by the id of #breadcrumbs in the html code generated.
The documentation does mention something related to list_display using the str method but its not clear that it affects the breadcrumbs:
https://docs.djangoproject.com/en/2.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display
But it is documented on stack overflow.
https://stackoverflow.com/questions/29286783/breadcrumb-displaying-object-name-object-in-adminmodel-editor
Change History (4)
comment:1 by , 6 years ago
Cc: | added |
---|
follow-up: 4 comment:2 by , 6 years ago
Component: | contrib.admin → Documentation |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Summary: | no documentation for changing django admin breadcrumbs → Add documentation for changing admin breadcrumbs |
comment:3 by , 5 years ago
Here is an other way to set breadcrumbs in django admin: https://stackoverflow.com/a/58302208/633961
comment:4 by , 4 years ago
Replying to Tim Graham:
I don't think it's something that must be documented. An experienced Django user can take a look at the templates to see how things work.
Hi there! I just bumped into this and would like to disagree - I just bumped into this case and think we should document it
I think admin in django is sorely underdocumented when it comes to 1.) custom pages and 2.) customizing autocompletion results (which may be more of an api thing)
This is evidenced by lots of stackoverflow where the questions show demand, answers don't hit the mark like other things in Django (please let me know if you'd like me to cite examples and where I should!) In the case of completions, there are mini communities devoted to autocomplete filters and they really bolt on a lot - I believe the root cause is the advanced innards of admin aren't documented / given examples for. (due to lack of stable API, I guess?)
Sorry if this is a bit meta, I'm happy carrying on the convo elsewhere (mailing list). I certainly hope this conversation on what is documented in admin isn't a closed one (hopefully!).
I don't think it's something that must be documented. An experienced Django user can take a look at the templates to see how things work.