diff --git a/testapp/views.py b/testapp/views.py index 15ca5a6..1aa865b 100644 --- a/testapp/views.py +++ b/testapp/views.py @@ -10,8 +10,7 @@ def index_view(request): click_count = ClickCount.objects.first() # If the click_count is None, then we have not yet clicked if click_count is None: - click_count = ClickCount(1) - click_count.save() + click_count = ClickCount(0) # Increment the click count click_count.clicks += 1 click_count.save()