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.2.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f48b5f6590fd4f18b584a83a568180cfc9656532b587eec405769bf467997f7 |
|
MD5 | cfaba5b5f583273883380a17193885d2 |
|
BLAKE2b-256 | 68b06772895dd72d15f0b630c55d456fb5e4e75a89d3e079a7ec8d8418c7b9e9 |
Hashes for django_react_tools-0.2.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cecfaa554cbdac20896c0e4d4f5a91fea467d93669be349067d05a774a10186e |
|
MD5 | 9649eb47921deb7ee163f67f56e8d24b |
|
BLAKE2b-256 | e9a3d24ebd8d1fd3f4dc167e3f5624477b0fd472220443b3f9a6086a285e3b44 |