Python xadmin.views.edit.ModelFormAdminView() Examples
The following are 11
code examples of xadmin.views.edit.ModelFormAdminView().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
xadmin.views.edit
, or try the search function
.
Example #1
Source File: batch.py From StormOnline with Apache License 2.0 | 5 votes |
def get_change_form(self, is_post, fields): edit_view = self.get_model_view(ModelFormAdminView, self.model) def formfield_for_dbfield(db_field, **kwargs): formfield = edit_view.formfield_for_dbfield(db_field, required=is_post, **kwargs) formfield.widget = ChangeFieldWidgetWrapper(formfield.widget) return formfield defaults = { "form": edit_view.form, "fields": fields, "formfield_callback": formfield_for_dbfield, } return modelform_factory(self.model, **defaults)
Example #2
Source File: batch.py From weibo-analysis-system with MIT License | 5 votes |
def get_change_form(self, is_post, fields): edit_view = self.get_model_view(ModelFormAdminView, self.model) def formfield_for_dbfield(db_field, **kwargs): formfield = edit_view.formfield_for_dbfield(db_field, required=is_post, **kwargs) formfield.widget = ChangeFieldWidgetWrapper(formfield.widget) return formfield defaults = { "form": edit_view.form, "fields": fields, "formfield_callback": formfield_for_dbfield, } return modelform_factory(self.model, **defaults)
Example #3
Source File: batch.py From myblog with GNU Affero General Public License v3.0 | 5 votes |
def get_change_form(self, is_post, fields): edit_view = self.get_model_view(ModelFormAdminView, self.model) def formfield_for_dbfield(db_field, **kwargs): formfield = edit_view.formfield_for_dbfield(db_field, required=is_post, **kwargs) formfield.widget = ChangeFieldWidgetWrapper(formfield.widget) return formfield defaults = { "form": edit_view.form, "fields": fields, "formfield_callback": formfield_for_dbfield, } return modelform_factory(self.model, **defaults)
Example #4
Source File: batch.py From CTF_AWD_Platform with MIT License | 5 votes |
def get_change_form(self, is_post, fields): edit_view = self.get_model_view(ModelFormAdminView, self.model) def formfield_for_dbfield(db_field, **kwargs): formfield = edit_view.formfield_for_dbfield(db_field, required=is_post, **kwargs) formfield.widget = ChangeFieldWidgetWrapper(formfield.widget) return formfield defaults = { "form": edit_view.form, "fields": fields, "formfield_callback": formfield_for_dbfield, } return modelform_factory(self.model, **defaults)
Example #5
Source File: batch.py From django_OA with GNU General Public License v3.0 | 5 votes |
def get_change_form(self, is_post, fields): edit_view = self.get_model_view(ModelFormAdminView, self.model) def formfield_for_dbfield(db_field, **kwargs): formfield = edit_view.formfield_for_dbfield(db_field, required=is_post, **kwargs) formfield.widget = ChangeFieldWidgetWrapper(formfield.widget) return formfield defaults = { "form": edit_view.form, "fields": fields, "formfield_callback": formfield_for_dbfield, } return modelform_factory(self.model, **defaults)
Example #6
Source File: batch.py From Mxonline3 with Apache License 2.0 | 5 votes |
def get_change_form(self, is_post, fields): edit_view = self.get_model_view(ModelFormAdminView, self.model) def formfield_for_dbfield(db_field, **kwargs): formfield = edit_view.formfield_for_dbfield(db_field, required=is_post, **kwargs) formfield.widget = ChangeFieldWidgetWrapper(formfield.widget) return formfield defaults = { "form": edit_view.form, "fields": fields, "formfield_callback": formfield_for_dbfield, } return modelform_factory(self.model, **defaults)
Example #7
Source File: batch.py From imoocc with GNU General Public License v2.0 | 5 votes |
def get_change_form(self, is_post, fields): edit_view = self.get_model_view(ModelFormAdminView, self.model) def formfield_for_dbfield(db_field, **kwargs): formfield = edit_view.formfield_for_dbfield(db_field, required=is_post, **kwargs) formfield.widget = ChangeFieldWidgetWrapper(formfield.widget) return formfield defaults = { "form": edit_view.form, "fields": fields, "formfield_callback": formfield_for_dbfield, } return modelform_factory(self.model, **defaults)
Example #8
Source File: batch.py From devops with MIT License | 5 votes |
def get_change_form(self, is_post, fields): edit_view = self.get_model_view(ModelFormAdminView, self.model) def formfield_for_dbfield(db_field, **kwargs): formfield = edit_view.formfield_for_dbfield(db_field, required=is_post, **kwargs) formfield.widget = ChangeFieldWidgetWrapper(formfield.widget) return formfield defaults = { "form": edit_view.form, "fields": fields, "formfield_callback": formfield_for_dbfield, } return modelform_factory(self.model, **defaults)
Example #9
Source File: batch.py From online with GNU Affero General Public License v3.0 | 5 votes |
def get_change_form(self, is_post, fields): edit_view = self.get_model_view(ModelFormAdminView, self.model) def formfield_for_dbfield(db_field, **kwargs): formfield = edit_view.formfield_for_dbfield(db_field, required=is_post, **kwargs) formfield.widget = ChangeFieldWidgetWrapper(formfield.widget) return formfield defaults = { "form": edit_view.form, "fields": fields, "formfield_callback": formfield_for_dbfield, } return modelform_factory(self.model, **defaults)
Example #10
Source File: batch.py From Dailyfresh-B2C with Apache License 2.0 | 5 votes |
def get_change_form(self, is_post, fields): edit_view = self.get_model_view(ModelFormAdminView, self.model) def formfield_for_dbfield(db_field, **kwargs): formfield = edit_view.formfield_for_dbfield(db_field, required=is_post, **kwargs) formfield.widget = ChangeFieldWidgetWrapper(formfield.widget) return formfield defaults = { "form": edit_view.form, "fields": fields, "formfield_callback": formfield_for_dbfield, } return modelform_factory(self.model, **defaults)
Example #11
Source File: batch.py From ImitationTmall_Django with GNU General Public License v3.0 | 5 votes |
def get_change_form(self, is_post, fields): edit_view = self.get_model_view(ModelFormAdminView, self.model) def formfield_for_dbfield(db_field, **kwargs): formfield = edit_view.formfield_for_dbfield(db_field, required=is_post, **kwargs) formfield.widget = ChangeFieldWidgetWrapper(formfield.widget) return formfield defaults = { "form": edit_view.form, "fields": fields, "formfield_callback": formfield_for_dbfield, } return modelform_factory(self.model, **defaults)