Good evening,
I created a new database table in models.py (persons):
class persons(models.Model):
name = models.CharField(max_length=100)
age = models.IntegerField()
active = models.IntegerField()
Now I added this code in the admin.py:
class personsAdmin(admin.ModelAdmin):
list_display = ('name','age')
admin.site.register(persons, personsAdmin)
In the admin area it shows me every person I added to the database. So far so good, but now I want to see only the person where active > 0. Can I do this in Django admin.py?