add sb2nov theme to data_models.py

This commit is contained in:
Sina Atalay 2024-02-15 19:30:57 +01:00
parent 9cfe6ed159
commit 8eca448630
1 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ import ruamel.yaml
from .themes.classic import ClassicThemeOptions from .themes.classic import ClassicThemeOptions
from .themes.moderncv import ModerncvThemeOptions from .themes.moderncv import ModerncvThemeOptions
from .themes.mcdowell import McdowellThemeOptions from .themes.sb2nov import Sb2novThemeOptions
# Create a custom type called RenderCVDate that accepts only strings in YYYY-MM-DD or # Create a custom type called RenderCVDate that accepts only strings in YYYY-MM-DD or
# YYYY-MM format: # YYYY-MM format:
@ -933,11 +933,11 @@ class CurriculumVitae(RenderCVBaseModel):
# See https://docs.pydantic.dev/2.5/concepts/fields/#discriminator for more information # See https://docs.pydantic.dev/2.5/concepts/fields/#discriminator for more information
# about discriminators. # about discriminators.
RenderCVDesign = Annotated[ RenderCVDesign = Annotated[
ClassicThemeOptions | ModerncvThemeOptions | McdowellThemeOptions, ClassicThemeOptions | ModerncvThemeOptions | Sb2novThemeOptions,
pydantic.Field(discriminator="theme"), pydantic.Field(discriminator="theme"),
] ]
rendercv_design_validator = pydantic.TypeAdapter(RenderCVDesign) rendercv_design_validator = pydantic.TypeAdapter(RenderCVDesign)
available_themes = ["classic", "moderncv", "mcdowell"] available_themes = ["classic", "moderncv", "sb2nov"]
class RenderCVDataModel(RenderCVBaseModel): class RenderCVDataModel(RenderCVBaseModel):