How to open a page in the same browser tab after sabmita of the form?

There is a view:

def contacts_new(request):
 if request.method == "POST":
 form = ContactForm(request.POST)
 if form.is_valid():
 post = form.save(commit=False)
 post.published_date = timezone.now()
post.save()
 return redirect('index')
else:
 form = ContactForm()
 return render(request, 'contacts/add_contact.html', {'form': form})


and the template:
<form method="POST" accept-charset="UTF-8" class="post-form" autocomplete="off" target="_blank">{% csrf_token %}
 {{ form.as_p }}
 <button type="submit" class="btn btn-success">Save</button>
</form>


When you click on the Save button opens index (template) in a new browser tab, but I expect it to open in the same tab. Tell me, please, what are the options to solve this problem?
March 19th 20 at 08:44
1 answer
March 19th 20 at 08:46
From a template to remove the target="_blank"
lol, thank you :) - Shaun.Donnelly commented on March 19th 20 at 08:49

Find more questions by tags Django