settings.py 2.64 KB
Newer Older
1
from django.conf import settings
2
from synnefo.util.version import get_component_version
3
4
import datetime

5
6
## Service and company names/urls
######################
7
8

SERVICE_NAME = getattr(settings, 'BRANDING_SERVICE_NAME', 'Synnefo')
9
10
SERVICE_URL = getattr(settings, 'BRANDING_SERVICE_URL',
                      'http://www.synnefo.org/')
11
COMPANY_NAME = getattr(settings, 'BRANDING_COMPANY_NAME', 'GRNET')
12
13
COMPANY_URL = getattr(settings, 'BRANDING_COMPANY_URL',
                      'https://www.grnet.gr/en/')
14
15
16
17
18
19


## Images
######################

# The default path to the folder that contains all branding images
20
21
IMAGE_MEDIA_URL = getattr(settings, 'BRANDING_IMAGE_MEDIA_URL',
                          settings.MEDIA_URL+'branding/images/')
22

23
# The service favicon
24
FAVICON_URL = getattr(settings, 'BRANDING_FAVICON_URL',
25
                      IMAGE_MEDIA_URL+'favicon.ico')
26
# Logo used in Dashboard pages (Astakos)
27
28
DASHBOARD_LOGO_URL = getattr(settings, 'BRANDING_DASHBOARD_LOGO_URL',
                             IMAGE_MEDIA_URL+'dashboard_logo.png')
29
30
# Logo used in Compute pages (Cyclades)
COMPUTE_LOGO_URL = getattr(settings, 'BRANDING_COMPUTE_LOGO_URL',
31
                           IMAGE_MEDIA_URL+'compute_logo.png')
32
33
# Logo used in Console page for VM (Cyclades)
CONSOLE_LOGO_URL = getattr(settings, 'BRANDING_CONSOLE_LOGO_URL',
34
                           IMAGE_MEDIA_URL+'console_logo.png')
35
36
# Logo used in Storage pages (Pithos)
STORAGE_LOGO_URL = getattr(settings, 'BRANDING_STORAGE_LOGO_URL',
37
                           IMAGE_MEDIA_URL+'storage_logo.png')
38

39
## Copyright and footer options
40
######################
41

42
43
44
# If True, Copyright message will appear at the footer of the Compute and
# Dashboard UI
SHOW_COPYRIGHT = getattr(settings, 'BRANDING_SHOW_COPYRIGHT', True)
45
copyright_period_default = '2011-%s' % (datetime.datetime.now().year)
46
47
copyright_message_default = 'Copyright (c) %s %s' % (copyright_period_default,
                                                     COMPANY_NAME)
48
# Defaults to Copyright (c) 2011-<current_year> GRNET.
49
50
COPYRIGHT_MESSAGE = getattr(settings, 'BRANDING_COPYRIGHT_MESSAGE',
                            copyright_message_default)
51
SYNNEFO_VERSION = get_component_version('common')
52
53
54

# Footer message appears above Copyright message at the Compute templates
# and the Dashboard UI. Accepts html tags
55
FOOTER_EXTRA_MESSAGE = getattr(settings, 'BRANDING_FOOTER_EXTRA_MESSAGE', '')
56
57
58
59
60
61

# The location of the css files that contain the font loading css code
FONTS_CSS_URLS = getattr(settings, 'BRANDING_FONTS_CSS_URLS', [
    '//fonts.googleapis.com/css?family=Open+Sans&subset=latin,greek-ext,greek',
    '//fonts.googleapis.com/css?family=Ubuntu&subset=latin,greek'
])