Re: Tutorial "Writing your first Django App": NoReverseMatch at /polls/ - down at the end of part 3

2020-04-22 Thread Awa M. Kinason
You are having an error on your template. {%url 'polls:detail' question.id%} instead of {% url 'polls:detail' question.id %} Take note of the space after or before the percentage sign. Django Templating Engine requires you to respect the rules. If you even add double spaces where you are supposed

Re: how to display the number of views of an article with django

2019-12-18 Thread Awa M. Kinason
I have made some typo errors in typing: *view_count, *please just adjust that in the code. So it should be "*view_count*" anywhere i mistakenly wrote "*views_count*" On Wednesday, December 18, 2019 at 4:25:33 PM UTC+1, JEAN MARLON MBAN wrote: > > how to display the number of views of an article

Re: how to display the number of views of an article with django

2019-12-18 Thread Awa M. Kinason
First, add a column on the article Model named "views_count" Then on the DetailView of the article, and on the GET method. add this: article.view_count += 1 article.save() # or (asuuming you are using class based views) self.object.view_count += 1 self.object.save() The problem

Re: seeking for explanations

2019-12-18 Thread Awa M. Kinason
I am a Django Developer, can work with you depending on the conditions of work. Checkout some of my works here: https://njanginetwork.com, https://billstack.net. On Wednesday, December 18, 2019 at 2:08:57 PM UTC+1, Moise Sacko wrote: > > Hi. I want to create an hotel management project in