[Answer]-Rendering another template from a button click in Django

1๐Ÿ‘

โœ…

  • Create another url, view for 2nd template which I think you have done.
  • Make button as link to this url. So that when the button is pressed, page with 2nd template is rendered.

If you want to use ajax, the base_test2.html should not return complete HTML page. But just some block in the html page, which you replace in the original page.

Leave a comment