1
0
mirror of https://github.com/TandoorRecipes/recipes.git synced 2026-01-11 00:58:32 -05:00
Files
recipes/cookbook/helper/HelperFunctions.py

14 lines
260 B
Python

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