I am trying to programmatically create a PostPage
object. This class inherits from wagtail's Page
model:
post = PostPage.objects.create(
title='Dummy',
intro='This is just for testing dummy',
body='Lorem ipsum dolor...',
first_published_at=datetime.strptime(f'2019-01-01', '%Y-%m-%d')
)
However, I am getting the following error:
ValidationError: {'path': ['This field cannot be blank.'], 'depth': ['This field cannot be null.']}
I need to create some dummy Page
objects, so I wonder how I can solve this problem.