For instructions on how to use the models and mixins in this module, please refer to Admin integration.
Mixin with export functionality implemented as an admin action.
template for change form
Action runs on POST from instance action menu (if enabled).
Adds the export action to the list of available actions.
Flag to indicate whether to show ‘export’ button on change form
Subclass of ModelAdmin with export functionality implemented as an admin action.
Export mixin.
This is intended to be mixed with ModelAdmin.
Handles the default workflow for both the export form and the export of data to file.
Form class to use for the initial export step. Assign to ExportForm
if you would like to disable selectable fields feature.
alias of SelectableFieldsExportForm
template for export view
Returns file_format representation for given queryset.
Get the form class used to read the export format.
Returns export queryset. The queryset is obtained by calling ModelAdmin get_queryset().
Default implementation respects applied search and filters.
DEPRECATED: This method is deprecated and will be removed in the future. Overwrite get_queryset() or get_export_queryset() instead.
Returns a list of valid pks for export. This is used to validate which objects can be exported when exports are triggered from the Admin UI ‘action’ dropdown. This can be overridden to filter returned pks for performance and/or security reasons.
request – The request object.
a list of valid pks (by default is all pks in table).
Returns whether a request has export permission.
template for change_list view
export data encoding
Subclass of ExportActionModelAdmin with import/export functionality. Export functionality is implemented as an admin action.
Import and export mixin.
template for change_list view
Subclass of ModelAdmin with import/export functionality.
Import mixin.
This is intended to be mixed with django.contrib.admin.ModelAdmin https://docs.djangoproject.com/en/dev/ref/contrib/admin/
form class to use for the confirm import step
alias of ConfirmImportForm
Added in version 3.0.
Return a form instance to use for the ‘confirm’ import step. This method can be extended to make dynamic form updates to the form after it has been instantiated. You might also look to override the following:
Added in version 3.0.
Return a form instance to use for the ‘initial’ import step. This method can be extended to make dynamic form updates to the form after it has been instantiated. You might also look to override the following:
import data encoding
Added in version 3.0.
Return the form class to use for the ‘confirm’ import step. If you only have a single custom form class, you can set the confirm_form_class
attribute to change this for your subclass.
Added in version 3.0.
Return a dictionary of initial field values to be provided to the ‘confirm’ form.
Added in version 3.0.
Return a dictionary of values with which to initialize the ‘confirm’ form (including the initial values returned by get_confirm_form_initial()
).
Prepare kwargs for import_data.
Added in version 3.0.
Return the form class to use for the ‘import’ step. If you only have a single custom form class, you can set the import_form_class
attribute to change this for your subclass.
Added in version 3.0.
Return a dictionary of initial field values to be provided to the ‘import’ form.
Added in version 3.0.
Return a dictionary of values with which to initialize the ‘import’ form (including the initial values returned by get_import_form_initial()
).
Override this method to provide additional kwargs to temp storage class.
Returns whether a request has import permission.
Perform a dry_run of the import to make sure the import will not result in errors. If there are no errors, save the user uploaded file to a local temp file that will be used by ‘process_import’ for the actual import.
control which UI elements appear when import errors are displayed. Available options: ‘message’, ‘row’, ‘traceback’
template for change_list view
form class to use for the initial import step
alias of ImportForm
template for import view
Perform the actual import action (after the user has confirmed the import)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4