Skip to main content

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 > ./ 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 > ./ collectreact --no-build `

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-react-tools, version 0.2.12
Filename, size File type Python version Upload date Hashes
Filename, size django_react_tools-0.2.12-py3-none-any.whl (16.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-react-tools-0.2.12.tar.gz (9.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page