Wrong html template loading in Django 5
For some reason Django is returning the > character instead of my page. Moreover, there are no errors. What could be the problem?
I have a homepage application and in it urls.py and views.py:
from django.urls import path
from . import views
urlpatterns = [
path('', views.index)
]
from django.http import HttpResponse
from django.template import loader
def index(request):
my_template = loader.get_template('homepage.html')
return HttpResponse(my_template.render)