First, you should most likely configure the static templates path in settings.py with something similar to this
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, "templates")],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.template.context_processors.i18n',
],
},
},
]
APP_DIRS=Truemeans that Django will look for patterns in each application directory in your case main_app/and current_app/:
, , :
def temp_view(request):
....
return render(request, "pages/home.html",context)
Django main_app/ , pages/home.html