Skip to content

set up a django project with modern js framework(such as react) without disabling django's template system

License

Notifications You must be signed in to change notification settings

d4x1/django-with-react

Repository files navigation

deploy

# set up your virtualenv 
pip install -r requirements.txt
python manage.py runserver

visit

http://127.0.0.1:8000/demo/ for django template page
http://127.0.0.1:8000/demo/react for react home page

custom dev

# install npm
cd {project_dir}
npm init -y
npm install webpack webpack-cli --save-dev
npm install --save-dev babel-loader @babel/core @babel/preset-env @babel/preset-react
npm install --save react react-dom
# config webpack.config.js(for entry and babel-loader) and package.json(for dev subcommand)
npm run dev # to update static/index-bundle.js

About

set up a django project with modern js framework(such as react) without disabling django's template system

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published