Skip to content

Commit

Permalink
fix: numerical values in options as int (#18)
Browse files Browse the repository at this point in the history
* fix: numerical values in options as int
  • Loading branch information
estahn authored Nov 28, 2023
1 parent b82efd1 commit 861c165
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 221 deletions.
9 changes: 5 additions & 4 deletions demo/demo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
from pathlib import Path
from typing import Dict, List

from pydantic import Field
from pydantic import Field
from pydantic.v1.fields import Undefined
from pydantic_settings import BaseSettings


from pydjantic import BaseDBConfig, to_django

# Build paths inside the project like this: BASE_DIR / 'subdir'.
Expand All @@ -41,7 +40,9 @@ class Config:
class GeneralSettings(BaseSettings):
# https://docs.djangoproject.com/en/dev/ref/settings/
SECRET_KEY: str = Field(default=Undefined, alias="DJANGO_SECRET_KEY")
DEBUG: bool = Field(default=False, )
DEBUG: bool = Field(
default=False,
)
DATABASES: DatabaseSettings = DatabaseSettings()

ALLOWED_HOSTS: List[str] = []
Expand Down Expand Up @@ -118,4 +119,4 @@ class Config:
env_file = CUR_DIR / ".env"


to_django(ProjectSettings())
to_django(ProjectSettings())
Loading

0 comments on commit 861c165

Please sign in to comment.