Opened 3 years ago

Last modified 3 years ago

#33162 closed New feature

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

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

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 (0)

Note: See TracTickets for help on using tickets.
Back to Top