Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvhacks committed Sep 25, 2017
1 parent 2bd97f3 commit 264290c
Showing 1 changed file with 34 additions and 4 deletions.
38 changes: 34 additions & 4 deletions notices/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.contrib import admin
<<<<<<< HEAD
from notices.models import Notice, BookmarkedNotice


Expand All @@ -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'),
Expand All @@ -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)

0 comments on commit 264290c

Please sign in to comment.