File not found when adding a new app


I have added a new app Verge3D to my First app



In my / Verge3D app :

urlpatterns = [

In my / Verge 3D app

def myFirst3D(request):
    print("on y est")
    return render(request,'3Dfiles/earth.html')

The problem is :

Django searches this 3Dfiles/earth.html still in my first app location (it works when I create this directory/files in my fist app Templates directory)

Did you add your new app to the INSTALLED_APPS setting? What does your TEMPLATES setting look like?

Yes the new app was intalled in

For the templates variable, as I have APP_DIRS’: True I thought Django checks in every templates app folder.



        'BACKEND': 'django.template.backends.django.DjangoTemplates',

        'DIRS': [],

        'APP_DIRS': True,

        'OPTIONS': {

            'context_processors': [









It does, if the app is installed in INSTALLED_APPS and APP_DIRS == True. (Which you have in both cases.)

So you have a directory named verge3D/templates/3Dfiles, where verge3D is your new app, and that directory has earth.html in it? What does your project directory structure look like?

Here is a screenshot. The main project is zer0day with this structure in













Just one more thing to confirm - in your verge3D/templates directory, you have a directory named 3Dfiles with the earth.html in it?

If you don’t have earth.html in your events/templates/3Dfiles directory, you mention an error. Can you post that complete error? (Specifically, near the top of the error there should be output showing the directories being searched.)

Yes the earth.html page is located inside verge3D/templates/3Dfiles
Which is strange as it works for the 2 others app

Here is the message log

So in the Template-loader postmortem section, it’s showing you the directories that it’s searching. The one you’re asking about is the next-to-last entry. Django is looking in the right location. There’s no Django-based-reason why it shouldn’t be able to find it. Usually then the problem ends up being a typo in the file name or incorrect file permissions or (in the case of a Unix-style system) a reference to a file with the wrong upper or lower case in the name.

I have created a new app without “3D” inside and it works

Don’t ask me why