Storefront
A store App developed using Django, RESTFul API, JWT. SQLite has been used as database. Training Material
Installation
- Clone the repository to your working folder
$ git clone [email protected]:MuhammadAlgshy/Storefront.git
- Install requirments
$pip install -r requirments.txt
- Setting Configuration
# OPTIONAL, change debug = false (storefront/settings --> DEBUG)
DEBUG = False
# Set the Django secret key (storefront/settings --> SECRET_KEY)
SECRET_KEY = 'django-insecure-_YOURSECRETCODE_'
# Set your database settings (storefront/settings --> DATABASES)
# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'Storefront.sqlite',
}
}
- Database Migration
# Go to you working directory on terminal/cmd
$ cd _workingdirectory_
# Make database migration
$Python manage.py makemigrations
# Migrate Database
$Python manage.py migrate
- Create Admin user
$ python manage.py createsuperuser
- Run Server
# Run django server
$python manage.py runserver
- Login to admin area, open browser and go to: http://127.0.0.1:8000/admin/
- Check the list of available APIs, open browser and go to: http://127.0.0.1:8000/store/
Enjoy the experiance.