diff options
| author | Danilo M. <danix@danix.xyz> | 2026-05-01 12:47:22 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-05-01 12:47:22 +0200 |
| commit | ba5438abaa430358eeb69b1376737ce61a3d68dc (patch) | |
| tree | 581baba65edf59a60ee6a069d381a747d123f6b4 /core/models.py | |
| parent | aec3c628fb6196dd2d3cbfba84fe70a66c727833 (diff) | |
| download | publisher-ba5438abaa430358eeb69b1376737ce61a3d68dc.tar.gz publisher-ba5438abaa430358eeb69b1376737ce61a3d68dc.zip | |
feat: Article dataclass and ARTICLE_TYPES
Diffstat (limited to 'core/models.py')
| -rw-r--r-- | core/models.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/models.py b/core/models.py new file mode 100644 index 0000000..3df2088 --- /dev/null +++ b/core/models.py @@ -0,0 +1,15 @@ +from __future__ import annotations +from dataclasses import dataclass +from pathlib import Path + +ARTICLE_TYPES = ["Life", "Photo", "Link", "Quote", "Tech"] + + +@dataclass +class Article: + slug: str + lang: str # "it" | "en" + path: Path + frontmatter: dict + has_translation: bool + translation_path: Path | None |
