mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-23 16:14:48 +00:00
Renamed doc_serve signal to document_served
This commit is contained in:
parent
85db64d9f7
commit
6604ad1a80
2 changed files with 4 additions and 4 deletions
|
|
@ -59,4 +59,4 @@ def image_delete(sender, instance, **kwargs):
|
|||
instance.file.delete(False)
|
||||
|
||||
|
||||
doc_serve = Signal(providing_args=['request'])
|
||||
document_served = Signal(providing_args=['request'])
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from django.shortcuts import get_object_or_404
|
|||
from django.core.servers.basehttp import FileWrapper
|
||||
from django.http import HttpResponse
|
||||
|
||||
from wagtail.wagtaildocs.models import Document, doc_serve
|
||||
from wagtail.wagtaildocs.models import Document, document_served
|
||||
|
||||
|
||||
def serve(request, document_id, document_filename):
|
||||
|
|
@ -15,7 +15,7 @@ def serve(request, document_id, document_filename):
|
|||
response['Content-Disposition'] = 'attachment; filename=%s' % doc.filename
|
||||
response['Content-Length'] = doc.file.size
|
||||
|
||||
# Send doc_serve signal
|
||||
doc_serve.send(sender=doc, request=request)
|
||||
# Send document_served signal
|
||||
document_served.send(sender=doc, request=request)
|
||||
|
||||
return response
|
||||
|
|
|
|||
Loading…
Reference in a new issue