[Answered ]-Handling user registrations Using only Django without the need to be redirected to other template

1👍

You can redirect to the same page in your CBV :

from django.http import HttpResponseRedirect


return HttpResponseRedirect(self.request.path_info)

As stated in the comment your solution require Ajax and JS, you can however redirect to the same page but that will make a new request and refresh the whole page which might no be ideal for you.

There is a tutorial to work with Django and Ajax Ajax / Django Tutorial

Leave a comment