Django RiotJS Helper
A small, rudimentary helper app for RiotJS (https://riot.js.org) integration into django projects.
Quickstart
Install Django RiotJS Helper:
pip install django-riotjs-helper
Add it to your INSTALLED_APPS:
INSTALLED_APPS = (
...
'riotjs_helper',
...
)
Add this to your base template (base.html):
{% include 'riotjs_helper/riotjs_core.html' %}
{% block riot_tags %}
{% endblock riot_tags %}
{% include 'riotjs_helper/riotjs_mount.html' %}
If you plan on using django rest framework you can switch riotjs_core.html to the more elaborate riotjs_setup.html:
{% include 'riotjs_helper/riotjs_setup.html' %}
This setup requires some additional libraries as well, allready included in the requirements.txt:
djangorestframework
django-filter
django-rest-swagger
httpie
Markdown
python-dateutil
coreapi
coreapi-cli
coreschema
And these has to be added to your INSTALLED_APPS, urls has to be updated etc.
And then to create some tags:
python manage.py riot_tag <appname> <tag1-name> <tag2-name>
In the page you want to use your tag:
{% block content %}
...
<tag1-name></tag1-name>
...
<tag2-name></tag2-name>
...
{% endblock %}
{% block riot_tags %}
{% include '<appname>/include/<tag1-name>_tag.html' %}
{% include '<appname>/include/<tag2-name>_tag.html' %}
{% endblock riot_tags %}
If you need to add more context to your tags you can do that by editing the generated include files, for instance like so:
{% load static %}
<script src="{% static '<appname>/tags/<tag1-name>.tag' %}" type="riot/tag"></script>
<script>
riot_context['<tag1-name>'] = {more_context_goes_here: { ... something fancy ...}};
</script>
If you want to look at some boilerplate/example code generate your tags with the –example-code option:
python manage.py riot_tag <appname> <tag1-name> <tag2-name> --example-code
History
0.1.0 (2018-09-23)
First release on PyPI.
Metadata
Release files for django-riotjs-helper 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-riotjs-helper-0.1.1.tar.gz | 7.5 kB | Without provenance | Details for django-riotjs-helper-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_riotjs_helper-0.1.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for django_riotjs_helper-0.1.1-py2.py3-none-any.whl |
Total release size: 14.1 kB
Release files / django-riotjs-helper-0.1.1.tar.gz
| Download URL | django-riotjs-helper-0.1.1.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a39b920d22bac71c037c62d514559dc8cf1f25da93b9429d885405ed099ba6d
|
|
BLAKE2b-256 checksum How to use checksums |
9b7598f98b1857aa3082c1b82ab5cd810cb36955229a3791abba3d316b5f098f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|
Release files / django_riotjs_helper-0.1.1-py2.py3-none-any.whl
| Download URL | django_riotjs_helper-0.1.1-py2.py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
169f3f8d5de68b249c1015da720a2b1a02f3e4192bda6d19352350e958508418
|
|
BLAKE2b-256 checksum How to use checksums |
34d4a4ac780544b5d4781c3b245aac9477c96b30d19deae3fc85b80e84121e68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|
Security for django-riotjs-helper 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.