﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17577	Form instantiation hook for admin	Simon Litchfield	Simon Litchfield	"Currently there is no hook to alter how forms are instantiated in admin, without hacking add_view/change_view.

This simple change could allow some nice stuff like access to the request object for form validation, customising fields, etc.

http://stackoverflow.com/a/2684552/489638

http://stackoverflow.com/a/1388881/489638

Proposed syntax --

{{{
class MyAdmin(admin.ModelAdmin):
    ...
    def get_form_instance(self, request, obj=None):
        ... (default method calls get_form() here)
}}}
 "	New feature	closed	contrib.admin	1.3	Normal	duplicate	admin forms modelforms request init add_view change_view validation		Accepted	0	1	1	0	0	0
