Fix phone number field

This commit is contained in:
henu
2017-10-11 21:17:46 +03:00
parent 3061e0a4fe
commit 70ccc88c86
7 changed files with 110 additions and 11 deletions
+7 -6
View File
@@ -120,14 +120,15 @@ def kaehmy_submit(request, *args, **kwargs):
"""Submit Kaehmy form."""
form = KaehmyForm_Form(request.POST)
if form.is_valid():
print("Formi oli validi")
form.save()
custom_name = form.cleaned_data.get('custom_role_name')
custom_is_board = form.cleaned_data.get('custom_role_is_board')
custom_role = CustomKaehmyRole(
name=custom_name, is_board=custom_is_board)
custom_role.save()
# custom_name = form.cleaned_data.get('custom_role_name')
# custom_is_board = form.cleaned_data.get('custom_role_is_board')
# custom_role = CustomKaehmyRole(
# name=custom_name, is_board=custom_is_board)
# custom_role.save()
else:
pass
return HttpResponseRedirect('/')
# return render(request, 'error.html', {'error': form.errors})
return HttpResponseRedirect('/kaehmy')