Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#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 Vishvajit Pathak, 6 years ago

Cc: Vishvajit Pathak added

comment:2 by Tim Graham, 6 years ago

Component: contrib.adminDocumentation
Resolution: wontfix
Status: newclosed
Summary: no documentation for changing django admin breadcrumbsAdd documentation for changing admin breadcrumbs

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.

comment:3 by Thomas Güttler, 5 years ago

Here is an other way to set breadcrumbs in django admin: https://stackoverflow.com/a/58302208/633961

in reply to:  2 comment:4 by Tony Narlock, 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!).

Note: See TracTickets for help on using tickets.
Back to Top