mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-03-29 20:30:40 +00:00
Fix Page model recipes to pass 'self' as the page object ('page' is undefined)
This commit is contained in:
parent
b7fd5de8ec
commit
097f45f20b
1 changed files with 2 additions and 2 deletions
|
|
@ -112,7 +112,7 @@ First, ``models.py``:
|
|||
|
||||
def serve(self, path_components=[]):
|
||||
return render(request, self.template, {
|
||||
'page': page,
|
||||
'page': self,
|
||||
'echo': ' '.join(path_components),
|
||||
})
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ Now that we have the many-to-many tag relationship in place, we can fit in a way
|
|||
blogs = blogs.filter(tags__name=tag)
|
||||
|
||||
return render(request, self.template, {
|
||||
'page': page,
|
||||
'page': self,
|
||||
'blogs': blogs,
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue