from django contrib import admin class Netuser models Model name class

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from django.contrib import admin
class Netuser(models.Model):
name = ...
.....
class NetuserAdmin(admin.ModelAdmin):
ordering = ['-ip']
list_display = ('name', 'surname', 'building', 'room', 'ip', 'mac')
list_per_page = 25
search_fields = ['name', 'ip']