Skip to content

Practice to use react16, mobx, materail-ui, Django rest framework. Other framework: django-rest-framework-simplejwt;whatwg_fetch.This project is inspired by i2x-challenge project

Notifications You must be signed in to change notification settings

shady831213/react-djangorestframework-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This Project is to learn React+Django_rest_framework.

Pkgs & Frameworks:
frontend:
react-create-app, mobx, material-ui, whatwg_fetch, mobx-react, mobx-react-devtool...
backend:
djangorestframework_simplejwt...

Purpose:
React+Django_rest_framework workflow.
Unittest for django and react

Dev:
backend:
python3 manage.py runserver
frontend:
cd frontEnd/react
npm start

test:
backend:
python3 manage.py test
frontend:
cd frontEnd/react
npm run test

build:
frontend:
cd frontEnd/react
npm run build

TroubleShooting:
1.Support decorator:
    npm i --save-dev babel-plugin-transform-decorators-legacy
    modify frontEnd/react/node_modules/babel-preset-react-app/index.js, add :
        require.resolve('babel-plugin-transform-decorators-legacy')

2.Configure Django project for react frontend:
    modify settings.py:
        TEMPLATES = [
                {
       ...
        'DIRS': [REACT_BUILD],
       ...}]

       STATICFILES_DIRS = (
            os.path.join(REACT_BUILD, 'static'),
        )

About

Practice to use react16, mobx, materail-ui, Django rest framework. Other framework: django-rest-framework-simplejwt;whatwg_fetch.This project is inspired by i2x-challenge project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published