1. Create a templates folder in stockmgmgt
app where all HTML pages will be saved.
2. Create a home.html
in the templates folder and add some text you want to display
3. In views.py
is where you define what will be displayed when a user navigates to a URL.
def home(request):
title = 'Welcome: This is the Home Page'
context = {
"title": title,
}
return render(request, "home.html",context)
4. Add a path / url for home page
from stockmgmgt import views
urlpatterns = [
---
path('', views.home, name='home'),
---
5. Now go to localhost:8000 to view your beautify work