A django web app
This document describes the steps involved in setting up a local development environment for commerce.
$ python3 -m venv .venv
$ source .venv/bin/activate
(.venv) $ pip3 install wheel
(.venv) $ pip3 install -r requirement.txt
ALLOWED_HOST = []
SECRET_KEY = 'django-insecure-dfyqbmfsjm#pnc#bmie#tce58bdlw1n%7jr!c!dgrbwhl6gqf('
DEBUG = TRUE
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'store',
'USER': '',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '',
}
}
$ python manage.py migrate
$ python manage.py loaddata commerce/fixtures/group.json
$ python3 manage.py runserver
- We have one seller on the platform but multiple buyers
- Use mysql instead of postgres due to deployment issues
- cannot perform full text search on mysql in django, so text search
only works locally
- have api keys and other keys in plain text to avoid a lot of setup in
production environment due to time limit
- email notification will through error if email is not known
- aggregation of books sums and counts is mildly done, leading to a lot of
similar books in data rendering
- log out system not added
- A user can only log in once an account is created
- A user can create an account as a buyer and seller and
afterwards redirected to a login page
- Once login a user is presented with a dashbaord base on his priveleges
(Seller, Buyer)
- Seller gets to upload new books
- A buyer gets all books in the system and can make a purchase