Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Customizing the Django Admin Using the Django Admin Your First Admin Customization

Robert Zivkovic
Robert Zivkovic
160 Points

Change the django admin title doesn't work.

I've repeated the steps and it have had no effect on the admin title. Is there something I've missed?

2 Answers

Ian Salmon
PLUS
Ian Salmon
Courses Plus Student 10,687 Points

The method for changing the base_site has changed many times over the different versions of Django. However, it's actually very easy now to change the site_header, as well as the index_title and site_title. It's much easier than you might think!

In urls.py, you can override these three variables by adding any of the following:

admin.site.site_header = 'My project' (default is 'Django Administration')

admin.site.index_title = 'Features area' (default is 'Site administration')

admin.site.site_title = 'HTML title' (default is 'Django site admin')

Alex Koumparos
seal-mask
.a{fill-rule:evenodd;}techdegree
Alex Koumparos
Python Development Techdegree Student 36,887 Points

Further to Ian's answer, it should be possible for you to repeat the steps exactly from the video and get the same result.

You can see from the current Django source code that the base_site.html template hasn't changed at all since the video was published.

When I added the file to my project (Django 2.1.5) and made the changes demonstrated by Lacey, I got the same result as her.

If you want to be able to recreate the steps using her approach, perhaps you could post your code and maybe we can check if something is subtly different in your code than the example?

Cheers

Alex

I recently tried to follow with the same structure, but it wouldn't read it,