summaryrefslogtreecommitdiffstats
path: root/core/models.py
blob: 3df20887f80cb39bfa69f0a4fb7c0bd0ed09359b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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