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. Digg-like pagination by SmileyChris 4 years ago
  2. Page numbers with ... like in Digg by Ciantic 4 years, 1 month ago
  3. Add querystring parameters to path (template tag) by spenoir 4 months ago
  4. really spaceless (trim spaces at line start) by wolfram 5 years, 4 months ago
  5. Pagination Alphabetically compatible with paginator_class by vascop 1 year, 1 month ago

Comments

(Forgotten your password?)