I hope this helps, when working under windows (XP/7) this just works for me.
Replace <project> with whatever you have named it. >From the directory above where the project was created create a batch file (ie <project>.bat) containing the following set <project>_HOME=%CD% set DJANGO_SETTINGS_MODULE=<project>.settings set PYTHONPATH=%<project>_HOME% You can add any other additional pythonpath requirements with the delimiter of a semicolon ‘;’ You could also hardcode the “<project>_HOME” variable, but this is up to you Once done the following should work for you via the command prompt. Run the batch file above from the directory it was created in <project> cd <project> manage.py shell On Tuesday, 28 August 2012 09:01:25 UTC+10, Snorre Edwin wrote: > > Im on the Playing with the API part and seem to catch some troubles. > Everything has gone smoothly until this part. > > I write this and get the next error. This is with my enviromen_variable: > DJANGO_SETTINGS_MODULE > set to where I can find the settings.py in my project. > > C:\Prosjekter\Djangotest\testproject>python manage.py shell > ImportError: Could not import settings > 'C:\Prosjekter\Djangotest\testproject\testproject' (Is it on sys.path?): > Import by filename is not supported. > > With out the env variable I get this error: > C:\Prosjekter\Djangotest\testproject>python manage.py shell > ImportError: No module named user > > I have done the sync part and I can see that the postgreSQL have the > tables in its database. > I have also done everything right until this part. > > As i understood, I did not have to set env variable when I used python > manage.py shell. > > Can someone help me please:) > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/wcdjAC91blgJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.