class NodeList

from django.template.base import NodeList


  

Ancestors (MRO)

  1. builtins.object
  2. builtins.list
  3. django.template.base.NodeList
AttributeTypeDefined in
AttributeValueDefined in
def __add__(self, value)
builtins.list
Return self+value.
def __class_getitem__(self)
builtins.list
See PEP 585
def __contains__(self, key)
builtins.list
Return key in self.
def __delitem__(self, key)
builtins.list
Delete self[key].
def __eq__(self, value)
builtins.list
Return self==value.
def __ge__(self, value)
builtins.list
Return self>=value.
def __getattribute__(self, name)
builtins.list
Return getattr(self, name).
def __getitem__(self)
builtins.list
x.__getitem__(y) <==> x[y]
def __gt__(self, value)
builtins.list
Return self>value.
def __iadd__(self, value)
builtins.list
Implement self+=value.
def __imul__(self, value)
builtins.list
Implement self*=value.
def __init__(self, *args, **kwargs)
builtins.list
Initialize self.  See help(type(self)) for accurate signature.
def __iter__(self)
builtins.list
Implement iter(self).
def __le__(self, value)
builtins.list
Return self<=value.
def __len__(self)
builtins.list
Return len(self).
def __lt__(self, value)
builtins.list
Return self<value.
def __mul__(self, value)
builtins.list
Return self*value.
def __ne__(self, value)
builtins.list
Return self!=value.
def __new__(type, *args, **kwargs)
builtins.list
Create and return a new object.  See help(type) for accurate signature.
def __repr__(self)
builtins.list
Return repr(self).
def __reversed__(self)
builtins.list
Return a reverse iterator over the list.
def __rmul__(self, value)
builtins.list
Return value*self.
def __setitem__(self, key, value)
builtins.list
Set self[key] to value.
def __sizeof__(self)
builtins.list
Return the size of the list in memory, in bytes.
def append(self, object)
builtins.list
Append object to the end of the list.
def clear(self)
builtins.list
Remove all items from list.
def copy(self)
builtins.list
Return a shallow copy of the list.
def count(self, value)
builtins.list
Return number of occurrences of value.
def extend(self, iterable)
builtins.list
Extend list by appending elements from the iterable.
def get_nodes_by_type(self, nodetype)
django.template.base.NodeList
Return a list of all nodes of the given type
    def get_nodes_by_type(self, nodetype):
        "Return a list of all nodes of the given type"
        nodes = []
        for node in self:
            nodes.extend(node.get_nodes_by_type(nodetype))
        return nodes
def index(self, value, start=0, stop=9223372036854775807)
builtins.list
Return first index of value.

Raises ValueError if the value is not present.
def insert(self, index, object)
builtins.list
Insert object before index.
def pop(self, index=-1)
builtins.list
Remove and return item at index (default last).

Raises IndexError if list is empty or index is out of range.
def remove(self, value)
builtins.list
Remove first occurrence of value.

Raises ValueError if the value is not present.
def render(self, context)
django.template.base.NodeList
    def render(self, context):
        return SafeString("".join([node.render_annotated(context) for node in self]))
def reverse(self)
builtins.list
Reverse *IN PLACE*.
def sort(self)
builtins.list
Sort the list in ascending order and return None.

The sort is in-place (i.e. the list itself is modified) and stable (i.e. the
order of two equal elements is maintained).

If a key function is given, apply it once to each list item and sort them,
ascending or descending, according to their function values.

The reverse flag can be set to sort in descending order.