-
Notifications
You must be signed in to change notification settings - Fork 10
[Guide] Viewing the Website Locally
After cloning the repository, there are three steps to viewing the website locally.
Create a Python virtual environment and activate it. Then install requirements with
pip install -r requirements.txtIn case some compilation errors related to psycopg2. In Ubuntu, execute following commend: (this project is focused on Python 3.6, thus python3.6-dev is used as example)
sudo apt-get install libpq-dev python3.6-devDjango expects several environment variables on startup. For each required environment variable, execute
export <VAR_NAME>=<value>The required environment variables are:
| Name | Value |
|---|---|
DJANGO_SECRET_KEY |
Give this variable a dummy value. |
GITHUB_KEY |
Retrieve this value from GitHub |
GITHUB_SECRET |
Retrieve this value from GitHub |
BASICAUTH_USERNAME |
Give this variable a dummy value. (you will need to enter it when accessing the local site) |
BASICAUTH_PASSWORD |
Give this variable a dummy value. (you will need to enter it when accessing the local site) |
It might be helpful to add these to a file that you can run whenever you need to export them to your environment. Just remember not to commit it!
If you want to disable basic authentication for the local site, remove BasicAuthMiddleware from cam2webui/settings.py.
python manage.py runserverThen open lvh.me:8000 in your browser.