A zero-fuss way to create non single page apps with react.
Project description
React Pages
A zero-fuss way to create non single page apps with react.
- Zero Configuration required.
- Go from development to production with ease.
- Natively use react in django.
QuickStart
$ react-pages project poll_react_pages # create a project
$ cd poll_react_pages
$ react-pages page vote # create a page
$ react-pages develop # development
$ react-pages deploy # production
Django Integration
settings.py
INSTALLED_APPS = [
...
'react_pages_django',
...
]
# Assuming your React Pages project is at BASE_DIR,
REACT_PAGES_PROJECT_DIR = os.path.join(BASE_DIR, 'poll_react_pages')
templates
{% load react_pages %}
...
{% render_react_page 'vote' %}
...
That's it! React Pages will pick-up the "vote" page from "poll_react_pages" project and do the nessecary work to transpile react code.
BTW, Feel free to access the global variable context
from your react jsx code.
(That'll be the the django template context!)
For production, just put DEBUG=False
in settings.py
and relax.
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
react-pages-0.0.2.tar.gz
(47.2 kB
view details)
Built Distribution
File details
Details for the file react-pages-0.0.2.tar.gz
.
File metadata
- Download URL: react-pages-0.0.2.tar.gz
- Upload date:
- Size: 47.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d91471c0ca3c6be9c7920d7b04004e58c832fb056574a6d96eb4979885642b1c |
|
MD5 | 6e827a03d28893373e37f53b0cf7c659 |
|
BLAKE2b-256 | 0fffec39586174f8578068f553e26d2758e880d4defa9137c129424bcaea7d60 |
File details
Details for the file react_pages-0.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: react_pages-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 182fa4d8c41ebed76a62decb4debbb7e84d09e7c82a91daa8d39611a32316b07 |
|
MD5 | 1c5fd5d1cbae81e5518214a7dc5f3145 |
|
BLAKE2b-256 | 9ecfb6e00c7ba89f2ebe534973f2511e0cc9876720fff60867626e80090dc503 |