Skip to content

Commit d06aa24

Browse files
committed
Fix typo in code example
1 parent 0182512 commit d06aa24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/guides/defining-template-context.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ def add_page_images(context, request):
100100
Image = get_image_model()
101101
if "page" in context:
102102
if "hero_image" in context["page"]:
103-
context["hero_image"] = Image.objects.all().order("?").first()
103+
context["hero_image"] = Image.objects.all().order_by("?").first()
104104
if "main_image" in context["page"]:
105-
context["main_image"] = Image.objects.all().order("?").first()
105+
context["main_image"] = Image.objects.all().order_by("?").first()
106106

107107

108108
@register_context_modifier

0 commit comments

Comments
 (0)