|
@ -42,24 +42,83 @@ class BusinessCardAdmin(admin.ModelAdmin): |
|
|
list_display = ('realname', 'service_id', 'granted', 'granted_date', 'project') |
|
|
list_display = ('realname', 'service_id', 'granted', 'granted_date', 'project') |
|
|
list_display_links = ('realname', 'service_id') |
|
|
list_display_links = ('realname', 'service_id') |
|
|
# action = ['export_as_csv'] |
|
|
# action = ['export_as_csv'] |
|
|
|
|
|
|
|
|
|
|
|
date_hierarchy = 'granted_date' |
|
|
class Media: |
|
|
class Media: |
|
|
js = ('dropdown/js/base.js',) |
|
|
js = ('dropdown/js/base.js',) |
|
|
|
|
|
|
|
|
@admin.register(Literature) |
|
|
@admin.register(Literature) |
|
|
class LiteratureAdmin(admin.ModelAdmin): |
|
|
class LiteratureAdmin(admin.ModelAdmin): |
|
|
|
|
|
|
|
|
|
|
|
save_as = True |
|
|
|
|
|
search_fields = (('realname', 'service_id'), 'granted', 'granted_date') |
|
|
|
|
|
list_display = ('realname', 'service_id', 'granted', 'granted_date') |
|
|
|
|
|
list_display_links = ('realname', 'service_id') |
|
|
|
|
|
date_hierarchy = 'granted_date' |
|
|
class Media: |
|
|
class Media: |
|
|
js = ('dropdown/js/base.js',) |
|
|
js = ('dropdown/js/base.js',) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@admin.register(Account) |
|
|
|
|
|
class AccountAdmin(admin.ModelAdmin): |
|
|
|
|
|
save_as = True |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@admin.register(HonoraryCertificate) |
|
|
|
|
|
class HonoraryCertificateAdmin(admin.ModelAdmin): |
|
|
|
|
|
save_as = True |
|
|
|
|
|
search_fields = ('realname', 'granted', 'granted_date', 'project') |
|
|
|
|
|
list_display = ('realname', 'granted', 'granted_date', 'project') |
|
|
|
|
|
list_display_links = ('realname', 'project') |
|
|
|
|
|
date_hierarchy = 'granted_date' |
|
|
|
|
|
|
|
|
|
|
|
@admin.register(Library) |
|
|
|
|
|
class LibraryAdmin(admin.ModelAdmin): |
|
|
|
|
|
save_as = True |
|
|
|
|
|
search_fields = (('realname', 'service_id'), 'granted', 'granted_date') |
|
|
|
|
|
list_display = ('realname', 'service_id', 'granted', 'granted_date') |
|
|
|
|
|
list_display_links = ('realname', 'service_id') |
|
|
|
|
|
date_hierarchy = 'granted_date' |
|
|
|
|
|
|
|
|
|
|
|
@admin.register(IFG) |
|
|
|
|
|
class IFGAdmin(admin.ModelAdmin): |
|
|
|
|
|
save_as = True |
|
|
|
|
|
search_fields = (('realname', 'service_id'), 'granted', 'granted_date') |
|
|
|
|
|
list_display = ('realname', 'service_id', 'granted', 'granted_date') |
|
|
|
|
|
list_display_links = ('realname', 'service_id') |
|
|
|
|
|
date_hierarchy = 'granted_date' |
|
|
|
|
|
|
|
|
|
|
|
@admin.register(Travel) |
|
|
|
|
|
class TravelAdmin(admin.ModelAdmin): |
|
|
|
|
|
save_as = True |
|
|
|
|
|
search_fields = ('realname', 'granted', 'granted_date', 'project') |
|
|
|
|
|
list_display = ('realname', 'granted', 'granted_date', 'project') |
|
|
|
|
|
list_display_links = ('realname', 'project') |
|
|
|
|
|
date_hierarchy = 'granted_date' |
|
|
|
|
|
|
|
|
|
|
|
@admin.register(Email) |
|
|
|
|
|
class EmailAdmin(admin.ModelAdmin): |
|
|
|
|
|
save_as = True |
|
|
|
|
|
search_fields = (('realname', 'service_id'), 'granted', 'granted_date') |
|
|
|
|
|
list_display = ('realname', 'service_id', 'granted', 'granted_date') |
|
|
|
|
|
list_display_links = ('realname', 'service_id') |
|
|
|
|
|
date_hierarchy = 'granted_date' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin.site.register([ |
|
|
|
|
|
Account, |
|
|
|
|
|
HonoraryCertificate, |
|
|
|
|
|
Library, |
|
|
|
|
|
IFG, |
|
|
|
|
|
Travel, |
|
|
|
|
|
Email, |
|
|
|
|
|
List, |
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
@admin.register(List) |
|
|
|
|
|
class ListAdmin(admin.ModelAdmin): |
|
|
|
|
|
save_as = True |
|
|
|
|
|
search_fields = (('realname', 'service_id'), 'granted', 'granted_date') |
|
|
|
|
|
list_display = ('realname', 'service_id', 'granted', 'granted_date') |
|
|
|
|
|
list_display_links = ('realname', 'service_id') |
|
|
|
|
|
date_hierarchy = 'granted_date' |
|
|
|
|
|
|
|
|
|
|
|
# commented out because of the individual registering to control displays in admin panel |
|
|
|
|
|
|
|
|
|
|
|
#admin.site.register([ |
|
|
|
|
|
# Account, |
|
|
|
|
|
# HonoraryCertificate, |
|
|
|
|
|
# Library, |
|
|
|
|
|
# IFG, |
|
|
|
|
|
# Travel, |
|
|
|
|
|
# Email, |
|
|
|
|
|
# List, |
|
|
|
|
|
# ]) |