use create react app with django
Project description
django-create-react-app
This app is a Django app that helps to integrating the integrate the React that has been added in your Project through create React App
Detailed documentation is in the "docs" directory.
Quick start
Install
pip install django-create-react-app
- Add "create_react_app" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [
...
'create_react_app',
]
- Add create react app configuration into your settings::
CREATE_REACT_APP = {
'DEFAULT': {
'BUNDLE_DIR_NAME': '<path to bundle folder>',
'FRONT_END_SERVER': "http://localhost:3000/",
'is_dev': False,
}
}
- Use it in your templates ::
{% load react_bundle_loader %}
<html>
<head>
{% render_bundle_css %}
</head>
<body>
....
{% render_bundle_js %}
</body>
</head>
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-create-react-app-0.3.tar.gz
.
File metadata
- Download URL: django-create-react-app-0.3.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3b131e535217aa99bbee37c8f69bc4d50a5e78566614afb50cf4d6559f9ae59 |
|
MD5 | 84047cc92ce5d17c2b522a7d687da151 |
|
BLAKE2b-256 | 9ba1b8062bb3120f4b98fc2f0c09b2b1252b1a97a4fba201d5ed651346defb43 |