A xml rest api that return listings and average price for a given outcode
- docker
- docker-compose
- listings.csv
-
clone the repo
- navigate into locationstation
-
create a .env file with the below variables
- SECRET_KEY = ''
- DEBUG = True
- DB_NAME = 'databasename'
- DB_USER = ''
- DB_PASS = ''
- ALLOWED_HOSTS = "*"
- CSRF_TRUSTED_ORIGINS = "http://0.0.0.0"
- DJANGO_SUPERUSER_PASSWORD="your password"
- DJANGO_SUPERUSER_EMAIL=example@example.com
- DJANGO_SUPERUSER_USERNAME=admin
-
run command
- docker-compose up
-
login into the admin area
- click on listings
- click on import and select listing file
- click submit button
- click confirm import
The container is already setup for production using ngnix and gunicorn. Change the below env varaibles
- DEBUG = False
- ALLOWED_HOSTS = "yourdomainname.com,yourseconddomainname.com"
- CSRF_TRUSTED_ORIGINS = "http://yourdomainname.com,http://yourseconddomainname.com"
- DJANGO_SUPERUSER_PASSWORD="more secure password"
- DJANGO_SUPERUSER_EMAIL=example@example.com
- DJANGO_SUPERUSER_USERNAME=admin
- change secret key to something more secure
- SECRET_KEY = ''