aboutsummaryrefslogtreecommitdiffstats
path: root/docs/setup.md
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2019-04-19 18:23:06 +0100
committerGravatar Gareth Coles <[email protected]>2019-04-19 18:23:06 +0100
commit0cd78b638c48ac14c592398da0ed19f3e5ca2e2e (patch)
treed74ebdf98537a6dd65dc926bcc3fed1458515c93 /docs/setup.md
parentChar input has placeholder, finish dir listing (diff)
parentRevert linter to non-verbose. (diff)
Merge branch 'django' into django+200/wiki
# Conflicts: # Pipfile.lock # pydis_site/apps/home/tests.py
Diffstat (limited to 'docs/setup.md')
-rw-r--r--docs/setup.md28
1 files changed, 25 insertions, 3 deletions
diff --git a/docs/setup.md b/docs/setup.md
index d6e5a7bf..18f5ee97 100644
--- a/docs/setup.md
+++ b/docs/setup.md
@@ -26,6 +26,8 @@ in your environment variables:
export DATABASE_URL=postgres://pysite@localhost/pysite
```
+After this step, inside the `.env` file, set the `SECRET_KEY` variable which can be anything you like.
+
A simpler approach to automatically configuring this might come in the
near future - if you have any suggestions, please let us know!
@@ -66,6 +68,26 @@ pip install -e .[lint,test]
to install base dependencies along with lint and test dependencies.
-You can either use `python manage.py` directly, or you can use the console
-entrypoint for it, `psmgr`. For example, to run tests, you could use either
-`python manage.py test` or `psmgr test`. Happy hacking!
+To run tests, use `python manage.py test`.
+
+## Hosts file
+
+Make sure you add the following to your hosts file:
+
+```sh
+127.0.0.1 pythondiscord.local
+127.0.0.1 api.pythondiscord.local
+127.0.0.1 staff.pythondiscord.local
+127.0.0.1 admin.pythondiscord.local
+127.0.0.1 wiki.pythondiscord.local
+127.0.0.1 ws.pythondiscord.local
+```
+When trying to access the site, you'll be using the domains above instead of the usual `localhost:8000`.
+
+Finally, you will need to set the environment variable `DEBUG=1`. When using `pipenv`, you can
+set put this into an `.env` file to have it exported automatically. It's also recommended to
+export `LOG_LEVEL=INFO` when using `DEBUG=1` if you don't want super verbose logs.
+
+To run the server, run `python manage.py runserver`. If it gives you an error saying
+`django.core.exceptions.ImproperlyConfigured: Set the DATABASE_URL environment variable` please make sure the server that your postgres database is located at is running
+and run the command `$(export cat .env)`. Happy hacking!