Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed the google QR code service to qrcode.tec-it.com #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions django_mfa/templatetags/otp_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
@register.filter
@stringfilter
def qrcode(value, alt=None):
url = conditional_escape("http://chart.apis.google.com/chart?%s" %
urlencode({'chs': '150x150', 'cht': 'qr', 'chl': value, 'choe': 'UTF-8'}))
url = conditional_escape("https://qrcode.tec-it.com/API/QRCode?data=" + value)
alt = conditional_escape(alt or value)

return format_html(u"""<img class="qrcode" src="%s" width="150" height="150" alt="%s" />""" % (url, alt))