[Answered ]-Django โ€“ change site_header when using `admin/login.html` template as a normal login template

2๐Ÿ‘

โœ…

You would need to pass a context variable with the name site_header into yours urls.py but that duplicates the whole thing:

url(
    r'^login/$',
    auth_views.login,
    {
        'template_name': 'admin/login.html',
        'extra_context': {'site_header': 'Log In'},
    },
    name='login'
)

Other possibility is to create your own context processor and fill site_header with whatever you want.

Another possibility is to copy admin/base_site.html into yours templates directory and overwrite the header.

๐Ÿ‘คBruce

Leave a comment