Skip to content

Commit

Permalink
Refactor index view to improve code readability and maintainability
Browse files Browse the repository at this point in the history
  • Loading branch information
bgr8 authored May 26, 2023
1 parent 5b13fcb commit 15a142d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions hello_world/core/views.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from django.shortcuts import render

def index(request):
return render(
request,
"index.html",
{
"title": "Django example",
},
)
context = {
"title": "Django example",
}
return render(request, "index.html", context)

1 comment on commit 15a142d

@bridgetreliford83
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

     "title" "Django example" ,

Please sign in to comment.