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
# start development environent -
react-pages deploy
# deploy into production
Django Integration
React Pages allows you to access django template context variables inside react!
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' %}
...
Now, you can just do
python manage.py react_pages develop
or, in production,
python manage.py react_pages deploy
That's it!
React Pages will pick-up the 'vote' page from 'poll_react_pages' project and do the nessecary work to make your react code available.
Feel free to access the global variable context
from your react jsx code.
Yeah, That's the the django template context!
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
Built Distribution
File details
Details for the file react-pages-0.0.1.tar.gz
.
File metadata
- Download URL: react-pages-0.0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2492012152836d8c96400c480192c7c3e07e623e53856c4b268bd357840d3ced |
|
MD5 | 201168a731b306cd9e1c7572401ca8ce |
|
BLAKE2b-256 | db71efcaca78b4faf79ddd541d5bf83b71fbcef9bfe10026c75e9bdaea342489 |
File details
Details for the file react_pages-0.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: react_pages-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9218d26feef499dbd380f03f2550079d3bf80856778817f33d28f4ffd681f4c7 |
|
MD5 | 0ab5a0735632ee7793bde935878f1921 |
|
BLAKE2b-256 | df8b63cc0f9e82ce131ff95c5c8cc1c848319aeb02a745a5c593e71da5f2527d |