mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Update hooks.rst (#5044)
Document and Image fields changed from `uploaded_by` to `uploaded_by_user`
This commit is contained in:
parent
f881420a98
commit
f39f018ebf
@ -705,7 +705,7 @@ Choosers
|
||||
@hooks.register('construct_document_chooser_queryset')
|
||||
def show_my_uploaded_documents_only(documents, request):
|
||||
# Only show uploaded documents
|
||||
documents = documents.filter(uploaded_by=request.user)
|
||||
documents = documents.filter(uploaded_by_user=request.user)
|
||||
|
||||
return documents
|
||||
|
||||
@ -724,7 +724,7 @@ Choosers
|
||||
@hooks.register('construct_image_chooser_queryset')
|
||||
def show_my_uploaded_images_only(images, request):
|
||||
# Only show uploaded images
|
||||
images = images.filter(uploaded_by=request.user)
|
||||
images = images.filter(uploaded_by_user=request.user)
|
||||
|
||||
return images
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user