Link filter

1
2
3
4
5
6
@register.filter
def link(object):

    return '<a class="%s-icon" href="%s">%s</a>' % (object.__class__.__name__.lower(),
						    object.get_absolute_url(),
						    object)

More like this

  1. Filter by first letter inclusion tag by slafs 1 year, 8 months ago
  2. load m2m fields objects by dirol 1 year, 8 months ago
  3. really spaceless (trim spaces at line start) by wolfram 4 years ago
  4. Generic CSV Export by zbyte64 3 years, 8 months ago
  5. Pagination/Filtering Alphabetically by zain 2 years, 11 months ago

Comments

(Forgotten your password?)