You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
django-helusers overrides the AdminSite and change the site_header to be a read-only property (see below), which prevents the client code assigning a custom site header to it.
@property
def site_header(self):
if 'django.contrib.sites' in settings.INSTALLED_APPS:
Site = apps.get_model(app_label='sites', model_name='Site')
site = Site.objects.get_current()
site_name = site.name
elif hasattr(settings, 'WAGTAIL_SITE_NAME'):
site_name = settings.WAGTAIL_SITE_NAME
else:
return ugettext_lazy("Django admin")
return ugettext_lazy("%(site_name)s admin") % {'site_name': site_name}
While it's possible to set WAGTAIL_SITE_NAME setting variable to change the admin site header, but it's confusing for those projects that does not use WAGTAIL.
It would be nice to add a set property for site_header also.
The text was updated successfully, but these errors were encountered:
Isn't it possible to extend helusers.admin_site.AdminSite and write your own site_header property? If that's too cumbersome or otherwise not desirable, I guess, contributions are welcome.
django-helusers
overrides theAdminSite
and change thesite_header
to be a read-only property (see below), which prevents the client code assigning a custom site header to it.While it's possible to set
WAGTAIL_SITE_NAME
setting variable to change the admin site header, but it's confusing for those projects that does not use WAGTAIL.It would be nice to add a set property for site_header also.
The text was updated successfully, but these errors were encountered: