Skip to main content

qrcode filters and views for django

Project description

提供qrcode相关的filter和view

Quick start

  1. Install:

    pip install django_qrcode2
    
  2. Add “qrcode2” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'qrcode2',
    ]
    
  3. [Optional] Include the qrcode2 URLconf in your project urls.py like this:

    url(r'^qrcode/', include('qrcode2.urls')),
    
  4. No migration needed

  5. 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.

Files for django-qrcode2, version 0.5.0
Filename, size File type Python version Upload date Hashes
Filename, size django-qrcode2-0.5.0.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page