def prepare_initial_data(self, form_class, obj = None, **kwargs): data = helpers.form_initial_data(form_class, obj) if not obj: data[self.rel_field.name] = kwargs.get(self.rel_field.name) return data
def prepare_initial_data(self, form_class, obj = None, **kwargs): return helpers.form_initial_data(form_class, obj)
def prepare_initial_data(self, form_class, obj = None, **kwargs): """Populates the model's form with data from the specified object""" return helpers.form_initial_data(form_class, obj, **kwargs)