[Answered ]-Cookiecutter Django – ListView expects templates in different directory to Views?

1πŸ‘

βœ…

12 hours later I re-did the entire cookiecutter django process following a well written guide, then copied over my models, views, urls, templates – and the issue was still there…

Thankfully the guide shows many view examples (unlike the docs!) and I noticed my view:

class ItemView(LoginRequiredMixin, View):
    """ Item Detail """

    template_name = "item.html"

should have been:

class ItemView(LoginRequiredMixin, View):
    """ Item Detail """

    template_name = "my_app/item.html"

Now everything lives happily under the same template folder.

πŸ‘€ron_g

Leave a comment