11 lines
184 B
Python
11 lines
184 B
Python
|
from django import template
|
||
|
|
||
|
register = template.Library()
|
||
|
|
||
|
|
||
|
def has_prefix(value: str, arg: str) -> bool:
|
||
|
return value.startswith(arg)
|
||
|
|
||
|
|
||
|
register.filter('has_prefix', has_prefix)
|