0001-publisher-add-support-for-a-variables-section-2957.patch
wcs/qommon/publisher.py | ||
---|---|---|
837 | 837 | |
838 | 838 |
def get_substitution_variables(self): |
839 | 839 |
import misc |
840 |
return {
|
|
840 |
d = {
|
|
841 | 841 |
'site_name': get_cfg('misc', {}).get('sitename', None), |
842 | 842 |
'site_theme': get_cfg('branding', {}).get('theme', self.default_theme), |
843 | 843 |
'site_url': self.get_frontoffice_url(), |
... | ... | |
846 | 846 |
'today': strftime.strftime(misc.date_format(), time.localtime()), |
847 | 847 |
'now': misc.localstrftime(time.localtime()), |
848 | 848 |
} |
849 |
if self.site_options is None: |
|
850 |
self.load_site_options() |
|
851 |
try: |
|
852 |
d.update(dict(self.site_options.items('variables'))) |
|
853 |
except ConfigParser.NoSectionError: |
|
854 |
pass |
|
855 |
return d |
|
849 | 856 | |
850 | 857 |
extra_sources = [] |
851 | 858 |
def register_extra_source(cls, source): |
852 |
- |