TandoorRecipes/cookbook/helper/HelperFunctions.py
smilerz 46a50d7835
view and delete orphaned files
miscelaneous bug fixes discovered during testing
2023-12-10 07:54:37 -06:00

14 lines
264 B
Python

from django.db.models import Func
class Round(Func):
function = 'ROUND'
template = '%(function)s(%(expressions)s, 0)'
def str2bool(v):
if isinstance(v, bool) or v is None:
return v
else:
return v.lower() in ("yes", "true", "1")