-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.py
22 lines (18 loc) · 908 Bytes
/
admin.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from django.contrib import admin
# Register your models here.
from .models import State,UserMaster,TaskMaster
@admin.register(State)
class StateModel(admin.ModelAdmin):
list_display = ['id','state_name','state_code','created_date','updated_date','is_active']
search_fields=('state_name','state_code')
list_filter=('is_active',)
@admin.register(UserMaster)
class UserMasterAdmin(admin.ModelAdmin):
list_display = ['id','name','email','password','phone','city','gender','joining_date','state','created_date','updated_date','is_active']
search_fields=('name','city')
list_filter=('is_active','state')
@admin.register(TaskMaster)
class TaskMaster(admin.ModelAdmin):
list_display = ['id','task_id','title','description','assign_date','state','created_date','updated_date','user_id','is_active']
search_fields = ('title','user_id__name')
list_filter = ('is_active', 'state')