On Fri, Apr 4, 2008 at 8:59 AM, Pythoni <[EMAIL PROTECTED]> wrote:

>
> My project directory looks like this
>
> C:\Django\projects\shop\apps\shop\views
>
> I have this  simple program
> ####
> import sys,os
> sys.path += ['C:\\Python23\\Lib\\site-packages\\django\\app']
> sys.path += ['C:\\Django\\projects\\','C:\\Django\\projects\\shop\\']
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'shop.settings'
> from django.models.shop import products
> ##########
> If this program is started from
> C:\Django\projects\shop  it works OK
>
> But if I move the program to
> C:\Django\projects\shop\apps\shop\views
> it fails  with
> EnvironmentError: Could not import DJANGO_SETTINGS_MODULE
> 'shop.settings' (is
>  it on sys.path?): No module named shop
>
> Can anyone explain why it does not work from C:\Django\projects\shop
> \apps\shop\views
> ?
> Thank you
> L>
>

Try removing the trailing backslashes from your additions to sys.path.

Karen

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to