i want to ask a question that how can i increment a model field in django.
lets suppose i have a model called
class my bookmarks(requests):
url=models.URLField() popularity=models.IntegerField()
and then by using Django template
i have
bookmarks.html
{% for database in list_tagg %}
URL:{{database.url}}
POPULARITY: {{database.popularity}}
{% endfor %}
Now: if anyone clicks on the link (i.e. the URL field in the bookmarks.html page) I would like that the popularity should be increased by 1. How can i do so? Any help?
Use F-fields ,)