Answer the question
In order to leave comments, you need to log in
How to render a static homepage in Django?
There is, for example, a site: example.com.
How to set a static page as the main one?
That is, when you go to example.com - index.html was displayed
Answer the question
In order to leave comments, you need to log in
from django.conf.urls import patterns
from django.views.generic import TemplateView
urlpatterns = patterns('',
(r'^$', TemplateView.as_view(template_name="index.html")),
)
Well, if you don’t have a template there, but just an html page, then it’s easier to just write a rule in nginx to immediately give the page.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question