X-Git-Url: http://gitweb.fperrin.net/?p=djsite.git;a=blobdiff_plain;f=quotes%2Fmodels.py;h=da6f93bf9bc414f6108cec7ee8772d8dc370f6b3;hp=83bf62b49696e90ce8b758e378d74ebd6a431508;hb=c0ce9798b8cb154c7fd1d4a1a9c6ab52c197be5c;hpb=060697325678491b635afba501ffae7abe09c468 diff --git a/quotes/models.py b/quotes/models.py index 83bf62b..da6f93b 100644 --- a/quotes/models.py +++ b/quotes/models.py @@ -30,6 +30,11 @@ class CommonData(models.Model): "Notes about the entry; not displayed on \ the public interface") + nb_display = models.BigIntegerField(default=0) + def incr_display(self): + self.nb_display = models.F('nb_display') + 1 + self.save() + class Meta(object): abstract = True