Tools for helping integrate ReactJS into a Django project.
Project description
![Upload Python Package](https://github.com/renderbox/django-react-tools/workflows/Upload%20Python%20Package/badge.svg)
# 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.
If you wish to contribute, please Fork the repo and then make a Pull Request. We’re always open for people who want to help make this a better package.
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.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dfa07e1d747fc06eda9a284a0333b01b6521fa8ea8f7239ecb49093d8634388 |
|
MD5 | 110bd130431ed31d70cb563e54cf7a82 |
|
BLAKE2b-256 | b4931ebee771d737193e398839e10c47486c828e9e63b0c4b23182c4343042f3 |
Hashes for django_react_tools-0.2.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | faa9729ae123323b4b5ce94d4710e7dbc7695ea2466ae247e333412e15093b05 |
|
MD5 | 33253d6e2c3da967d2d341d94b2d7ea7 |
|
BLAKE2b-256 | 60ade27e77feba254151a22dfcdbcbff2c0a892da94c9aa6d7ce047ff6e6abe5 |