Django Link only opens in new Tab, no Java Script in use

I have the problem, that links in the Djangoproject I created, are not opened by clicking them, but only if I open them in a new tab. I found an answer for this problem, that this could be a problem of java script, but I have no java script in use and I don't know what to do.

This is how I enabled the link in my template:

<a href="{% url 'example' param1 param2 %}" target="_self"><button>Edit</button></a>

I have used the target attribute of the html tag with no success.

It's because you are using a button instead of a link. Try changing to:

<a href="{% url 'example' param1 param2 %}" target="_self"> Edit </a>
Back to Top