import patterns as patterns
from django.conf import settings
from django.urls import path
from django.conf.urls import url
from django.conf.urls.static import static
from . import views
urlpatterns = [
path('', views.index),
path('link/', views.make_qr_code, name='qr')
]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf import settings
from django.urls import path
from django.conf.urls import url
from django.conf.urls.static import static
from . import views
urlpatterns = [
path('', views.index),
path('link/', views.make_qr_code, name='qr')
]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
def make_qr_code(url):
s = url.GET.get('test',"")
img = qrcode.make(s).save("site.png")
return HttpResponse('<img src = "site.png">')