Add basename filter

This commit is contained in:
2024-01-06 23:37:45 +13:00
parent b0cacec542
commit c3ad404d1a
2 changed files with 12 additions and 1 deletions

10
local_extensions.py Normal file
View File

@@ -0,0 +1,10 @@
import os
from cookiecutter.utils import simple_filter
@simple_filter
def basename(path):
return os.path.basename(path)
@simple_filter
def dirname(path):
return os.path.dirname(path)