Login

Snippets by bmihelac

Snippet List

Link If templatetag

Django templatetag wraps everything between ``{% linkif %}`` and ``{% endlinkif %}`` inside a ``link`` if ``link`` is not False. Sample usage:: {% linkif "http://example.com" %}link{% endlinkif %} {% linkif object.url %}link only if object has an url{% endlinkif %}

  • link
Read More

Dom ID

Helper for identifing records in views similiar to rails dom_id helper.

  • templatetag
  • templatefilter
  • dom_id
Read More

testshell

This commands runs a Python interactive interpreter with test database and data from the given fixture(s). It is usable if you want to play with test database. See also testserver docs

  • fixtures
  • shell
  • testshell
Read More

bmihelac has posted 4 snippets.