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
-
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': {
'CACHE': True,
'BUNDLE_DIR_NAME': '<path to bundle folder>',
'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 %}
<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
Close
Hashes for django-create-react-app-0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a281f63621634dc47de57eb6acf9f06c2e5e4eaa61a6506862d5c3ade75c9162 |
|
MD5 | 77dcd3745cb0313bf930d29364eb1e98 |
|
BLAKE2b-256 | 1a1018ce9b1d7c3b8d6cb253e8083ed059f0a8b049b304a22fb008e84ddae7ab |