Skip to main content

提供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' %}

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)

Uploaded Source

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

Hashes for django-qrcode2-0.5.0.tar.gz
Algorithm Hash digest
SHA256 8de9dbd5fd7a543d1200aa7ed3d201037f3d16321089c9deec0bf5648c967fd6
MD5 6730eb5d7aa28a54bfcff96663086040
BLAKE2b-256 f7dcea3314ff486645af30162e1946fc5e8a3e607ef778579133fcb15c66afc1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.0 This release

1 file

0.4.3

1 file

0.4.2

1 file

0.4.1

1 file

0.4.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page