Wrong app name in template path?

My project has two apps, Catalog and Artwork.

In trying to resolve the url, I get the error TemplateDoesNotExist at /artwork/public/drawings/ (artwork/group.html) .

The error page shows it’s trying to load …akdb-env/akdb/catalog/templates/artwork/group.html rather than …akdb-env/akdb/artwork/templates/artwork/group.html

The TEMPLATES setting is:

        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [

And the INSTALLED_APPS setting is:


Can you please clarify:

Describe the directory structure of your project.

What directory is the intended template in?

What does the render statement look like?

Directory structure, starting from the project dir:

├── akdb
├──── urls.py
├── artwork
├──── templates
├────── artwork
├──────── group.html ← this is the target template
├──────── <some other templates>
├──── urls.py
├──  catalog
├──── templates
├────── catalog
├──────── <some templates>
├──── urls.py

Render statement in artwork/views.py:

return render(request, "artwork/group.html", context)

So I don’t know where the artwork app is getting ‘catalog’ for the template path… but note that artwork/views.py does this import:

from catalog.models import Artwork, Group, Space

because the artwork app uses those same models as defined in the catalog app.

I don’t see where you have an artwork app listed in your INSTALLED_APPS setting. Is it there? (It’s searching your catalog app because it is listed.)

I thought of that, but, if I add the artwork app to INSTALLED_APPS, I get the error django.contrib.admin.exceptions.AlreadyRegistered: The model Artwork is already registered in app 'catalog'.

The artwork app works fine with this:


but the catalog app fails with this:


What do your apps.py files look like? Also, please post the complete error message you are receiving, along with identifying when you are receiving it. (I think this error can also be caused by having the same model defined in two different admin.py files. Verify that this is not the case.)

They were identical… looks like that was the problem.

from django.contrib import admin
from catalog.models import Artwork, Group, Space, Status


Both apps use all the same models (so far); I removed them from the artwork admin.py and the error is gone. I’d guess that that file doesn’t even need to exist.

Sorry, that was the admin.py file(s), which seem to have been the problem. The apps.py files look right:

from django.apps import AppConfig

class CatalogConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'catalog'


from django.apps import AppConfig

class ArtworkConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'artwork'