papiez_ipsum/papiezator/views.py

16 lines
342 B
Python

# Create your views here.
from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return render(request,
"papiezator/index.html")
pass
def conclave(request, width, height):
with open("papiez.jpg", "rb") as file:
return HttpResponse(file.read(), mimetype="image/jpeg")