Skip to content

🌴 Starting a new project? API template with: token authentication, pagination, custom user, login and register endpoints, and PostgreSQL

Notifications You must be signed in to change notification settings

damianstone/django-rest-starting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Initialization

Create a virtual environment

python3 -m venv venv-api
source venv-api/bin/activate

Install requirements.txt

pip install -r requirements.txt

Create superuser

python manage.py createsuperuser

Add sqlite db

db.sqlite3

Add PostgreSQL db (uncomment the code in settings.py)

Then, create an .env file and add the following to connect your local database

LOCAL_DB_NAME=db-name
LOCAL_DB_USER=
LOCAL_DB_PASSWORD=
LOCAL_DB_HOST=127.0.0.1
LOCAL_DB_PORT=5432

Migrate models

python manage.py makemigrations
python manage.py migrate

Run

python manage.py runserver

About

🌴 Starting a new project? API template with: token authentication, pagination, custom user, login and register endpoints, and PostgreSQL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages