Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Frojd/django-react-templatetags
A quick way to add React components to your Django templates.
https://github.com/Frojd/django-react-templatetags
django django-templates reactjs
Last synced: 3 months ago
JSON representation
A quick way to add React components to your Django templates.
- Host: GitHub
- URL: https://github.com/Frojd/django-react-templatetags
- Owner: Frojd
- License: mit
- Created: 2015-12-15T21:12:33.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2024-01-09T13:50:49.000Z (12 months ago)
- Last Synced: 2024-09-19T14:38:15.710Z (3 months ago)
- Topics: django, django-templates, reactjs
- Language: Python
- Homepage:
- Size: 295 KB
- Stars: 439
- Watchers: 26
- Forks: 38
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- stars - Frojd/django-react-templatetags - A quick way to add React components to your Django templates. (Python)
- stars - Frojd/django-react-templatetags - A quick way to add React components to your Django templates. (Python)
README
[![Python tests](https://github.com/Frojd/django-react-templatetags/actions/workflows/main.yml/badge.svg?branch=develop)](https://github.com/Frojd/django-react-templatetags/actions/workflows/main.yml) [![PyPI version](https://badge.fury.io/py/django_react_templatetags.svg)](https://badge.fury.io/py/django_react_templatetags)
![Django-React-Templatetags](https://raw.githubusercontent.com/frojd/django-react-templatetags/develop/img/django-react-templatetags-logo.png)
# Django-React-Templatetags
This django library allows you to add React (16+) components into your django templates.
## Features
- Include react components using django templatetags
- Unlimited amount of components in one view
- Support custom models (that is from the beginning not json-serializable)
- Server side rendering with [Hypernova](https://github.com/airbnb/hypernova) or [Hastur](https://github.com/frojd/Hastur)## Installation
Install the library with pip:
```
$ pip install django_react_templatetags
```## Where to go from here?
You should first read [Getting started](https://github.com/Frojd/django-react-templatetags/blob/develop/docs/getting-started.md), then go through these topics:
- [Settings](https://github.com/Frojd/django-react-templatetags/blob/develop/docs/settings.md)
- [How to use the templatetags included in this library](https://github.com/Frojd/django-react-templatetags/blob/develop/docs/templatetags-params.md)
- [Adding a single component](https://github.com/Frojd/django-react-templatetags/blob/develop/docs/example-single-component.md)
- [Adding multiple components](https://github.com/Frojd/django-react-templatetags/blob/develop/docs/example-multiple-components.md)
- [Examples](https://github.com/Frojd/django-react-templatetags/blob/develop/docs/examples.md)
- [Working with models](https://github.com/Frojd/django-react-templatetags/blob/develop/docs/working-with-models.md)
- [Server side rendering](https://github.com/Frojd/django-react-templatetags/blob/develop/docs/server-side-rendering.md)
- [FAQ](https://github.com/Frojd/django-react-templatetags/blob/develop/docs/faq.md)## Tests
This library include tests, just run `python runtests.py`
You can also run separate test cases: `python runtests.py tests.test_filters.ReactIncludeComponentTest`
## Coverage
Make sure you have Coverage.py installed, then run `coverage run runtests.py` to measure coverage. We are currently at 95%.
## Contributing
Want to contribute? Awesome. Just send a pull request.
## Security
If you believe you have found a security issue with any of our projects please email us at [[email protected]]([email protected]).
## License
Django-React-Templatetags is released under the [MIT License](http://www.opensource.org/licenses/MIT).