nested_admin.templatetags package

Submodules

nested_admin.templatetags.nested_admin module

class IfConditionNode(nodelist_true, nodelist_false, value)[source]

Bases: django.template.base.Node

render(context)[source]
cell_count(inline_admin_form)[source]

Returns the number of cells used in a tabular inline

django_version_gt(string)[source]
django_version_gte(string)[source]
django_version_lt(string)[source]
django_version_lte(string)[source]
form_index(form)[source]

The id of the root ‘form’ element in a formset is the form’s ‘prefix’ without the ‘-‘ preceding the index of the form. So, for instance, in a case where the form’s ‘id’ field has the field name:

prefix-2-id

the ‘form’ element’s id would be:

prefix2

and the form’s index is ‘2’

formsetsort(formset, arg)[source]

Takes a list of formset dicts, returns that list sorted by the sortable field.

get_safe_autocomplete_lookup_fields_fk(model_admin)[source]
get_safe_autocomplete_lookup_fields_generic(model_admin)[source]
get_safe_autocomplete_lookup_fields_m2m(model_admin)[source]
ifinlineclasses(parser, token)[source]
ifnotsuit(parser, token)[source]
ifsuit(parser, token)[source]
json_else_list_tag(f)[source]

Decorator. Registers function as a simple_tag. Try: Return value of the decorated function json encoded. Except: Return []

json_encode(data)[source]
static(path)[source]
str_to_version(string)[source]
strip_parent_name(nested_name, parent_name)[source]

Module contents