Create a base page model for all other to inherit
This commit is contained in:
parent
67b8965e1f
commit
3986b30a64
3 changed files with 10 additions and 5 deletions
0
website/common/__init__.py
Normal file
0
website/common/__init__.py
Normal file
8
website/common/models.py
Normal file
8
website/common/models.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
from django.db import models
|
||||||
|
|
||||||
|
from wagtail.models import Page
|
||||||
|
|
||||||
|
|
||||||
|
class BasePage(Page):
|
||||||
|
class Meta:
|
||||||
|
abstract = True
|
|
@ -1,7 +1,4 @@
|
||||||
from django.db import models
|
from website.common.models import BasePage
|
||||||
|
|
||||||
from wagtail.models import Page
|
class HomePage(BasePage):
|
||||||
|
|
||||||
|
|
||||||
class HomePage(Page):
|
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue