Merge pull request #49 from digitalmediacenter/development-fix
Use config from settings.py
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -33,3 +33,6 @@ nosetests.xml
|
|||||||
.mr.developer.cfg
|
.mr.developer.cfg
|
||||||
.project
|
.project
|
||||||
.pydevproject
|
.pydevproject
|
||||||
|
|
||||||
|
# PuppetDB Settings
|
||||||
|
/settings.py
|
||||||
|
|||||||
@@ -133,8 +133,10 @@ You can run it in development mode by simply executing:
|
|||||||
$ python dev.py
|
$ python dev.py
|
||||||
|
|
||||||
Use ``PUPPETBOARD_SETTINGS`` to change the different settings or patch
|
Use ``PUPPETBOARD_SETTINGS`` to change the different settings or patch
|
||||||
``default_settings.py`` directly. Take care not to include your local
|
``default_settings.py`` directly. Take care not to include your local changes on
|
||||||
changes on that file when submitting patches for Puppetboard.
|
that file when submitting patches for Puppetboard. Place a settings.py file
|
||||||
|
inside the base directory of the git repository that will be used, if the
|
||||||
|
environment variable is not set.
|
||||||
|
|
||||||
Production
|
Production
|
||||||
----------
|
----------
|
||||||
|
|||||||
6
dev.py
6
dev.py
@@ -1,5 +1,11 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
import os
|
||||||
|
|
||||||
|
if 'PUPPETBOARD_SETTINGS' not in os.environ:
|
||||||
|
os.environ['PUPPETBOARD_SETTINGS'] = os.path.join(
|
||||||
|
os.getcwd(), 'settings.py'
|
||||||
|
)
|
||||||
|
|
||||||
from puppetboard.app import app
|
from puppetboard.app import app
|
||||||
from puppetboard.default_settings import DEV_LISTEN_HOST, DEV_LISTEN_PORT
|
from puppetboard.default_settings import DEV_LISTEN_HOST, DEV_LISTEN_PORT
|
||||||
|
|||||||
Reference in New Issue
Block a user