Skip to content

Commit 7e718f9

Browse files
Merge pull request sclorg#167 from Afreed-Sharief/master
Update views.py by giving documentation to the each view.
2 parents b860828 + c2f737e commit 7e718f9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

welcome/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# Create your views here.
1010

1111
def index(request):
12+
"""Takes an request object as a parameter and creates an pageview object then responds by rendering the index view."""
1213
hostname = os.getenv('HOSTNAME', 'unknown')
1314
PageView.objects.create(hostname=hostname)
1415

@@ -19,4 +20,5 @@ def index(request):
1920
})
2021

2122
def health(request):
23+
"""Takes an request as a parameter and gives the count of pageview objects as reponse"""
2224
return HttpResponse(PageView.objects.count())

0 commit comments

Comments
 (0)