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

Diffsettings management command not working ? #84

Open
pakal opened this issue Aug 31, 2016 · 1 comment
Open

Diffsettings management command not working ? #84

pakal opened this issue Aug 31, 2016 · 1 comment

Comments

@pakal
Copy link

pakal commented Aug 31, 2016

The importd server runs fines, d()-injected settings work well, but when I use d.main() to issue django management commands, "diffsettings" doesn't work (although "shell" works).

Packages:
dj-database-url==0.4.1
Django==1.9.7
envdir==0.7
fhurl==0.1.8
importd==0.4.3
logging-tree==1.7
path.py==8.2.1
PIL==1.1.7
six==1.10.0
smarturls==0.1.6
speaklater==1.3
virtualenv==15.0.2

Traceback is below:

$ python tech_quizz_fetcher.py  diffsettings
Traceback (most recent call last):
  File "tech_quizz_fetcher.py", line 81, in <module>
    d.main()
  File "/home/pakal/webapps/tech_quizz_fetcher/ENV/lib/python2.7/site-packages/importd/__init__.py", line 836, in main
    self.do()
  File "/home/pakal/webapps/tech_quizz_fetcher/ENV/lib/python2.7/site-packages/importd/__init__.py", line 863, in do
    return self._act_as_manage(*args)
  File "/home/pakal/webapps/tech_quizz_fetcher/ENV/lib/python2.7/site-packages/importd/__init__.py", line 801, in _act_as_manage
    management.execute_from_command_line([sys.argv[0]] + list(args))
  File "/home/pakal/webapps/tech_quizz_fetcher/ENV/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/home/pakal/webapps/tech_quizz_fetcher/ENV/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/pakal/webapps/tech_quizz_fetcher/ENV/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/pakal/webapps/tech_quizz_fetcher/ENV/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/home/pakal/webapps/tech_quizz_fetcher/ENV/lib/python2.7/site-packages/django/core/management/commands/diffsettings.py", line 26, in handle
    settings._setup()
  File "/home/pakal/webapps/tech_quizz_fetcher/ENV/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
    % (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested settings, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
@amitu
Copy link
Owner

amitu commented Sep 4, 2016

Hey @pakal,

Thanks for reporting the issue. I am travelling right now, and would be able to work on it for sometime. Do let me know if you did your own exploration of the problem.

This feature need not be part of importd, may be we can take it out as a separate package.

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

2 participants