Instantiating ModelForm with request as kwargin ModelAdmin
|Reported by:||sorl||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
May I propose instantiating the ModelForm with request as kwarg in add_view, change_view in ModelAdmin class. This would allow the form, fields to be customized and validated on a per user basis.
-form = ModelForm(request.POST, request.FILES)
+form = ModelForm(request.POST, request.FILES, request=request)
Perhaps also the FormSet