"it's cheap enough to make such a list (preferably in your
view function)"
thx, it's easy and simple - good idea
On 23. Nov, 16:44 h., Bill Freeman wrote:
> Possibly the form class is not written to support slicing. Supporting
> itteration only
> requires methods for
Possibly the form class is not written to support slicing. Supporting
itteration only
requires methods for __iter__() and next(). Slicing, like indexing
requires implementation
of __getitem__(), and for slicing to work, this method must check for
receiving a 'slice'
object as an index. Since
the same result :(
On 23. Nov, 13:47 h., Doug Blank wrote:
> On Mon, Nov 23, 2009 at 7:16 AM, gentlestone wrote:
> > why this piece of code doesn't work?
>
> > {% for field in form|slice:":2" %}
>
> > the result is iterating over all fields, not
On Mon, Nov 23, 2009 at 7:16 AM, gentlestone wrote:
> why this piece of code doesn't work?
>
> {% for field in form|slice:":2" %}
>
> the result is iterating over all fields, not just the first two fields
Perhaps break this up into two parts?
{% with form|slice:":2" as
why this piece of code doesn't work?
{% for field in form|slice:":2" %}
the result is iterating over all fields, not just the first two fields
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
5 matches
Mail list logo