django_coreprotect/utils.py

9 lines
151 B
Python
Raw Permalink Normal View History

def checkbox(value):
return True if value == "on" else False
def safe_int(value):
try:
return int(value)
except:
return 0