Hi Malcom, I am not sure the management commands are what I want, but the setting of the DJANGO_SETTINGS_MODULE environment variable helped. I had experimented with these settings already, but wasn't successful until now.
So, thanks for the help! Alex Am 18.07.2011 15:17, schrieb Malcolm Box: > On 18 July 2011 13:34, Alexander Crössmann > <alexander.croessm...@gmail.com > <mailto:alexander.croessm...@gmail.com>> wrote: > > Hi, > > I want to write a python script that works with django models without > runing the server. My OS ist Ubuntu 10.10. > > > I'd suggest using Django management commands: > https://docs.djangoproject.com/en/1.3//howto/custom-management-commands/ > > Much easier than doing things manually. > > > The settings work fine with testserver and apache but wenn I run the > that skript I geht the following error: > > ImportError: Settings cannot be imported, because environment variable > DJANGO_SETTINGS_MODULE is undefined. > > > You need to set the DJANGO_SETTINGS_MODULE environment variable. > > Malcolm > -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.