mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Add new rule and tags
This commit is contained in:
parent
5960e94da5
commit
8f5ccb3519
13 changed files with 156 additions and 27 deletions
0
computes/templatetags/__init__.py
Normal file
0
computes/templatetags/__init__.py
Normal file
11
computes/templatetags/tags_activebtn.py
Normal file
11
computes/templatetags/tags_activebtn.py
Normal 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 ''
|
Loading…
Add table
Add a link
Reference in a new issue