Skip to content

nhathadt11/mysite-django

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is built by working through tutorials from Django and django-rest-framework

RESTful Architecture style with Django + React

RESTful Client - written in React

REST consumer: mysite-react

RESTful Server - written in Python Django

REST provider

  1. ORM support - DB manipulation via code
  2. Migration - DB versioning, code first
  3. Routing - Parse and delegate HTTP request

Django does not come with RESTful support by default. In order to do this, include django-rest-framework or flask to app dependencies. This project takes django-rest-framework.

Prerequisites

  • Pipenv 2018.11.26
  • Python 3.6.7

Getting started

  // Create virtualenv and install project dependencies
  $ pipenv install

  // Activate virtualenv
  $ pipenv shell

  // Run migration
  $ python manage.py migrate

  // Start server
  $ python manage.py runserver

  // Exit virtualenv
  $ exit

Visit swagger doc at: http://localhost:8000/swagger

TODO:

  • Visualize project structure and flow overview
  • RESTful Websocket APIs
  • React app to consume RESTful data
  • Use virtualenv to make dependencies to project-scope level

About

RESTful API with Django and DRF

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages