[Python] Django template loader looking at an old installed_apps list from settings.py [closed]

Discussão em 'Python' iniciado por Stack, Abril 18, 2025.

  1. Stack

    Stack Membro Participativo

    I have Django 5.2 installed. I had an app named 'home' in my installed_apps list in settings.py. I renamed the app to 'core' and did a full refactor. Now, Django is loading the views from the 'core' app, but for some reason, the template loader is still looking in 'home/templates/home/homepage.html'. It is somehow still using the installed_apps list from the previous settings.py. Does anyone have any idea why this is happening?

    I have the following extra installed apps (on top of Django default) list:

    INSTALLED_APPS += [
    'core',
    'django_extensions',
    'django_cleanup',
    'rest_framework',
    ]


    I cleaned the .pyc files and retested them before posting the query.

    Edit: Resolved
    apps.py of the "core" app had the previous name of "home". Django used the name from apps.py for Template Loader.

    Continue reading...

Compartilhe esta Página