We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b860828 + c2f737e commit 7e718f9Copy full SHA for 7e718f9
welcome/views.py
@@ -9,6 +9,7 @@
9
# Create your views here.
10
11
def index(request):
12
+ """Takes an request object as a parameter and creates an pageview object then responds by rendering the index view."""
13
hostname = os.getenv('HOSTNAME', 'unknown')
14
PageView.objects.create(hostname=hostname)
15
@@ -19,4 +20,5 @@ def index(request):
19
20
})
21
22
def health(request):
23
+ """Takes an request as a parameter and gives the count of pageview objects as reponse"""
24
return HttpResponse(PageView.objects.count())
0 commit comments