If you know the length of the string that you want to cut off the
beginning, you could use slice:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#slice
Really, though, you might be going about this in a strange way. It
might be better to use the url tag to get the correct URL that
On Fri, Oct 31, 2008 at 11:55 AM, Frank Peterson
<[EMAIL PROTECTED]>wrote:
>
> I am using the following
> {{ section.get_absolute_url|cut:"/news/" }}
> on a string that is
> /news/new-york-jets/news/
>
> I need to remove the first /news but the CUT filter removes all
> instances of it, is there a
I am using the following
{{ section.get_absolute_url|cut:"/news/" }}
on a string that is
/news/new-york-jets/news/
I need to remove the first /news but the CUT filter removes all
instances of it, is there a way for me to remove on the first "/news"?
3 matches
Mail list logo