79390592

Date: 2025-01-27 11:43:25
Score: 1.5
Natty:
Report link

The error you receive indicates that there is an issue with the formatting of your .env file. In an nutshell (as @OlafdeL mentioned) for pydantic greater than 2.0.0:

from pydantic_settings import BaseSettings


class EnvSettings(BaseSettings):
    allowed_hosts: list[str]

and then your .env should look like this:

ALLOWED_HOSTS='["host-1", "host-2"]'
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @OlafdeL
  • Low reputation (1):
Posted by: Chris Samouchos