Django API Boiler Plate
> Features:
-
✅
Up-to-date Dependencies
-
✅
User's registration
-
✅
User's SignIn
-
✅
User's SignOut
-
✅
Basic User Profile Edit
Download the code
$ git clone https://github.com/CamCoder337/django-rest-api.git
$ cd django-rest-api
Setup for 'Unix', 'MacOs' > Install modules via 'env'
$ virtualenv env
$ source env/bin/activate
$ pip3 install -r requirements.txt
Setup for windows > Install modules via 'env'
$ virtualenv env
$ .\env\Scripts\activate
$ pip3 install -r requirements.txt
Setting up .env files
Set them up according to your needs (Check the sample) 🙂
Set Up Database
$ python manage.py makemigrations
$ python manage.py migrate
Set Up Frontend Server
Go in core/settings.py
Update the following line with your frontend Server address:
CORS_ALLOWED_ORIGINS = ["Your_Frontend_Address"]
Example
CORS_ALLOWED_ORIGINS = ["http://localhost:3000",]
Start the API Server
$ python manage.py runserver 5000 # start api
Use the API at localhost:5000
via: