How to check request.form.get value null or not in python flask? -
i'm starting simple curd operation python flask framework , want when user submit form how check users selected value null or not?
i tried this
if request.method == 'post': name = request.form.get('name') city = request.form.get('city') if name == '' , city == '': print('its null') else: print('success')
but when i'm submit without fill value give output
success
i'm try none , null can't work.
Comments
Post a Comment