Thank you for the very speedy reply. I really apprceciate that. Actually I
had tried the page/file name in place of the path as well and it still
would not work. What it turned out to be is, on the back end of a reboot
(because I took a break to up the memory on my macbook pro,) I rebooted and
signature for request is render(request, template_name, context, **kwargs)
So it should be like render(request, 'response_page.html', context=context)
On Sat, 24 Oct 2015 at 01:21 CTA2052 wrote:
> Hello All,
>
> This may be the most basic question to ask and believe me it does not come
> withou
On 24/08/13 14:56, Ariel Calzada wrote:
you have to append strings first
http://stackoverflow.com/questions/4386168/how-to-concatenate-strings-in-django-templates
and then call trans
2013/8/24 Some Developer mailto:someukdevelo...@gmail.com>>
I have a title and a header block which norm
On 24/08/13 14:56, Ariel Calzada wrote:
you have to append strings first
http://stackoverflow.com/questions/4386168/how-to-concatenate-strings-in-django-templates
and then call trans
2013/8/24 Some Developer mailto:someukdevelo...@gmail.com>>
I have a title and a header block which norm
you have to append strings first
http://stackoverflow.com/questions/4386168/how-to-concatenate-strings-in-django-templates
and then call trans
2013/8/24 Some Developer
> I have a title and a header block which normally contain static text but
> for some pages I need to display some dynamic i
Exactly. Thanks.
On Nov 21, 4:45 pm, Tim Chase wrote:
> > When I do in a template I get > id="item_1"> in the rendered html as expected.
>
> > Now I want to do {% cycle '' ' > class="odd" id="item_{{ product.id }}">' %}, but the desired
> > concatenation does not happen.
>
> > How do I achieve
> When I do in a template I get id="item_1"> in the rendered html as expected.
>
> Now I want to do {% cycle '' ' class="odd" id="item_{{ product.id }}">' %}, but the desired
> concatenation does not happen.
>
> How do I achieve what I want?
sounds like you want something like
-tim
Might not be the easiest way, but you could use a custom filter:
def formsbyfield(forms,field):
""" Given a list of similar forms, and a field name,
return a list of formfields, one from each form.
"""
return [form.fields.get(field,'') for form in forms]
register.filter('forms
On Oct 13, 8:09 am, Goon <[EMAIL PROTECTED]> wrote:
> can you use variables in django's templates?
>
> so like {% for x in y %}
>
> and then something like
>
> {% int x =3; x++ %}
Recently I found some handy django snippet which can be usefull for
you.
http://www.djangosnippets.org/snippets/9/
On Oct 13, 8:35 pm, "Nikola Stjelja" <[EMAIL PROTECTED]> wrote:
> On 10/13/07, Goon <[EMAIL PROTECTED]> wrote:
> > fair enough, I'm not happy that I can't get {{for x in y[1:5]}}
>
> What's the problem. You just send the template 'y':range(1,6). It's very
> simple. I don't think the template syste
On Oct 13, 3:41 am, Goon <[EMAIL PROTECTED]> wrote:
> Ok, but let's say I have a template like {{for x in y}}, and I would
> like the x's seperated by commas, but I don't want a comma after the
> last one? or better yet cut off after the first 100 characters with a
> "..."
The key here is that
On 10/13/07, beck917 <[EMAIL PROTECTED]> wrote:
>
> Maybe use the custom template filters is a nice way~
>
> http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-filters
>
Yep. The point is: less programming in html, the better. That's the reason
most experienced p
Maybe use the custom template filters is a nice way~
http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-filters
2007/10/13, Nikola Stjelja <[EMAIL PROTECTED]>:
>
>
>
> On 10/13/07, James Bennett <[EMAIL PROTECTED]> wrote:
> >
> >
> > On 10/13/07, Goon <[EMAIL PR
On Oct 13, 3:26 am, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 10/13/07, Goon <[EMAIL PROTECTED]> wrote:
>
> > fair enough, I'm not happy that I can't get {{for x in y[1:5]}}
>
> Perhaps the documentation will make you happy:
Ok, but let's say I have a template like {{for x in y}}, and I
On 10/13/07, James Bennett <[EMAIL PROTECTED]> wrote:
>
>
> On 10/13/07, Goon <[EMAIL PROTECTED]> wrote:
> > fair enough, I'm not happy that I can't get {{for x in y[1:5]}}
What's the problem. You just send the template 'y':range(1,6). It's very
simple. I don't think the template system should be
On 10/13/07, Goon <[EMAIL PROTECTED]> wrote:
> fair enough, I'm not happy that I can't get {{for x in y[1:5]}}
Perhaps the documentation will make you happy:
http://www.djangoproject.com/documentation/templates/#slice
--
"Bureaucrat Conrad, you are technically correct -- the best kind of corre
fair enough, I'm not happy that I can't get {{for x in y[1:5]}}
dammit!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To un
On 10/13/07, Goon <[EMAIL PROTECTED]> wrote:
> can you use variables in django's templates?
Yes.
> and then something like
> {% int x =3; x++ %}
No.
Django's template language is not Python or any other programming
language. Its sole purpose is presentational logic.
--
"Bureaucrat Conrad,
Simple answer is no. But you can may be try porting mako to to django
On 10/13/07, Goon <[EMAIL PROTECTED]> wrote:
>
>
> can you use variables in django's templates?
>
> so like {% for x in y %}
>
> and then something like
>
> {% int x =3; x++ %}
>
> or something like that, would be mighty helpful
Hi Patrick,
You might find some helpful responses in this thread:
http://groups.google.com/group/django-users/browse_frm/thread/50ee1c147854769/a79890af3059229d?q=menu&rnum=3#a79890af3059229d
On 6/20/06, Patrick <[EMAIL PROTECTED]> wrote:
>
> Hi i'm newbie and i want to publish my Django websit
You could define a filter "lookup":
from django.core.template import resolve_variable, Library
register = Library()
def lookup(value, arg):
return resolve_variable(arg, value)
register.filter(lookup)
and use it in your code like this:
{%for r in object_list %}
{%for c in field_lis
21 matches
Mail list logo