Django project and REST API endpoints for e-comm website and search results..
Create and activate a virtualenv:
virtualenv -p python3 .venv
source .venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Note: The project uses following packages.
Django==2.1.7
djangorestframework==3.9.2
psycopg2==2.7.7
Migrate, create a superuser, and run the server:
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
'api/items/'- GET: List of Items, Recent First
'api/items/'- POST: Create Item
'api/items//'- GET: Search Items, searches on name if it contains the keyword
run the following command to load dummy data:
pythom manage.py loaddata fixtures.json #<path-to-fixture-file>
run the following command to start the server:
npm install
npm run dev