[Answer]-Django Admin Custom Button Not Working

1👍

A form isn’t necessary for what you are trying to accomplish. You can replace the form with:

<a href="{% url "auth_gen_new_aero_license" %}" class="btn btn-primary">Generate new licence</a>
👤rinti

0👍

Have you tried u = MyUser.objects.get(username__iexact=request.user) instead?

Leave a comment