JumboModelAdmin

API

class jmb.core.admin.options.ExtendibleModelAdmin(model, admin_site)[source]
export_data_view(*args, **kwargs)[source]

The ‘export data’ admin view for this model.

get_action_form_instance(request)[source]

Return an action_form

get_changelist_instance(request)[source]

Return a chagelist instance suitable to find out the real queryset represented bu result_list This function can be used in actions when the queryset is much faster then using the list of single ids

get_changelist_queryset(request)[source]

Return a queryset that was correctly filtered by any filter (q= and filterset_class)

get_list_per_page()[source]

Set how many items appear on each paginated admin change list page. This value is conditioned by settings.LIST_PER_PAGE. Example:

LIST_PER_PAGE = {
‘content_content’: 50, ‘content’: 10, ‘all’: 100,

}

get_list_per_page_form(request)[source]

Returns number of items appear on each paginated admin change list page

import_data_view(*args, **kwargs)[source]

The ‘import data’ admin view for this model.

message_user(request, message, level=20, extra_tags='', fail_silently=False)[source]

Send a message to the user. The default implementation posts a message using the django.contrib.messages backend.

Exposes almost the same API as messages.add_message(), but accepts the positional arguments in a different order to maintain backwards compatibility. For convenience, it accepts the level argument as a string rather than the usual level number.

tabs_show_empty = True

tabs: show tabs even if they’re empty

tabs_sticky_on_top = False

tabs: show tab lables sticky on top of the page

jmb.core.admin.options.export_csv(modeladmin, request, queryset)[source]

action to export selected items of a changelist_view in .csv

jmb.core.admin.options.export_xls(modeladmin, request, queryset)[source]

action to export selected items of a changelist_view in .xls

Previous page

← Addon & layout

Next page

→ Admin actions

This Page