项目作者: p8ul

项目描述 :
Simple boilerplate for Django 2.1 & Django rest framework
高级语言: Python
项目地址: git://github.com/p8ul/django-rest-framework-boilerplate.git
创建时间: 2018-10-10T12:07:49Z
项目社区:https://github.com/p8ul/django-rest-framework-boilerplate

开源协议:

下载


django-rest-framework-boilerplate

Simple boilerplate for django & django rest framework.

Build Status
Coverage Status
Maintainability

Tasks list

  • Users api CRUD endpoints
  • DRF JWT Authentication
  • Add docker configurations
  • Document folder structure
  • Configure Static/media & templates
  • Integrate material ui & react js on templates

Jwt token endpoint

Method Endpoint Functionanlity
POST /api-token-auth Request jwt token

User Endpoints

Method Endpoint Functionality
GET /api/user List users
POST /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

Installation

If you wish to run your own build, you two options

  1. User Docker compose.

    $ git clone https://github.com/p8ul/django-rest-framework-boilerplate

    $ cd django-rest-framework-boilerplate
    $ docker-compose up

  2. 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:

  1. $ pip install virtualenv

Then, Git clone this repo to your PC

  1. $ git clone https://github.com/p8ul/django-rest-framework-boilerplate
  2. $ cd django-rest-framework-boilerplate

Create a virtual environment

  1. $ virtualenv .venv && source .venv/bin/activate

Install dependancies

  1. $ pip install -r requirements.txt

Make migrations & migrate

  1. $ python manage.py makemigrations && python manage.py migrate

Create Super user

  1. $ python manage.py createsuperuser

Launching the app

  1. $ python manage.py runserver

Run Tests

  1. $ python manage.py test