Re: Multiple forms in the same template

2017-01-26 Thread schaf . mh
Ohh thanks that helped a lot. Now in one view I still have a problem. It uses the a formset and tries to give that back while overwriting the get_form function: views.py class LayoutFormView(LoginRequiredMixin, StaffuserRequiredMixin, UpdateView ): template_name = 'abc/layout.html' form_c

Re: Multiple forms in the same template

2017-01-25 Thread Melvyn Sopacua
On Tuesday 24 January 2017 05:07:25 schaf...@gmail.com wrote: > sorry I wanted to shorten the code before, to not post too much. > Here the code: > > views.py > class MFormsView(LoginRequiredMixin, StaffuserRequiredMixin, > UpdateView, MFView): And there you have it: MFormsView uses UpdateView[1]

Re: Multiple forms in the same template

2017-01-24 Thread schaf . mh
HI sorry I wanted to shorten the code before, to not post too much. Here the code: views.py class MFormsView(LoginRequiredMixin, StaffuserRequiredMixin, UpdateView, MFView): template_name = 'temps/cnfg_form.html' form_classes = { 'abc': abcForm, 'md': mdForm, } b

Re: Multiple forms in the same template

2017-01-24 Thread schaf . mh
HI sorry I wanted to shorten the code before, to not post too much. Here the code: views.py class MFormsView(LoginRequiredMixin, StaffuserRequiredMixin, UpdateView, MFView): template_name = 'temps/cnfg_form.html' form_classes = { 'abc': abcForm, 'md': mdForm, } bre

Re: Multiple forms in the same template

2017-01-24 Thread Melvyn Sopacua
Hello, Assuming the fields issue is resolved. If not, please show the abcForm. On Monday 23 January 2017 08:14:09 schaf...@gmail.com wrote: > I guess I first need to fully understand the Django ModelForm and how > a template can handle two independent forms. Maybe I also have to > change the con

Re: Multiple forms in the same template

2017-01-23 Thread schaf . mh
Hi! And thanks for the answer. > > This stopped working in Django 1.8 > : > > "Class-based views that use ModelFormMixin will raise an > ImproperlyConfigured exception when both the fields and form_class > attributes are spec

Re: Multiple forms in the same template

2017-01-23 Thread Melvyn Sopacua
On Monday 23 January 2017 06:41:53 schaf...@gmail.com wrote: > This worked well like that until Django 1.8, but now with Django 1.9 This stopped working in Django 1.8[1] : "Class-based views that use ModelFormMixin will raise an ImproperlyConfigured exception when both the fields and form_class

Multiple forms in the same template

2017-01-23 Thread schaf . mh
HI All, I'm new in Django and in Web-Development. Therefore I'm a little confused now. I have taken over a Django project and first I want to upgrade it to the actual version. Now I was doing the migration to Django 1.9.12 and struggling with the following problem: Using ModelFormMixin (base c