from django.core import management;import tutorial.settings as settings;management.setup_environ(settings) Traceback (most recent call last): File "It turned out that module setup_environ was removed from django.core.management in v1.6 while pydev still calls this module.", line 1, in AttributeError: 'module' object has no attribute 'setup_environ'
In order to fix the issue, you just need to run the following statement:
os.environ['DJANGO_SETTINGS_MODULE'] = '(project).settings'Please replace (project) with your django project name.
2 comments:
Could you please explain where and when execute this commands (I'm a beginner)
Put the code in Preferences-PyDev- "Interactive Console" - "Initial interpreter commands."
from django.conf import settings
settings.configure()
This is simpler. :)
Post a Comment