Don Arbow wrote:
>
> list_1 = Shows.objects.filter(upcoming=True)
> list_2 = Shows.objects.filter(past=True)
>
> return render_to_response('template.html'
> {'upcoming_shows':list_1, 'past_shows':list_2})
>
> Don
Don,
Thanks for the clean, clear example! It helped me see a way out in a
var
On 8/4/06, skullvulture <[EMAIL PROTECTED]> wrote:
>
> Is there anyway to declare variables within a template? I'm coming
> from a Zope background where with dtml you have the dtml-let tag and
> with ZPT you have tal:define. Django's templating seems so much cooler
> than Zope's, but I'm missing
On 8/3/06, skullvulture <[EMAIL PROTECTED]> wrote:
> I have another loop above that displays upcoming shows. Is it possible
> to have two object lists, one of upcoming and one of past shows be
> passed to the template?
A view can pass any number of variables it wants to, with any legal
Python va
On Aug 3, 2006, at 2:45 PM, skullvulture wrote:
> I have another loop above that displays upcoming shows. Is it
> possible
> to have two object lists, one of upcoming and one of past shows be
> passed to the template?
Yes, you can pass any sort of data that you want to your template.
So, if
Don,
I have another loop above that displays upcoming shows. Is it possible
to have two object lists, one of upcoming and one of past shows be
passed to the template?
Thanks
Adrian,
I understand your philosophy of separating presentation and logic, but
even in your there you say that the tem
On Aug 3, 2006, at 1:05 PM, skullvulture wrote:
>
> Is there anyway to declare variables within a template? I'm coming
> from a Zope background where with dtml you have the dtml-let tag and
> with ZPT you have tal:define. Django's templating seems so much
> cooler
> than Zope's, but I'm missin
On 8/3/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> * If you're not using any of the objects with is_past_show == False,
> then change your view so that object_list is only the objects with
> is_past_show==True. Then you can do this:
Assuming the use of the object_list generic view, this is p
On 8/3/06, skullvulture <[EMAIL PROTECTED]> wrote:
> Is there anyway to declare variables within a template? I'm coming
> from a Zope background where with dtml you have the dtml-let tag and
> with ZPT you have tal:define. Django's templating seems so much cooler
> than Zope's, but I'm missing a
On 8/3/06, skullvulture <[EMAIL PROTECTED]> wrote:
> Is there anyway to declare variables within a template? I'm coming
> from a Zope background where with dtml you have the dtml-let tag and
> with ZPT you have tal:define. Django's templating seems so much cooler
> than Zope's, but I'm missing a
Is there anyway to declare variables within a template? I'm coming
from a Zope background where with dtml you have the dtml-let tag and
with ZPT you have tal:define. Django's templating seems so much cooler
than Zope's, but I'm missing a declare or define tag.
The idea I want to be able to do i
On 12/3/05, Jiri Barton <[EMAIL PROTECTED]> wrote:
>
> Wow, dorodok, that is elegant, indeed. I have already implemented by
> the inclusion_tag as the guys suggested, but I'm going to do it the CSS
> way.
>
Just remember that every time you want to add another tab, then you'll
have to edit the CSS
Wow, dorodok, that is elegant, indeed. I have already implemented by
the inclusion_tag as the guys suggested, but I'm going to do it the CSS
way.
Robert: autocorrected it to register.inclusion_tag in my code already
:-) thanks
Jiri
Hi Jiri!
if you are only about highlighting of the active item of your UI menu
in pure CSS way,
I suggest you to look at solution of www.djangoproject.com site,
the source of templates is:
base template:
http://code.djangoproject.com/browser/djangoproject.com/django_website/templates/base.html
=
> @inclusion_tag("myapp/menu")
That should be
@register.inclusion_tag("myapp/menu")
I like it!
Thanks
On 12/2/05, Jiri Barton <[EMAIL PROTECTED]> wrote:
> Now, I'd like to write the menu only once and then use it the following
> way:
>
> {% declare menuselection tomatoes %}
> {% include "menu" %}
>
> The menu would have been defined as follows:
>
>
> endifequal %}>mushrooms
> endifequal
Jiri Barton wrote:
> Hello there,
>
> I have the following problem. Here's my template fragment; it defines a
> menu:
>
>
> mushrooms
> cheese
> tomatoes
> onion
>
>
> Now, I'd like to be able to highlight one item in some templates, and
> another item in other templates. Only
Hello there,
I have the following problem. Here's my template fragment; it defines a
menu:
mushrooms
cheese
tomatoes
onion
Now, I'd like to be able to highlight one item in some templates, and
another item in other templates. Only the templates know what should be
highlighted.
18 matches
Mail list logo