Transparently use webpack 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
-
Add "polls" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [ ... 'django-create-react-app', ]
-
Add create react app configuration into your settings::
CREATE_REACT_APP = { 'DEFAULT': { 'CACHE': True, 'BUNDLE_DIR_NAME': '/Users/aamirbhatt/workspace/hack_django_react/dashboard/static', 'LOADER_CLASS': 'create_react_app.loader.CreateReactLoader', 'FRONT_END_SERVER': "http://localhost:3000/", 'is_dev': False, } }
-
Use it in your templates :: {% load react_bundle_loader %}
add this tag in the html head {% render_bundle_css %}
add this tag in the html body {% render_bundle_js %}
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
Hashes for django-create-react-app-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c558ac061c9a7b7b8c62b3e4529e8a28f937c1e6fa25dc993cf07688b0d7aa7 |
|
MD5 | fb780c46a31d3ff62d548d7cf1ccc456 |
|
BLAKE2b-256 | 06b55462057db684d64eb7685788c0d5610489eae69c1f47f399f326278e7d05 |