ARRGH, 
sorry for the spam. 
The problem was that I have imported other django modules before calling 
execute_from_commandline...

Cheers, 
Stefan

On Saturday, December 1, 2012 5:57:31 PM UTC+1, Stefan Schwarzburg wrote:
>
> Hi, 
>
> I'm looking for help with the following problem:
>
> I have a project, in which I only use the django ORM and no other parts of 
> django. 
> In previous versions of that project (django < 1.4) I used code similar to 
> manage.py but I called 'settings.configure' before calling 
> 'execute_manager'. This worked fine. 
>
> However, in django 1.4, it does no longer work. Checking the current code 
> of a manage.py file, I tried calling 'execute_from_command_line', BUT 
> although the documentation (
> https://docs.djangoproject.com/en/1.4/topics/settings/#using-settings-without-setting-django-settings-module)
>  
> says that this should work, I always get the error:
>
> ImportError: Settings cannot be imported, because environment variable 
> DJANGO_SETTINGS_MODULE is undefined.
>
> Anyone who can help with this?
>
> Cheers, 
> Stefan
>

-- 
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/-/drKcrTr0v2gJ.
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.

Reply via email to