Error in documentation
Hi,
I am a beginner. I was going through the getting started documentation and found some typos and error.
[https://docs.djangoproject.com/en/2.1/intro/tutorial03/#writing-more-views](https://docs.djangoproject.com/en/2.1/intro/tutorial03/#writing-more-views)
def detail(request, question_id):
return HttpResponse("You're looking at question %s." % question_id)
def results(request, question_id):
response = "You're looking at the results of question %s."
return HttpResponse(response % question_id)
def vote(request, question_id):
return HttpResponse("You're voting on question %s." % question_id)
Gives the following error:
return HttpResponse("You're voting on question %s", % question_id)
SyntaxError: invalid syntax
To solve the problem I performed
*return* HttpResponse("You're voting on question %s", question\_id) #excluded the '%' prefixed to question\_id
​
I am using Linux python3.7 django 2.1.5.
Will the changes be made or should I make an official report on their site?
If so, How should I sent the error to the django team.
/r/django
https://redd.it/ano2kr
Hi,
I am a beginner. I was going through the getting started documentation and found some typos and error.
[https://docs.djangoproject.com/en/2.1/intro/tutorial03/#writing-more-views](https://docs.djangoproject.com/en/2.1/intro/tutorial03/#writing-more-views)
def detail(request, question_id):
return HttpResponse("You're looking at question %s." % question_id)
def results(request, question_id):
response = "You're looking at the results of question %s."
return HttpResponse(response % question_id)
def vote(request, question_id):
return HttpResponse("You're voting on question %s." % question_id)
Gives the following error:
return HttpResponse("You're voting on question %s", % question_id)
SyntaxError: invalid syntax
To solve the problem I performed
*return* HttpResponse("You're voting on question %s", question\_id) #excluded the '%' prefixed to question\_id
​
I am using Linux python3.7 django 2.1.5.
Will the changes be made or should I make an official report on their site?
If so, How should I sent the error to the django team.
/r/django
https://redd.it/ano2kr