ModelAdmin.get_changeform_initial_data(request)
[source]
A hook for the initial data on admin change forms. By default, fields are given initial values from GET
parameters. For instance, ?name=initial_value
will set the name
field’s initial value to be initial_value
.
This method should return a dictionary in the form {'fieldname': 'fieldval'}
:
1 2 | def get_changeform_initial_data( self , request): return { 'name' : 'custom_initial_value' } |
Please login to continue.