diff --git a/notices/admin.py b/notices/admin.py index 81304b5..1e77a42 100644 --- a/notices/admin.py +++ b/notices/admin.py @@ -1,4 +1,5 @@ from django.contrib import admin +<<<<<<< HEAD from notices.models import Notice, BookmarkedNotice @@ -15,12 +16,21 @@ class BookmarkedNoticeAdmin(admin.TabularInline): class NoticeAdmin(admin.ModelAdmin): list_display = ('faculty', 'title', 'course_branch_year', 'created', 'modified', 'visible_for_student', +======= +from notices.models import Notice, BookmarkedNotice, TrendingInCollege +from import_export.admin import ImportExportModelAdmin + + +class NoticeAdmin(ImportExportModelAdmin): + list_display = ('id','faculty', 'title', 'course_branch_year', 'created', 'modified', 'visible_for_student', +>>>>>>> parent of 38b3302... Notice admin updated 'visible_for_faculty', 'visible_for_hod', 'visible_for_others', 'visible_for_management' ) list_display_links = ('title', 'faculty') - list_filter = ('faculty', 'category') - list_per_page = 100 - inlines = [BookmarkedNoticeAdmin] + list_filter = ('category',) + list_per_page = 15 + # search_fields = ['title', 'faculty'] + fieldsets = ( (None, { 'classes': ('wide', 'extrapretty'), @@ -29,9 +39,29 @@ class NoticeAdmin(admin.ModelAdmin): ) +<<<<<<< HEAD # class TrendingInCollegeAdmin(admin.ModelAdmin): # list_display = ('title', 'attachment', 'visibility') +======= +class BookmarkedNoticeAdmin(ImportExportModelAdmin): + list_display = ('user', 'pinned', 'notice', ) + # list_filter = ('notice',) + list_per_page = 25 + + fieldsets = ( + (None, { + 'classes': ('extrapretty'), + 'fields': (('user', 'notice'), 'pinned'), + }), + ) + + +class TrendingInCollegeAdmin(ImportExportModelAdmin): + list_display = ('title', 'attachment', 'visibility') + +>>>>>>> parent of 38b3302... Notice admin updated admin.site.register(Notice, NoticeAdmin) -# admin.site.register(TrendingInCollege, TrendingInCollegeAdmin) #Unused model +admin.site.register(BookmarkedNotice, BookmarkedNoticeAdmin) +admin.site.register(TrendingInCollege, TrendingInCollegeAdmin)