Merge d5f3b4e1de
into ab5b734dbb
This commit is contained in:
commit
a9a548db69
|
@ -25,7 +25,7 @@ This will depend on your server setup, and you should consult [Deploying Django]
|
|||
|
||||
One common step would be to install dependencies like this: `PIPENV_VENV_IN_PROJECT=1 pipenv install`. This will install dependencies within the project folder.
|
||||
|
||||
Then edit brutaldon/settings.py. You definitely need to change the values of SECRET_KEY and ALLOWED_HOSTS. Also edit the database parameters to match the database you chose. Then run `pipenv run python ./manage.py migrate` to populate the database.
|
||||
Then create the file ~/.config/brutaldon_settings.py which overrides anything in brutaldon/settings.py. You definitely need to override SECRET_KEY and ALLOWED_HOSTS. Also edit the database parameters to match the database you chose. Then run `pipenv run python ./manage.py migrate` to populate the database.
|
||||
|
||||
I installed brutaldon with Apache and mod_wsgi. If you installed brutaldon in /usr/local/share/, you'd add config lines something like this to the virtual host brutaldon is installed in.
|
||||
|
||||
|
|
|
@ -213,3 +213,37 @@ def CHECK_INSTANCE_URL(url, redirect):
|
|||
|
||||
# Version number displayed on about page
|
||||
BRUTALDON_VERSION = "2.14.1"
|
||||
|
||||
# Load custom settings outside repository tracked files, so private settings
|
||||
# don't get added to the repository
|
||||
import sys
|
||||
def paths():
|
||||
sys.path.append('???')
|
||||
try:
|
||||
from xdg import XDG_CONFIG_HOME, XDG_CONFIG_DIRS
|
||||
except ImportError:
|
||||
try:
|
||||
from pathlib import Path
|
||||
except ImportError:
|
||||
home = os.environ['home']
|
||||
else:
|
||||
home = Path.home()
|
||||
sys.path[-1] = os.path.join(home, ".config")
|
||||
yield
|
||||
sys.path[-1] = home
|
||||
yield
|
||||
else:
|
||||
sys.path[-1] = XDG_CONFIG_HOME
|
||||
yield
|
||||
for directory in XDG_CONFIG_DIRS:
|
||||
sys.path[-1] = directory
|
||||
yield
|
||||
finally:
|
||||
sys.path.pop(-1)
|
||||
|
||||
for _ in paths():
|
||||
try:
|
||||
from brutaldon_settings import *
|
||||
except ImportError: pass
|
||||
else:
|
||||
break
|
||||
|
|
Loading…
Reference in New Issue