Skip to content

pdf3rn/django-rest-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django REST Starter

Usage

Clone this repo

git clone https://github.com/pdf3rn/django-rest-starter.git
cd django-rest-starter

Create virtual env:

python -m venv venv

Install requirements

pip install -r requirements.txt

Makemigrations and migrate

python manage.py makemigrations
# after make migrations then migrate to DB
python manage.py migrate

Make superadmin account

python manage.py createsuperuser

Run server

python manage.py runserver

All about make migrations and migrate

# show all migrations
python manage.py showmigrations
# make migrations
python manage.py makemigrations
# after make migrations then migrate to DB
python manage.py migrate
# rollback all migrations for 'app_name'
python manage.py migrate [app_name] zero
# rollback migrations
python manage.py [migrations_name] zero

Create apps

This project has main app called 'app', you can create sub-apps under main app folder

# Create subfolder
mkdir app/app_name
# Start app
python manage.py startapp app_name app/app_name

Update project name in apps.py file adding the prefix app. to the app string name

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages