Last active
July 19, 2024 07:36
-
-
Save TohidN/e617167a55c5c20e4b08cf694e2125d5 to your computer and use it in GitHub Desktop.
Customize context for Wagtail page model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_context(self, request, *args, **kwargs): | |
| context = super().get_context(request, *args, **kwargs) | |
| # Add extra variables and return the updated context. E.g. | |
| #context['blog_entries'] = BlogPage.objects.child_of(self).live() | |
| return context |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment