I have been learning django for about 1 month while coming to django admin I want to limit data entries from admin not more than 5 so that when I want to display the model db on webpage be not more than 5, can you help me in this sorry if this too basic My model is
class Top5Restaurants(models.Model):
Restaurants=models.CharField(max_length=20)
def __str__(self):
return( self.Restaurants)
class Meta:
verbose_name = 'Top 5 Restaurant'
verbose_name_plural = 'Top_5_Restaurants'
Now I don't want more than 5 entries of Restaurants from admin interface, if admin tries entering more than 5 entries I want the entry option to blocked till admin deletes one of the entered database.