Hi,

that was my mistake - had an error in the template - it wors no.
But according to this, I've another problem - fields which are foreign 
keys don't get rendered.

Here is my code:

class ContactForm(BetterModelForm):
    class Meta:
        model = Disposal
        fieldsets = (('row1', {'fields': 
('contract_type_id','distribution_channel_id','salesman_id'), 'legend': 
''}),
                    ('row2', {'fields': 
('carmodel_id','modeltype_id','trade_in_id','calendar_week'),'legend': ''}),
                    ('row3', {'fields': ('annotation',),'legend': ''}))


It works fine, but every FK gets ignored.
When I render the form without the fieldsets, the FK keys are there as 
aspected.
Thanks a lot again,
greets Ben

Skylar Saveland schrieb:
> If you haven't already, you could instantiate one in the shell and
> render/inspec it there.  You will at least be able to see what might
> be a problem with your class/python-code vs what might be wrong at the
> template level.
>
> On Nov 18, 9:27 am, Benjamin Wolf <b...@shs-it.de> wrote:
>   
>> Hi there,
>>
>> I'm using a ModelForm and had the wish to use fieldsets.
>> After a short search I've found 
>> this:http://pypi.python.org/pypi/django-form-utils/0.1.5
>> Seems to be what I want. So I've installed it and changed my form from
>> ModelForm to BetterModelForm.
>>
>> It works so far, but when I try to create a fieldset, it gets ignored /
>> not rendered.
>> Here's my form definition:
>>
>> class ContactForm(BetterModelForm):
>>     class Meta:
>>         model = Disposal
>>         fieldsets = ('main', {'fields': ('customer_name',), 'legend':
>> 'Customer Data'}),
>>
>> Thanks for your help,
>> greets ben
>>     
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=.
>
>
>   

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=.


Reply via email to