Creating a static page
We are in a situation where we need to grow with new pages to split logic and HTML structures. The first step will be to create a static page.
We create app/website/templates/pages/about_us.html with simple text:
<h1> About us</h1> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad animi aut beatae commodi consectetur cumque ipsam iste labore laudantium magni molestiae nobis nulla quod quos tempore totam velit, voluptas voluptates!</p>
We edit the views (app/website/views.py), including about:
def about(request):
return render(
request,
"base.html",
{ "page": "pages/about_us.html", "active_nav":
"about us"},
...