A basic implementation of the Oscar webstore
Running python manage.py runserver --settings=oscar_webstore_root.settings.prod
Instalation
- pip install django-oscar
- pip install unipath
- pip install django_compressor
- install postgres and set up db a) sudo su - postgres b) psql c) CREATE DATABASE dbname; d) CREATE USER username WITH PASSWORD 'password'; e) ALTER ROLE username SET client_encoding TO 'utf8'; f) ALTER ROLE username SET default_transaction_isolation TO 'read committed'; g) ALTER ROLE username SET timezone TO 'UTC'; h) GRANT ALL PRIVILEGES ON DATABASE dbname TO username;
- pip install django psycopg2
- pip install pycountry
- git clone https://github.com/OWStimpson/oscar_webstore
- python manage.py migrate --settings=oscar_webstore_root.settings.prod
- python manage.py oscar_populate_countries --no-shipping --settings=oscar_webstore_root.settings.dev
- edit address_country table and set GB record to allow shipping
Extras
- A test smtp server can be setup in dev using 'python -m smtpd -n -c DebuggingServer localhost:1025'
- start gunicorn with 'gunicorn oscar_webstore_root.wsgi_prod:application'
- kill all gunicorn processes with 'ps -ef | grep gunicorn | grep -v grep | awk '{print $2}' | xargs kill -9'
- restart ngnix with 'sudo systemctl restart nginx'