Skip to content

Commit 91712f7

Browse files
authored
Merge pull request #7 from xadahiya/master
Add docstrings to views, update requirements
2 parents 993f1a9 + 5a0f995 commit 91712f7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

hello/views.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from hello.forms import LogMessageForm
77
from hello.models import LogMessage
88

9-
# def home(request):
10-
# return render(request, 'hello/home.html')
119

1210
class HomeListView(ListView):
1311
"""Renders the home page, with a list of all polls."""
@@ -19,12 +17,18 @@ def get_context_data(self, **kwargs):
1917
return context
2018

2119
def about(request):
20+
"""Renders the about page."""
2221
return render(request, "hello/about.html")
2322

2423
def contact(request):
24+
"""Renders the contact page."""
2525
return render(request, "hello/contact.html")
2626

2727
def hello_there(request, name):
28+
"""Renders the hello_there page.
29+
Args:
30+
name: Name to say hello to
31+
"""
2832
return render(
2933
request, "hello/hello_there.html", {"name": name, "date": datetime.now()}
3034
)

0 commit comments

Comments
 (0)