Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable pylint and autocomplete support for IDEs #441

Open
proapi opened this issue Aug 18, 2022 · 0 comments
Open

Enable pylint and autocomplete support for IDEs #441

proapi opened this issue Aug 18, 2022 · 0 comments

Comments

@proapi
Copy link

proapi commented Aug 18, 2022

Hi,

after switching to django-split-settings, and setting up the project with examples supplied in the documentation I have a problem, because my pylint configuration is complaining about missing attributes inside settings module:

************* Module xxx
xxx.py:114:23: E1101: Module 'project.settings' has no 'DEBUG' member (no-member)

I also don't have autocomplete within PyCharm/VSCode.

Anything that I can do to import all of the settings when checking the code?

Here is my init.py inside settings module:

"""
This is a django-split-settings main file.
For more information read this:
https://github.com/sobolevn/django-split-settings
Default environment is `developement`.
To change settings file:
`DJANGO_ENV=production python manage.py runserver`
"""
from os import environ

from split_settings.tools import include
from split_settings.tools import optional

ENV = environ.get("DJANGO_ENV") or "development"

base_settings = [
    "components/django.py",
    "components/database.py",
    "components/emails.py",
    # Select the right env:
    f"environments/{ENV}.py",
    # Optionally override some settings:
    optional("environments/local.py"),
]

# Include settings:
include(*base_settings)

Looking forward for a reply! Have a good day! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant