=== modified file 'django/conf/global_settings.py'
|
|
|
12 | 12 | DEBUG = False |
13 | 13 | TEMPLATE_DEBUG = False |
14 | 14 | |
| 15 | # Project module |
| 16 | PROJECT_MODULE = None |
| 17 | |
15 | 18 | # Whether the framework should propagate raw exceptions rather than catching |
16 | 19 | # them. This is useful under some testing siutations and should never be used |
17 | 20 | # on a live site. |
=== modified file 'django/utils/translation/trans_real.py'
|
|
|
123 | 123 | |
124 | 124 | globalpath = os.path.join(os.path.dirname(sys.modules[settings.__module__].__file__), 'locale') |
125 | 125 | |
126 | | if settings.SETTINGS_MODULE is not None: |
| 126 | if settings.PROJECT_MODULE is not None: |
| 127 | project = settings.PROJECT_MODULE |
| 128 | elif settings.SETTINGS_MODULE is not None: |
127 | 129 | parts = settings.SETTINGS_MODULE.split('.') |
128 | 130 | project = __import__(parts[0], {}, {}, []) |
| 131 | else: |
| 132 | project = None |
| 133 | |
| 134 | if project: |
129 | 135 | projectpath = os.path.join(os.path.dirname(project.__file__), 'locale') |
130 | 136 | else: |
131 | 137 | projectpath = None |