Thanks a lot! I will try to implement this in my project during this weekend and let you know how it goes.
And your EditArticlesInTaskFormSet is inlineformset or just modelformset_factory of TaskArticle ? Could you share it?? Once again, thanks a lot!
I didn't use inline formsets but model formset factory. I set I'd do it but with my data validations and fields querysets it was too complicated.
class EditArticlesInTaskForm(ModelForm):
def clean(self): super().clean() #many lines of code to validate accounting return self.cleaned_data class Meta: model = TaskArticles fields = ('article', 'value')
EditArticlesInTaskFormSet = modelformset_factory(TaskArticles, fields=('article', 'value'), extra=0, form=EditArticlesInTaskForm)
Now everything works, thanks so much!!!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks a lot! I will try to implement this in my project during this weekend and let you know how it goes.
And your EditArticlesInTaskFormSet is inlineformset or just modelformset_factory of TaskArticle ? Could you share it??
Once again, thanks a lot!
I didn't use inline formsets but model formset factory. I set I'd do it but with my data validations and fields querysets it was too complicated.
class EditArticlesInTaskForm(ModelForm):
EditArticlesInTaskFormSet = modelformset_factory(TaskArticles, fields=('article', 'value'),
extra=0, form=EditArticlesInTaskForm)
Now everything works, thanks so much!!!