On Mon, 2007-07-02 at 18:15 -0700, walterbyrd wrote:
> On Jul 2, 5:13 pm, Carl Karsten <[EMAIL PROTECTED]> wrote:
> 
> > "not using X" does not say what you are doing - my best guess is "what will 
> > be
> > available if I just run python?"  if so, the answer is "nothing other than 
> > you
> > can import django."
> 
> As I mentioned, this is what I was trying to do:
> 
> >>> from django.template import Template, Context
> 
> It does not work from the standard python prompt, and it does not work
> from ipython.

Since ipython and "the standard python prompt" are eqiuvalents for each
other, this shouldn't be surprising. There's nothing special about
ipython w.r.t. Django -- it's just a fancier interactive prompt.

>   It does work if I launch a shell with: python manage.py
> shell.

Yes, because manage.py takes care of settings. If you want to do that
manually, you need to set the DJANGO_SETTINGS_MODULE environment
variable or configure settings manually in your code. This is documented
here:

http://www.djangoproject.com/documentation/settings/

(see "using settings without DJANGO_SETTINGS_MODULE" at the end of that
file for another approach).

Regards,
Malcolm

-- 
I don't have a solution, but I admire your problem. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
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