We currently have a BlogPost class that looks like this:
import typing
from datetime import datetime
from gilbert.content import Templated, Content
class BlogPost(Templated, Content):
title: str
authors: list
posted: datetime
modified: typing.Union[None, datetime]
category: str
tags: list
template: str = "blog/post.html"
summary: str
draft: bool
We want to make sure a posted item (the post date) contains a proper datetime.
The following contains no posted however it seems to pass through the validation with no issues:
content_type: BlogPost
title: My Third Post!
authors:
- Alysha
category: software
summary: A short description
---
Hello!
Is there something we are getting wrong in our BlogPost definition here?
We currently have a
BlogPostclass that looks like this:We want to make sure a
posteditem (the post date) contains a proper datetime.The following contains no
postedhowever it seems to pass through the validation with no issues:Is there something we are getting wrong in our
BlogPostdefinition here?