Probable bug in templates - default tags not always loading properly

29 views
Skip to first unread message

Collin Grady

unread,
Jun 5, 2008, 6:43:45 PM6/5/08
to django-d...@googlegroups.com
User reported an issue, http://code.djangoproject.com/ticket/7377

Alex keeps closing it, but this appears to be a valid bug, which I can duplicate
every time I open a python shell:

http://dpaste.com/55054/

As posted in the ticket, it appears that the default tags are not loaded until
the file loader.py is parsed - so if you import Template and Context, they don't
work, yet the moment you import loader, they do - is this an intentional
decision, or a valid issue?

--
Collin Grady

...[Linux's] capacity to talk via any medium except smoke signals.
-- Dr. Greg Wettstein, Roger Maris Cancer Center

alex....@gmail.com

unread,
Jun 5, 2008, 7:02:49 PM6/5/08
to Django developers
Hrm, this does not occur for me even after I remove all .pyc files
from the django dir.

On Jun 5, 5:43 pm, Collin Grady <cgr...@gmail.com> wrote:
> User reported an issue,http://code.djangoproject.com/ticket/7377

Trevor Caira

unread,
Jun 5, 2008, 7:57:36 PM6/5/08
to Django developers
On Jun 5, 7:02 pm, "alex.gay...@gmail.com" <alex.gay...@gmail.com>
wrote:
> Hrm, this does not occur for me even after I remove all .pyc files
> from the django dir.
Are you sure you're importing both Template and Context? I get the
same error as OP.

Trevor

alex....@gmail.com

unread,
Jun 5, 2008, 8:02:46 PM6/5/08
to Django developers
Yep, I just did it, how are you guys starting the python interpreter?

Collin Grady

unread,
Jun 5, 2008, 8:03:41 PM6/5/08
to django-d...@googlegroups.com
Trevor Caira said the following:

> Are you sure you're importing both Template and Context? I get the
> same error as OP.

I don't have to import Context to trip this, only Template

--
Collin Grady

Since a politician never believes what he says, he is surprised
when others believe him.
-- Charles DeGaulle

Collin Grady

unread,
Jun 5, 2008, 8:46:09 PM6/5/08
to django-d...@googlegroups.com
alex....@gmail.com said the following:

> Yep, I just did it, how are you guys starting the python interpreter?

python

no manage.py, no ipython, nothing special, except my env has
DJANGO_SETTINGS_MODULE set right

--
Collin Grady

I had the rare misfortune of being one of the first people to try and
implement a PL/1 compiler.
-- T. Cheatham

alex....@gmail.com

unread,
Jun 5, 2008, 8:54:44 PM6/5/08
to Django developers
Ok, I see it when I start with just python, not if I use manage.py
though.

On Jun 5, 7:46 pm, Collin Grady <cgr...@gmail.com> wrote:
> alex.gay...@gmail.com said the following:

mg

unread,
Jun 11, 2008, 6:57:15 PM6/11/08
to Django developers
Has any headway been made on this? Should I reopen the ticket that was
referenced above?

thanks,
Matt

On Jun 5, 7:54 pm, "alex.gay...@gmail.com" <alex.gay...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages