i want to set a main page or an index page for my app. i tried adding MAIN_PAGE in settings.py and then creating a main_page view returning a main_page object, but it doesn\
In case someone searching for an updated version of the answer..
from django.urls import re_path from . import views urlpatterns = [ re_path(r'^$', views.index, name='index') ]
and in your views.py
views.py
def index(req): return render(req, 'myApp/index.html')