Class FilterExpression

Parse a variable token and its optional filters (all as a single string), and return a list of tuples of the filter name and arguments. Sample::

Declaration

class FilterExpression
source link

Documentation

>>> token = 'variable|default:"Default value"|date:"Y-m-d"'
    >>> p = Parser('')
    >>> fe = FilterExpression(token, p)
    >>> len(fe.filters)
    2
    >>> fe.var
    <Variable: 'variable'>

Methods