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!
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
Maxim Andreev24,529 Points
Why would you override the template?
If you can just add
ADMIN_SITE_HEADER = "Your new header here"
David Lin35,864 Points
What worked for me:
from django.contrib import admin from . import models admin.site.register(models.Course) admin.site.register(models.Text) admin.site.register(models.Quiz) admin.site.register(models.MultipleChoiceQuestion) admin.site.register(models.TrueFalseQuestion) admin.site.register(models.Answer) admin.site.site_header = "Learning Site administration"
Chris KomaroffCourses Plus Student 13,673 Points
That's cool, thanks for sharing this settings.py constant, although I can't seem to get it to work. This was just a simple example of how to override the admin template. And I learned how to see Django source code on GitHub which is also very cool.
Kayla Johnson482 Points
This did not work for me either.
What did work was simply adding: admin.site.site_header = "My site admin" to urls.py