Skip to content

SETTINGS_MODULE attribute missing from django.conf.settings #1174

@ljodal

Description

@ljodal

Bug report

What's wrong

Accessing django.conf.settings.SETTINGS_MODULE produces an 'Settings' object has no attribute 'SETTINGS_MODULE' error. This attribute is set in the Settings class:

https://github.com/django/django/blob/9b0c9821ed4dd9920cc7c5e7b657720d91a89bdc/django/conf/__init__.py#L188

How is that should be

The SETTINGS_MODULE should be defined as a str attribute

I tried to fix this by adding the attribute to the Settings class, but that didn't work. Not sure if I should add it to the LazySettings stub or rather in the plugin?

System information

  • OS:
  • python version: 3.10
  • django version: 4.0
  • mypy version: 0.981
  • django-stubs version: latest master
  • django-stubs-ext version: latest master

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions