1 2 3 4 5 6 7 8 9 10 | @register.filter
def classname(obj, arg=None):
classname = obj.__class__.__name__.lower()
if arg:
if arg.lower() == classname:
return True
else:
return False
else:
return classname
|
More like this
- Imagefield with variations by fivethreeo 3 years, 5 months ago
- Template loader to target a specific template by miracle2k 7 months ago
- Multiple-Submit-Button Widget for Choice Field by Archatas 3 years, 6 months ago
- Active class for navigation link by cschand 2 years, 4 months ago
- Human readable file names decorator by maxk 10 months, 2 weeks ago
Comments