Add new rule and tags

This commit is contained in:
Retspen
2015-03-03 16:53:10 +02:00
parent 5960e94da5
commit 8f5ccb3519
13 changed files with 156 additions and 27 deletions

View File

View File

@@ -0,0 +1,11 @@
from django import template
import re
register = template.Library()
@register.simple_tag
def class_activebtn(request, pattern):
if re.search(pattern, request.path):
return 'btn-primary'
return ''