Can't remove prepopulated fields from fieldset in ModelAdmin
|Reported by:||leanmeandonothingmachine||Owned by:||nobody|
|Cc:||Ben Spaulding||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I'd like to propose that when the prepopulated fields argument that is passed to the AdminForm helper in BaseModelAdmin is generated by a method that takes the request object. That would give you ability to use the get_fieldsets overide to filter out prepopulated fields and then use this new override to alter the prepopulated fields to match what you did in get_fieldsets. See attached patch for my implementation.