On Tuesday 31 January 2017 08:55:15 schaf...@gmail.com wrote:

> class RLFormView(LoginRequiredMixin, StaffuserRequiredMixin,
> UpdateView): template_name = 'abc/layout.html'
>     form_class = LayoutFormSet
>     fields = '__all__'
> ....

The easy fix (and proper way to support the declarative pattern):
>     def get_form(self, form_class=None):
form_class = form_class or self.form_class
>         if self.request.POST:
>             return form_class(self.request.POST)
>         else:
>             initial = [{'param': 'a',
>                         'choosen': 'value'}]
>             return form_class(initial=initial)

-- 
Melvyn Sopacua

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2451221.Mp1YHcWNKf%40devstation.
For more options, visit https://groups.google.com/d/optout.

Reply via email to