Skip to content

Allow preventing or suppressing UserWarning #12

Open
@jpadilla

Description

@jpadilla

We use dotenv on our project/wsgi.py and project/celery.py for local development where we do have a .env. When we deploy to Heroku our logs get polluted with UserWarnings.

Workaround is to do the following:

with warnings.catch_warnings():
    warnings.simplefilter('ignore')
    dotenv.read_dotenv()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions