Tools for helping integrate ReactJS into a Django project.
Project description
# django-react-tools Tools for helping integrate ReactJS into a Django project.
The current iteration of this tool adds a simple management command to your Django project that will build, copy to a Django static directory and rename accordingly.
To start run
`bash pip install django-react-tools `
then add ‘reacttools’ to your django project’s list of apps.
next in settings, set where to find the React project:
`python REACT_PROJECT_DIRECTORY = "/path/to/project" `
The default destination location is the Static Root directory for your Django project. You can change it by modifying the setting variable.
`python REACT_DJANGO_DEST = settings.STATIC_ROOT `
To run all you need to do is call the management command.
`bash > ./manage.py collectreact `
By default the React project is buit using “yarn build”. If you want to change the command you can:
`python REACT_BUILD_COMMAND = "npm build" `
If you want to skip the build you can run the comman this way: `bash > ./manage.py collectreact --no-build `
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-react-tools-0.1.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fac9775b3c8968cff2c4bad52dfee0c7a9542b7599c3116e968feebe22146d96 |
|
MD5 | 8638803a5ac5df7bd88da66a3580ff7e |
|
BLAKE2b-256 | db7c114ee14dbccfccaf5323f0cb2a11607b274402d21d57d0b27dbc167c71d4 |
Hashes for django_react_tools-0.1.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ca71920da6b1d2a83895a758a7162a1c37b9f57086da572d89fcc45f77b1904 |
|
MD5 | 835f8639cc9b4c0190e29221d3819e3a |
|
BLAKE2b-256 | 2febf1296e96e4a28235e9317c9bc9f0d7e0bac3f90752907e344658fa157fad |