Simple boilerplate for django & django rest framework
- Users api CRUD endpoints
- DRF JWT Authentication
- Add docker configurations
- Document folder structure
- Configure Static/media & templates
- Integrate material ui & react js on templates
Method | Endpoint | Functionanlity |
---|---|---|
POST | /api-token-auth |
Request jwt token |
Method | Endpoint | Functionality |
---|---|---|
POST | /api/user |
List users |
GET | /api/user/create |
Creates a user |
GET | /api/user/profile/{pk} |
Retrieve a user |
PUT | /api/user/update/{pk} |
Edit a user |
DELETE | /api/user/destroy/{pk} |
Delete a user |
If you wish to run your own build, you two options
-
User Docker compose.
$ git clone https://github.com/p8ul/django-rest-framework-boilerplate
$ cd django-rest-framework-boilerplate
$ docker-compose up
-
Without docker
First ensure you have python globally installed in your computer. If not, you can get python here.
After doing this, confirm that you have installed virtualenv globally as well. If not, run this:
$ pip install virtualenv
Then, Git clone this repo to your PC
$ git clone https://github.com/p8ul/django-rest-framework-boilerplate
$ cd django-rest-framework-boilerplate
Create a virtual environment
$ virtualenv .venv && source .venv/bin/activate
Install dependancies
$ pip install -r requirements.txt
Make migrations & migrate
$ python manage.py makemigrations && python manage.py migrate
Create Super user
$ python manage.py createsuperuser
$ python manage.py runserver
$ python manage.py test