I'm realy glad:)
On 7 янв, 03:15, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> you are right ! it works now, thanks
>
> django fresh from svn
>
> On Jan 6, 2008 7:10 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
>
>
> > Note you must delete *all* spaces in filter expression
>
> > part.forum.t
you are right ! it works now, thanks
django fresh from svn
On Jan 6, 2008 7:10 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> Note you must delete *all* spaces in filter expression
>
> part.forum.thread_set.all|slice:":5"
>
> And what is your django version?
>
> On 7 янв, 02:55, "Alexandre Fo
Note you must delete *all* spaces in filter expression
part.forum.thread_set.all|slice:":5"
And what is your django version?
On 7 янв, 02:55, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> I tried with and without... no difference
>
> On Jan 6, 2008 6:32 PM, Alex Koshelev <[EMAIL PROTECTED]> w
I tried with and without... no difference
On Jan 6, 2008 6:32 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> Have you put a space between "all" and filter mark?
>
> On 7 янв, 02:27, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> > update: it doesn't work in the for loop.
> >
> > --
Have you put a space between "all" and filter mark?
On 7 янв, 02:27, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> update: it doesn't work in the for loop.
>
> --
> TemplateSyntaxError at /parts/8051/
>
> 'for' statements should use the format 'for x in y': for t in
> part.forum.thr
update: it doesn't work in the for loop.
--
TemplateSyntaxError at /parts/8051/
'for' statements should use the format 'for x in y': for t in
part.forum.thread_set.all |slice: ":5"
--
this is the offending line:
{% for t in part.forum.thread_set.all |slice: ":5" %}
any
On Jan 6, 2008 5:44 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> First of all, Part.objects.all()[:5] is still lazy. SQL query executes
> only when you try to iterate through items.
> And you can slice objects in template with "slice" filter
>
> {% for p in part.object.all|slice:":5" %}
>
Th
First of all, Part.objects.all()[:5] is still lazy. SQL query executes
only when you try to iterate through items.
And you can slice objects in template with "slice" filter
{% for p in part.object.all|slice:":5" %}
On 7 янв, 01:13, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I need t
Hi,
I need to limit the number of elements I have to display on an index page.
Right now I do something like this in the template.
{% for p in part.object.all %}
...
{% endfor %}
Witch obliviously output all objects in the set.
In the view, I can do it this way:
Part.objects.all()[:5]
I would
9 matches
Mail list logo