Project

General

Profile

Download (438 Bytes) Statistics
| Branch: | Tag: | Revision:

root / entrouvert / djommon / multitenant / app_settings.py @ c59fb59b

1
import sys
2

    
3

    
4
class AppSettings:
5
    @property
6
    def settings(self):
7
        if not hasattr(self, '_settings'):
8
            from django.conf import settings
9
            self._settings = settings
10
        return self._settings
11

    
12
    @property
13
    def MULTITENANT_TEMPLATE_DIRS(self):
14
        return self.settings.MULTITENANT_TEMPLATE_DIRS
15

    
16

    
17
app_settings = AppSettings()
18
app_settings.__name__ = __name__
19
sys.modules[__name__] = app_settings
(3-3/8)