By using:

python manage.py shell

all the 'settings' are taken care of for you so you don't have to do any
exports or anything like that. The import statement for Context and Template
should work fine when you use the above command.

Vincent


On 7/2/07 2:14 PM, "walterbyrd" <[EMAIL PROTECTED]> wrote:

> 
> I am going through the django book. I am on Chapter 4: The Django
> template system.
> 
> In the example given, the first line reads:
> 
>>>> from django.template import Template, Context
> 
> But, that will produce a screen full of errors.
> 
> In the comments, it is suggested to change to the directory in which
> manage.py resides, and run:
> 
> python manage.py shell
> 
> That works, but I don't know why. That command runs iPython, but not
> just iPython. If I try to just run iPython without that "python
> manage.py shell" command, I get the same errors when I try the "from
> django.template import Template, Context"
> 
> This is also in the comments:
> 
> ---
> Be sure to mention to users to set the environment variable
> DJANGO_SETTINGS_MODULE:
> 
> export DJANGO_SETTINGS_MODULE=settings
> ---
> 
> I'm sorry, but I'm just getting started. These people are going *way*
> over my head. Could somebody explain what is going on?
> 
> 
> > 

-- 




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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