Files
zulip/zerver/lib/realm_logo.py
Joshua Pan ad1df0ebeb settings: Add support for customizing the top-left logo.
This adds a new realm_logo field, which is a horizontal-format logo to
be displayed in the top-left corner of the webapp, and any other
places where we might want a wide-format branding of the organization.

Tweaked significantly by tabbott to rebase, fix styling, etc.

Fixing the styling of this feature's loading indicator caused me to
notice the loading indicator for the realm_icon feature was also ugly,
so I fixed that too.

Fixes #7995.
2018-12-18 12:44:52 -08:00

14 lines
412 B
Python

from django.conf import settings
from zerver.lib.upload import upload_backend
from zerver.models import Realm
def realm_logo_url(realm: Realm) -> str:
return get_realm_logo_url(realm)
def get_realm_logo_url(realm: Realm) -> str:
if realm.logo_source == 'U':
return upload_backend.get_realm_logo_url(realm.id, realm.logo_version)
else:
return settings.DEFAULT_LOGO_URI+'?version=0'