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 2 years ago
  2. load m2m fields objects by dirol 1 year, 11 months ago
  3. Pagination Alphabetically compatible with paginator_class by vascop 1 month ago
  4. really spaceless (trim spaces at line start) by wolfram 4 years, 4 months ago
  5. Generic CSV Export by zbyte64 3 years, 11 months ago

Comments

(Forgotten your password?)