Explicit settings.py declaration
This is done so that we can load the settings.py on a wsgi instance.
This commit is contained in:
@@ -223,8 +223,11 @@ class ValidateCustomFields(Validator):
|
|||||||
def post_item(entry, data):
|
def post_item(entry, data):
|
||||||
return post_internal(entry, data)
|
return post_internal(entry, data)
|
||||||
|
|
||||||
|
# We specify a settings.py file because when running on wsgi we can't detect it
|
||||||
app = Eve(validator=ValidateCustomFields, auth=CustomTokenAuth)
|
# automatically. The default path (which work in Docker) can be overriden with
|
||||||
|
# an env variable.
|
||||||
|
settings_path = os.environ.get('EVE_SETTINGS', '/data/dev/pillar/pillar/settings.py')
|
||||||
|
app = Eve(settings=settings_path, validator=ValidateCustomFields, auth=CustomTokenAuth)
|
||||||
|
|
||||||
import config
|
import config
|
||||||
app.config.from_object(config.Deployment)
|
app.config.from_object(config.Deployment)
|
||||||
|
Reference in New Issue
Block a user