#33162: AttributeError: 'Settings' object has no attribute '__file__'
--------------------------------+--------------------------------------
     Reporter:  Thomas Güttler  |                    Owner:  nobody
         Type:  New feature     |                   Status:  new
    Component:  Core (Other)    |                  Version:  3.2
     Severity:  Normal          |               Resolution:
     Keywords:                  |             Triage Stage:  Unreviewed
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+--------------------------------------
Description changed by Thomas Güttler:

Old 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.

New 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.

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33162#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.95028c24372ebe33eb2df8c6035c993c%40djangoproject.com.

Reply via email to