8000 Refactor index view to improve code readability and maintainability · martcpp/codespaces-django@15a142d · GitHub
[go: up one dir, main page]

Skip to content

Commit 15a142d

Browse files
authored
Refactor index view to improve code readability and maintainability
1 parent 5b13fcb commit 15a142d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

hello_world/core/views.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
from django.shortcuts import render
22

33
def index(request):
4-
return render(
5-
request,
6-
"index.html",
7-
{
8-
"title": "Django example",
9-
},
10-
)
4+
context = {
5+
"title": "Django example",
6+
}
7+
return render(request, "index.html", context)

0 commit comments

Comments
 (0)
0