Opened 3 years ago

Last modified 3 years ago

#33162 closed New feature

AttributeError: 'Settings' object has no attribute '__file__' — at Version 1

Reported by: Thomas Güttler Owned by: nobody
Component: Core (Other) Version: 3.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Thomas Güttler)

Sometimes you have no clue which settings file is active.

For other files I use this pattern, to see which actual file is loaded:

assert 0, mylib.__file__

Unfortunately this does not work for django.conf.settings:

AttributeError: 'Settings' object has no attribute '__file__'

It would be super cool, if this attribute would be available.

Change History (1)

comment:1 by Thomas Güttler, 3 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top