[Django]-Should django templates name for each app be unique?

8👍

In Django you can use templates with the same names for different apps. But you should add subfolders inside app’s template directory like this:

my_app/templates/my_app/base.html
second_app/templates/second_app/base.html

Now in views you should include app name to the template name:

return render(request, 'my_app/base.html')
return render(request, 'second_app/base.html').   

Leave a comment