I am trying to create the following population script. The script is sited in the project root folder and starts with these lines :
import os os.environ.setdefault ('DJANGO_SETTINGS_MODULE', 'pyguess.settings') import django django.setup ()
but it Fails to return this error:
traceback (most recent call final): file "/ home / desousa / djcode / pyguess / populate_core.py", line 5, & lt ; Module & gt; Django.setup () AttributeError: There is no attribute 'setup' in the 'module' object
What's going wrong here? Did imported degeneration instructions have failed anyway?
No comments:
Post a Comment