如果storages
,我想要排除包if DEBUG:
storages = ''
INSTALLED_APPS = [
...
'app',
storages,
...
]
。我该怎么做?
我的settings.py:
$returndata = 'photo <img src="data:image/jpeg;base64,' . base64_encode($res1['@odata.context']) . '"/>';
答案 0 :(得分:1)
你可以试试这个
INSTALLED_APPS = [
.
'app',
if not DEBUG:
# Add the package into installed app only if debug is false otherwise use installed apps without package `storages`.
INSTALLED_APPS += ('storages', )
答案 1 :(得分:0)
只需在settings.py
if not DEBUG:
INSTALLED_APPS += ['storages']