project urls
from django.contrib import admin
from django.urls import path,include
urlpatterns = [
path('admin/', admin.site.urls),
path('',include('myapp.urls'),)
]
**views.py**
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def home(request):
return render(request,'index.html')
def about(request):
return render(request,'about.html')
def menu(request):
return render(request,'menu.html')
urls.py(App-Level
from django.urls import path
from . import views
urlpatterns=[
path('home/',views.home, name='home'),
path('about/', views.about, name='about'),
path('menu/', views.menu, name='menu'),
]
settings.py
‘DIRS’: [‘templates’],
INSTALLED_APPS=[
‘myapp.apps.MyappConfig’,
]
_header.py
base.html
Little Lemon {% block content %} {% endBlock %}menu.html
{% extends ‘base.html’ %}
{% block content %}
Menu
This is a Menu Page for Little Lemon
{% endBlock %}about.html
{% extends ‘base.html’ %}
{% block content %}
About
This is an About Page for Little Lemon
{% endBlock %}THIS IS ONE KIND OF ERROR I HAD IN TERMINAL