Skip to content

Commit

Permalink
Added annotations for views
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoisset committed Sep 2, 2016
1 parent c661742 commit 60c1ff4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions polls/views.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from django.http import HttpRequest, HttpResponse


def index(request):
def index(request: HttpRequest) -> HttpResponse:
return HttpResponse("Hello, world. You're at the polls index.")

def detail(request, question_id):
def detail(request: HttpRequest, question_id: str) -> HttpResponse:
return HttpResponse("You're looking at question %s." % question_id)

def results(request, question_id):
def results(request: HttpRequest, question_id: str) -> HttpResponse:
response = "You're looking at the results of question %s."
return HttpResponse(response % question_id)

def vote(request, question_id):
def vote(request: HttpRequest, question_id: str) -> HttpResponse:
return HttpResponse("You're voting on question %s." % question_id)

0 comments on commit 60c1ff4

Please sign in to comment.