Opened 6 years ago

Closed 6 years ago

#29999 closed Cleanup/optimization (wontfix)

Include overriding admin site to tutorial

Reported by: Jan Musílek Owned by: nobody
Component: Documentation Version: 2.1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Django 2.1 introduced ability to override default admin site, which is a great feature. In the tutorial, change of the heading is achieved by overriding templates. I'm aware that it's done so because of teaching new users how to override templates (as stated in the tutorial itself), but I think that ability to override default admin should be mentioned in this place as well.

In the spirit of "There should be one – and preferably only one – obvious way to do it." I think that overriding the default admin site is the obvious way to customize django admin site from now on and therefore, it should be mentioned in the tutorial.

Currently, the documentation states (this paragraph has not been changed at least from Django 1.9):

I propose to change this paragraph thus:

Change History (4)

comment:1 by Tim Graham, 6 years ago

I don't see overriding the admin site as a necessary requirement. site.site_header = '...' still works fine.

in reply to:  1 comment:2 by Jan Musílek, 6 years ago

Replying to Tim Graham:

I don't see overriding the admin site as a necessary requirement. site.site_header = '...' still works fine.

Sure, it isn't necessary, I just see it as a new obvious way how to customize admin site in broader context. Is it the recommended way? I thought it might, which is why I proposed this change in the first place. Would it be better if we changed and to or?

comment:3 by Rodrigo, 6 years ago

I agree with Tim, overriding the admin site seems out of the scope of an introductory tutorial to me. If mentioned, I think it should be with something like "In an actual project, if you need to heavily customize the admin, it can be entirely overriden with...", not as a way of changing the site header - which is what the site.site_header attr is for

comment:4 by Tim Graham, 6 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top