A package to reactify Django app.
Project description
Django Reactify is an app that allows developers to add and use React components in your Django app without using create-react-app.
Detailed documentation is in the “docs” directory.
Quick start
Install the package via the following command:
pip install django-reactify
Add “reactify” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'reactify', ]
Run the following command:
python manage.py reactify <app_name>
> Replace the app name with the existing Django app you want to reactify.
> This command does the following:
Creates barbel and webpack configuration files in the app’s root directory.
Creates package.json file.
Creates a react folder directory with the necessary files and subdirectories where you can add your react component files and redux actions and reducers.
Creates a react folder directory with the necessary files and subdirectories where you can add your react component files and redux actions and reducers.
Installs the basic npm development packages.
starts the react development server that listens on the changes made to the react components and compile a minimal js file that is rendered to the view.
Add the new view function to the views file to render the compiled version of the react app.
- def index(request):
template_name = ‘<app_name>/index.html’
return render(request, template_name)
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
File details
Details for the file django-reactify-1.3.1.tar.gz
.
File metadata
- Download URL: django-reactify-1.3.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c4c528808106b5fb2c48e45552bdeb4016aef11fd6c72d5b6c55f870a03da47 |
|
MD5 | dcac21766b49d6caa315667c0caf94e2 |
|
BLAKE2b-256 | 6a7e3243e041408cc4d65e81c873e97873221f7f36ee9f7b1c36ea26f37d88ac |