I'm feeling a rabbit posting this question, but I don't continue because this: What's is wrong with this stretch of my code:
When I put something after the "if" I receive:
IndentationError: unindent does not match any outer indentation level
For example, if I put "cont =3" after the "if" and before "post = form2.save(commit=False)" I receive:
File "/home/douglas/Documentos/Django/my-second-blog/site_/app/views.py", line 59 post = form2.save(commit=False) ^ IndentationError: unindent does not match any outer indentation level
If I put the same expression but before of "post = form2.save(commit=False)" I receive:
File "/home/douglas/Documentos/Django/my-second-blog/site_/app/views.py", line 59 cont = 3 ^ TabError: inconsistent use of tabs and spaces in indentation
the code:
def evaluation(request):
# form2 initialization
list_evaluation = Evaluation.objects.all()
form2 = EvalForm()
cont = 0
if request.method == "POST":
form2 = EvalForm(request.POST)
if form2.is_valid() == True:
cont = 3
post = form2.save(commit=False)
post.save()
return redirect('canditate_list')
else:
form2 = EvalForm()
return render(request, 'app/evaluation.html', {'criterions': form2,})
[EDIT]: Guys, I don't indented wrong because I just press "Enter" before I type "True:",There's no way I could have mistaken it if the editor did this automatically
[EDIT2]: I NEVER use space to indent my codes precisely avoid this problems, I ALWAYS use "tab" and just "tab"