Skip to content

Can't use ~ in dotenv file in Settings #1803

@PrettyWood

Description

@PrettyWood

@HenryDashwood The issue here is that you use ~/.env, which is not directly resolved by pathlib.Path.
You could change it to

   class Config:
        env_file = os.path.expanduser('~/.env')

Maybe we could add expanduser directly in the code when env_path is created

Originally posted by @PrettyWood in #1368 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions