mirror of
https://github.com/hay-kot/mealie.git
synced 2025-07-07 13:32:21 -07:00
Feature/group based notifications (#918)
* fix group page * setup group notification for backend * update type generators * script to auto-generate schema exports * setup frontend CRUD interface * remove old notifications UI * drop old events api * add test functionality * update naming for fields * add event dispatcher functionality * bump to python 3.10 * bump python version * purge old event code * use-async apprise * set mealie logo as image * unify styles for buttons rows * add links to banners
This commit is contained in:
parent
50a341ed3f
commit
190773c5d7
74 changed files with 1992 additions and 1229 deletions
|
@ -1,18 +1,26 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Tuple
|
||||
|
||||
import black
|
||||
import isort
|
||||
from jinja2 import Template
|
||||
|
||||
|
||||
def render_python_template(template_file: Path, dest: Path, data: dict) -> str:
|
||||
def render_python_template(template_file: Path | str, dest: Path, data: dict) -> str:
|
||||
"""Render and Format a Jinja2 Template for Python Code"""
|
||||
tplt = Template(template_file.read_text())
|
||||
if isinstance(template_file, Path):
|
||||
tplt = Template(template_file.read_text())
|
||||
else:
|
||||
tplt = Template(template_file)
|
||||
|
||||
text = tplt.render(data=data)
|
||||
text = black.format_str(text, mode=black.FileMode())
|
||||
dest.write_text(text)
|
||||
isort.file(dest)
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue