mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2025-09-18 13:39:56 +08:00
Implement accounts app
This commit is contained in:
parent
82c48cf5eb
commit
bae2cc653e
17 changed files with 519 additions and 11 deletions
|
@ -3,13 +3,14 @@ Common model schemas
|
|||
"""
|
||||
|
||||
import re
|
||||
from typing import Literal
|
||||
from datetime import timedelta
|
||||
from typing import Literal
|
||||
|
||||
from pydantic import (
|
||||
BaseModel,
|
||||
StrictStr,
|
||||
EmailStr,
|
||||
Field,
|
||||
StrictStr,
|
||||
field_validator,
|
||||
model_validator,
|
||||
)
|
||||
|
@ -42,10 +43,8 @@ class Config(BaseModel):
|
|||
default=False,
|
||||
description="Whether to serve media files locally as oppossed to using a cloud storage solution.",
|
||||
)
|
||||
SMTP_HOST: StrictStr = Field(
|
||||
required=True, description="SMTP server address")
|
||||
SMTP_PORT: int = Field(
|
||||
default=587, description="SMTP server port (default: 587)")
|
||||
SMTP_HOST: StrictStr = Field(required=True, description="SMTP server address")
|
||||
SMTP_PORT: int = Field(default=587, description="SMTP server port (default: 587)")
|
||||
SMTP_USE_TLS: bool = Field(
|
||||
default=True, description="Whether to use TLS for SMTP connections"
|
||||
)
|
||||
|
@ -64,6 +63,9 @@ class Config(BaseModel):
|
|||
REFRESH_TOKEN_LIFETIME_DAYS: timedelta = Field(
|
||||
default=timedelta(days=3), description="Refresh token lifetime in days"
|
||||
)
|
||||
DEBUG_USER_PASSWORD: StrictStr = Field(
|
||||
required=True, description="Password for test users created during development"
|
||||
)
|
||||
|
||||
@field_validator("CORS_ORIGINS", "ALLOWED_HOSTS", mode="before")
|
||||
def parse_list(cls, v):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue