Fix ModuleNotFoundError for pydantic_settings by using standard pydantic
This commit is contained in:
parent
741f301b11
commit
4857a0347c
@ -1,10 +1,10 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from pydantic_settings import BaseSettings
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
class Settings(BaseModel):
|
||||
PROJECT_NAME: str = "Notes API"
|
||||
API_V1_STR: str = "/api/v1"
|
||||
|
||||
@ -20,8 +20,10 @@ class Settings(BaseSettings):
|
||||
# CORS
|
||||
CORS_ORIGINS: list[str] = ["*"]
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
case_sensitive = True
|
||||
model_config = {
|
||||
"env_file": ".env",
|
||||
"case_sensitive": True,
|
||||
}
|
||||
|
||||
|
||||
settings = Settings()
|
||||
|
Loading…
x
Reference in New Issue
Block a user