Yes, absolutely.
Use the builtin template filter:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#safe
All output by default from Django is auto escaped to avoid possibly
malicious html/javascript injection. An example would be by starting a
comment with a , and not closing the tag.
Hello,
I've been looking into trying to order a relation based on some
arithmetic on each model's fields. This would ideally be at a database
level, and not a brute force python way. A simple example which I
can't seem to get to work is a sum of two fields.
For example, I want to sum a total amo
Hello,
I was wondering if it was at all possible to remove line breaks from a
text passed in from a template variable. Ideally I'd like to do
something like: {{ text|cut:"\r\n" }} , but that doesn't seem to work.
I've tried googling and searching on the mailing list with no results.
Thanks for y
y as
I would like it to.
Thanks again,
- Eric
On Jun 9, 4:35 am, Daniel Roseman
wrote:
> On Jun 9, 5:23 am, EricR86 wrote:
>
>
>
> > Hello,
>
> > I have a small issue in terms callable objects inside of contexts. I'm
> > having trouble figuring out how to
y as
I would like it to.
Thanks again,
- Eric
On Jun 9, 4:35 am, Daniel Roseman
wrote:
> On Jun 9, 5:23 am, EricR86 wrote:
>
>
>
> > Hello,
>
> > I have a small issue in terms callable objects inside of contexts. I'm
> > having trouble figuring out how to
y as
I would like it to.
Thanks again,
- Eric
On Jun 9, 4:35 am, Daniel Roseman
wrote:
> On Jun 9, 5:23 am, EricR86 wrote:
>
>
>
> > Hello,
>
> > I have a small issue in terms callable objects inside of contexts. I'm
> > having trouble figuring out how to
Hello,
I have a small issue in terms callable objects inside of contexts. I'm
having trouble figuring out how to have the call evaluated everytime
the context is used/rendered. An example:
some_context = {
'random': random(),
}
def some_view(request):
return render_to_response('some_tem
7 matches
Mail list logo