11from django .contrib import admin
2+ < << << << HEAD
23from notices .models import Notice , BookmarkedNotice
34
45
@@ -15,12 +16,21 @@ class BookmarkedNoticeAdmin(admin.TabularInline):
1516
1617class NoticeAdmin (admin .ModelAdmin ):
1718 list_display = ('faculty' , 'title' , 'course_branch_year' , 'created' , 'modified' , 'visible_for_student' ,
19+ == == == =
20+ from notices .models import Notice , BookmarkedNotice , TrendingInCollege
21+ from import_export .admin import ImportExportModelAdmin
22+
23+
24+ class NoticeAdmin (ImportExportModelAdmin ):
25+ list_display = ('id' ,'faculty' , 'title' , 'course_branch_year' , 'created' , 'modified' , 'visible_for_student' ,
26+ > >> >> >> parent of 38 b3302 ... Notice admin updated
1827 'visible_for_faculty' , 'visible_for_hod' , 'visible_for_others' , 'visible_for_management'
1928 )
2029 list_display_links = ('title' , 'faculty' )
21- list_filter = ('faculty' , 'category' )
22- list_per_page = 100
23- inlines = [BookmarkedNoticeAdmin ]
30+ list_filter = ('category' ,)
31+ list_per_page = 15
32+ # search_fields = ['title', 'faculty']
33+
2434 fieldsets = (
2535 (None , {
2636 'classes' : ('wide' , 'extrapretty' ),
@@ -29,9 +39,29 @@ class NoticeAdmin(admin.ModelAdmin):
2939 )
3040
3141
42+ << << << < HEAD
3243# class TrendingInCollegeAdmin(admin.ModelAdmin):
3344# list_display = ('title', 'attachment', 'visibility')
45+ == == == =
46+ class BookmarkedNoticeAdmin (ImportExportModelAdmin ):
47+ list_display = ('user' , 'pinned' , 'notice' , )
48+ # list_filter = ('notice',)
49+ list_per_page = 25
50+
51+ fieldsets = (
52+ (None , {
53+ 'classes' : ('extrapretty' ),
54+ 'fields' : (('user' , 'notice' ), 'pinned' ),
55+ }),
56+ )
57+
58+
59+ class TrendingInCollegeAdmin (ImportExportModelAdmin ):
60+ list_display = ('title' , 'attachment' , 'visibility' )
61+
62+ > >> >> >> parent of 38 b3302 ... Notice admin updated
3463
3564
3665admin .site .register (Notice , NoticeAdmin )
37- # admin.site.register(TrendingInCollege, TrendingInCollegeAdmin) #Unused model
66+ admin .site .register (BookmarkedNotice , BookmarkedNoticeAdmin )
67+ admin .site .register (TrendingInCollege , TrendingInCollegeAdmin )
0 commit comments