Giter Site home page Giter Site logo

Comments (2)

jezdez avatar jezdez commented on May 29, 2024

Can you specify which version of Python and Django you've used for this? Again, I can't reproduce this locally.

from django-configurations.

stefanw avatar stefanw commented on May 29, 2024

Standard setup of Python 2.7.5, Django 1.5.4.

The setdefault of os.environ in manage.py can cover the error up in some cases.

It fails for me with this concrete example executed from the root of the repo:

$ ./manage.py runserver --settings=tests.settings.multiple_inheritance --configuration=Inheritance
Traceback (most recent call last):
  File "./manage.py", line 9, in <module>
    from configurations.management import execute_from_command_line
  File "/Users/sw/Code/django-configurations/configurations/management.py", line 3, in <module>
    importer.install(check_options=True)
  File "/Users/sw/Code/django-configurations/configurations/importer.py", line 77, in install
    commands = management.get_commands()
  File "/Users/sw/.virtualenvs/configurations/lib/python2.7/site-packages/django/core/management/__init__.py", line 109, in get_commands
    apps = settings.INSTALLED_APPS
  File "/Users/sw/.virtualenvs/configurations/lib/python2.7/site-packages/django/conf/__init__.py", line 53, in __getattr__
    self._setup(name)
  File "/Users/sw/.virtualenvs/configurations/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in _setup
    self._wrapped = Settings(settings_module)
  File "/Users/sw/.virtualenvs/configurations/lib/python2.7/site-packages/django/conf/__init__.py", line 132, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/Users/sw/.virtualenvs/configurations/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Users/sw/Code/django-configurations/configurations/importer.py", line 156, in load_module
    mod.__package__))
  File "/Users/sw/Code/django-configurations/configurations/importer.py", line 152, in load_module
    cls = getattr(mod, self.name)
AttributeError: Couldn't find configuration 'Inheritance' in module 'tests.settings':  'module' object has no attribute 'Inheritance'

The traceback shows that from management.get_commands it tries to access settings which are then setup without going through the usual execute_from_command_line stuff to parse the cmd line option --settings.

from django-configurations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.