qrcode filters and views for django
Project description
提供qrcode相关的filter和view
Quick start
Install:
pip install django_qrcode2
Add “qrcode2” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'qrcode2', ]
[Optional] Include the qrcode2 URLconf in your project urls.py like this:
url(r'^qrcode/', include('qrcode2.urls')),
No migration needed
Add filter to template like this:
{% load qrcode2 %} <!-- if an view with name 'qrcode' is provided, 'src' will be an url, otherwise it's an base64 data blob --> <img src="{{ 'some text' | qrcode_src }}"> <!-- insert an <img> with template inclusion --> {% include 'qrcode2/img.html' with text='hello' %}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-qrcode2-0.5.0.tar.gz
(4.4 kB
view details)
File details
Details for the file django-qrcode2-0.5.0.tar.gz
.
File metadata
- Download URL: django-qrcode2-0.5.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8de9dbd5fd7a543d1200aa7ed3d201037f3d16321089c9deec0bf5648c967fd6 |
|
MD5 | 6730eb5d7aa28a54bfcff96663086040 |
|
BLAKE2b-256 | f7dcea3314ff486645af30162e1946fc5e8a3e607ef778579133fcb15c66afc1 |