class Article(models.Model): # ... likers = ArrayField( models.GenericIPAddressField(), default=list, blank=True, null=False ) @property def nb_likes(self) -> int: return len(self.likers)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter