How can i specify number of entries in my django database (sqlite3). For example my model is:
from django.db import models
class About(models.Model):
firstname = models.CharField(max_length=500)
lastname = models.CharField(max_length=500, blank=True)
address = models.TextField()
details = models.TextField()
class Meta:
verbose_name_plural = 'About'
def __str__(self):
return self.firstname
Now i want to store data of only 2 members in my database. And after adding the data of both users in database from django admin panel, if i try to store data of 3rd member than it should show that database limit is crossed you can't store this data, delete previous data first. Is it possible to limit entries form django models.py .