Loading README.rst +0 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ The following Jinja filters were added: - :code:`from_yaml`: Convert from yaml. - :code:`to_json`: Convert to json. - :code:`from_json`: Convert from json. - :code:`pprint`: Pretty print variable. - :code:`combine`: Combine 2 dictionaries. - :code:`to_toml`: Convert to toml. - :code:`from_toml`: Convert from toml. Loading VERSION +1 −1 Original line number Diff line number Diff line 0.4.1 0.4.2 template/filters.py +0 −19 Original line number Diff line number Diff line Loading @@ -72,25 +72,6 @@ def from_yaml(value): return safe_load(value) def pprint(value): ''' Returns a pretty string representation of the data structure given. Examples: >>> pprint(1) '1' >>> import six >>> output = pprint([{'first_name': 'John', 'last_name': 'Doe'}, {'first_name': 'Jane', 'last_name': 'Doe'}]) # noqa: E501 >>> if six.PY3: ... output == "[{'first_name': 'John', 'last_name': 'Doe'},\\n {'first_name': 'Jane', 'last_name': 'Doe'}]" ... elif six.PY2: ... output == "[{u'first_name': u'John', u'last_name': u'Doe'},\\n {u'first_name': u'Jane', u'last_name': u'Doe'}]" ... True ''' from pprint import pformat return pformat(value) def combine(default, override): ''' Returns a combined dictionary of the 2 dictionaries given (with the 2nd Loading Loading
README.rst +0 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ The following Jinja filters were added: - :code:`from_yaml`: Convert from yaml. - :code:`to_json`: Convert to json. - :code:`from_json`: Convert from json. - :code:`pprint`: Pretty print variable. - :code:`combine`: Combine 2 dictionaries. - :code:`to_toml`: Convert to toml. - :code:`from_toml`: Convert from toml. Loading
template/filters.py +0 −19 Original line number Diff line number Diff line Loading @@ -72,25 +72,6 @@ def from_yaml(value): return safe_load(value) def pprint(value): ''' Returns a pretty string representation of the data structure given. Examples: >>> pprint(1) '1' >>> import six >>> output = pprint([{'first_name': 'John', 'last_name': 'Doe'}, {'first_name': 'Jane', 'last_name': 'Doe'}]) # noqa: E501 >>> if six.PY3: ... output == "[{'first_name': 'John', 'last_name': 'Doe'},\\n {'first_name': 'Jane', 'last_name': 'Doe'}]" ... elif six.PY2: ... output == "[{u'first_name': u'John', u'last_name': u'Doe'},\\n {u'first_name': u'Jane', u'last_name': u'Doe'}]" ... True ''' from pprint import pformat return pformat(value) def combine(default, override): ''' Returns a combined dictionary of the 2 dictionaries given (with the 2nd Loading