On Mar 17, 9:34 pm, Alastair Campbell wrote:
> On Wed, Mar 17, 2010 at 7:02 PM, Dennis Kaarsemaker
>
> wrote:
> > In the view function, you could add an attribute (say, instance :-)) to
> > each form in the formset. That to me is a better way than doing weird
> > magic in a template.
>
> You're
On Wed, Mar 17, 2010 at 7:02 PM, Dennis Kaarsemaker
wrote:
> In the view function, you could add an attribute (say, instance :-)) to
> each form in the formset. That to me is a better way than doing weird
> magic in a template.
You're probably right, but I couldn't work that out for formsets:
htt
On wo, 2010-03-17 at 09:34 +, Alastair Campbell wrote:
> On Tue, Mar 16, 2010 at 7:46 PM, Dennis Kaarsemaker wrote:
> > Each ModelForm has an instance attribute, so you can use
> > {{ form.instance.whatever }}
>
> Hi Dennis,
>
> Unfortunately it is not a model form. The form creates an "entry
On Tue, Mar 16, 2010 at 7:46 PM, Dennis Kaarsemaker wrote:
> Each ModelForm has an instance attribute, so you can use
> {{ form.instance.whatever }}
Hi Dennis,
Unfortunately it is not a model form. The form creates an "entry",
which is de-normalised data taken from the person (member) details and
On ma, 2010-03-15 at 00:14 +, Alastair Campbell wrote:
> Is there a way to loop through the members at the same time? Or some
> other way of accessing the matching objects?
Each ModelForm has an instance attribute, so you can use
{{ form.instance.whatever }}
--
Dennis K.
The universe tends
Hi,
I have a formset that is working well, but I'd like to use other
information within that loop:
{% for form in formset.forms %}
[Member name would go here]
{{ form }}
{% endfor %}
There is a queryset of member objects from the same view that matches
the forms in the formse
6 matches
Mail list logo