This repository has been archived on 2023-01-27. You can view files and clone it, but cannot push or open issues or pull requests.
flask-wikipages/app/page_model.py

15 lines
312 B
Python

from pydantic import BaseModel
from typing import List
from app.config import PANDOC_PATH
class WikiPage(BaseModel):
name: str
title: str
credits: List[str]
standalone: bool
template: str
def get_file(self, filename: str) -> str:
return f'{PANDOC_PATH}/{self.name}/{filename}'