> i want to display a snippet of data from a html source, and i want to
> strip it of html because an unclose tag will make the rest of the page
> look like
You have the striptags tag:
http://www.djangoproject.com/documentation/templates/#striptags
You can also access the function from outside the templates. It is in:
django/utils/html.py:
def strip_tags(value):
"Returns the given HTML with all tags stripped"
return re.sub(r'<[^>]*?>', '', value)
Hope it helps,
G
For a slightly different approach there is a patch I wrote for
providing an html-aware truncatewords filter at
http://code.djangoproject.com/ticket/2027 which you could try using.
thanks!
Floris van Manen
> As i'm still rather new to this django stuff, here is my simple
> question:
> Is it possible to install django on an alien server?
as long as you have shell access you can do so
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
That's generally a good rule of the thumb. However there are some
hosts that have shell access but not fastcgi or mod_python and there
could be hosts (although I know of none currently) that have fastcgi
and python but no shell access.
Frankie