sponsor alt
[wolnelektury.git] / src / chunks / views.py
1 from django.shortcuts import get_object_or_404
2 from . import models
3 from fnpdjango.utils.views import serve_file
4
5
6 def attachment(request, key, ext):
7     att = get_object_or_404(models.Attachment, key=key)
8     return serve_file(att.attachment.url)
9