fnp
/
wolnelektury.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
locale
[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