restructuredtext filter

Sett 84 ganger
Hopp til første uleste melding

chris....@gmail.com

ulest,
12. des. 2005, 13:10:5312.12.2005
til Django users
I was previously using the 0.90 Egg file, and I got the
restructuredtext filter working by adding:

from django.contrib.markup.templatetags import markup

into my views.py file for my app. Then I could say someting like:

article.content|restructuredtext

in my .html file, and it worked.

Today, I moved to the development version of django using svn. I have
everything working like before except the restructuredtext filter. I
have tried the same as above, and also changing the import line to

from django.contrib.markup.templatetags.markup import restructuredtext

But that still doesn't work. Any ideas?

Thanks

James Bennett

ulest,
12. des. 2005, 13:15:2512.12.2005
til django...@googlegroups.com
On 12/12/05, chris....@gmail.com <chris....@gmail.com> wrote:
> Today, I moved to the development version of django using svn. I have
> everything working like before except the restructuredtext filter. I
> have tried the same as above, and also changing the import line to

Do you have the tag {% load markup %} in your template?


--
"May the forces of evil become confused on the way to your house."
-- George Carlin

chris....@gmail.com

ulest,
12. des. 2005, 13:28:5912.12.2005
til Django users
I do now!

I had to copy django/contrib/markup/templatetags/markup.py to
django/templatetags and the with the {% load markup %} line the filter
works now.

Thank you for your help!

Jacob Kaplan-Moss

ulest,
12. des. 2005, 13:33:4212.12.2005
til django...@googlegroups.com
On Dec 12, 2005, at 12:28 PM, chris....@gmail.com wrote:
> I had to copy django/contrib/markup/templatetags/markup.py to
> django/templatetags and the with the {% load markup %} line the filter
> works now.

You don't have to do that either.

Just put "django.contrib.markup" in your INSTALLED_APPS setting, then
{% load markup %} will work. See http://www.djangoproject.com/
documentation/templates/#custom-tag-and-filter-libraries for more
information.

Jacob

chris....@gmail.com

ulest,
12. des. 2005, 13:56:3112.12.2005
til Django users
Even better.

Thanks again!

Svar alle
Svar til forfatter
Videresend
0 nye meldinger