[Python] Django admin site is looking for a template: <project_name>.html ...I want to use the...

Discussão em 'Python' iniciado por Stack, Junho 11, 2025.

  1. Stack

    Stack Membro Participativo

    My project's admin site was working earlier with everything kept at default. But I'm building the site and after lots of coding I get an error where it is asking for a template that has the name of the project. Maybe this template was created by default earlier in .venv and it was somehow deleted or moved?

    TemplateDoesNotExist at /admin/
    admin/<project_name>.html

    Request Method: GET
    Request URL: http://localhost:8000/admin/
    Django Version: 4.2.23
    Exception Type: TemplateDoesNotExist
    Exception Value: admin/<project_name>.html


    This is the admin.py in the main app. It imports from two secondary apps.

    from django.contrib import admin

    from user.models import Profile
    admin.site.register(Profile)

    from flights.models import Flight
    admin.site.register(Flight)

    from airports.models import Airport
    admin.site.register(Airport)


    Any ideas on how to get the admin site working again?

    Continue reading...

Compartilhe esta Página