mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-15 11:07:00 +01:00
Enhancement: support custom logo / title on login page (#6775)
This commit is contained in:
parent
3061c59c06
commit
2a0c03eda0
5 changed files with 273 additions and 200 deletions
|
|
@ -1,11 +1,28 @@
|
|||
from django.conf import settings as django_settings
|
||||
|
||||
from paperless.config import GeneralConfig
|
||||
|
||||
|
||||
def settings(request):
|
||||
general_config = GeneralConfig()
|
||||
|
||||
app_title = (
|
||||
django_settings.APP_TITLE
|
||||
if general_config.app_title is None or len(general_config.app_title) == 0
|
||||
else general_config.app_title
|
||||
)
|
||||
app_logo = (
|
||||
django_settings.APP_LOGO
|
||||
if general_config.app_logo is None or len(general_config.app_logo) == 0
|
||||
else general_config.app_logo
|
||||
)
|
||||
|
||||
return {
|
||||
"EMAIL_ENABLED": django_settings.EMAIL_HOST != "localhost"
|
||||
or django_settings.EMAIL_HOST_USER != "",
|
||||
"DISABLE_REGULAR_LOGIN": django_settings.DISABLE_REGULAR_LOGIN,
|
||||
"ACCOUNT_ALLOW_SIGNUPS": django_settings.ACCOUNT_ALLOW_SIGNUPS,
|
||||
"domain": getattr(django_settings, "PAPERLESS_URL", request.get_host()),
|
||||
"APP_TITLE": app_title,
|
||||
"APP_LOGO": app_logo,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue