Answer the question
In order to leave comments, you need to log in
How to make Django return html page?
Good afternoon, there is a test project that is written in Django, the frontend is written in Angularjs, how to make it so that when you go to "127.0.0.1:8000/" Django sends us an html page?
in views.py prescribed
class RootView(TemplateView):
template_name = "front/index2.html"
url(r'^$', views.RootView.as_view()),
TemplateDoesNotExist at /
front/index2.html
Answer the question
In order to leave comments, you need to log in
Obviously, the problem is with connecting the templates folder. In general, it is not very correct to give away Angular in this way. Leave this task to nginx.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question