Tuesday, February 21, 2012

Re: import error

Hi,

You must add 'mysite'' in your INSTALLED_APP list in settings.py

2012/2/21 dummyman dummyman <tempovan@gmail.com>
Hi ,

I have a django project and a standalone python script . From the view function, i have invoked the standalone script. I am getting the error ." No module named <module name >

 

this is my code for standalone script

import os

os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'

from django.conf import settings

after that i ve imported the app inside this
.

from mysite.app.models import some
but still i am getting the error no module  named mysite 
Please help in finding the reason for the error

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment