Browse Source

all service ids are readonly fields now

master
Benni Bärmann 1 year ago
parent
commit
fbad8873ba
2 changed files with 6 additions and 0 deletions
  1. BIN
      input/.models.py.swp
  2. +6
    -0
      input/admin.py

BIN
input/.models.py.swp View File


+ 6
- 0
input/admin.py View File

@ -43,6 +43,7 @@ class BusinessCardAdmin(admin.ModelAdmin):
list_display_links = ('realname', 'service_id') list_display_links = ('realname', 'service_id')
# action = ['export_as_csv'] # action = ['export_as_csv']
date_hierarchy = 'granted_date' date_hierarchy = 'granted_date'
readonly_fields = ['service_id']
class Media: class Media:
js = ('dropdown/js/base.js',) js = ('dropdown/js/base.js',)
@ -53,6 +54,7 @@ class LiteratureAdmin(admin.ModelAdmin):
list_display = ('realname', 'service_id', 'granted', 'granted_date') list_display = ('realname', 'service_id', 'granted', 'granted_date')
list_display_links = ('realname', 'service_id') list_display_links = ('realname', 'service_id')
date_hierarchy = 'granted_date' date_hierarchy = 'granted_date'
readonly_fields = ['service_id']
@admin.register(Account) @admin.register(Account)
@ -74,6 +76,7 @@ class LibraryAdmin(admin.ModelAdmin):
list_display = ('realname', 'service_id', 'granted', 'granted_date') list_display = ('realname', 'service_id', 'granted', 'granted_date')
list_display_links = ('realname', 'service_id') list_display_links = ('realname', 'service_id')
date_hierarchy = 'granted_date' date_hierarchy = 'granted_date'
readonly_fields = ['service_id']
@admin.register(IFG) @admin.register(IFG)
class IFGAdmin(admin.ModelAdmin): class IFGAdmin(admin.ModelAdmin):
@ -82,6 +85,7 @@ class IFGAdmin(admin.ModelAdmin):
list_display = ('realname', 'service_id', 'granted', 'granted_date') list_display = ('realname', 'service_id', 'granted', 'granted_date')
list_display_links = ('realname', 'service_id') list_display_links = ('realname', 'service_id')
date_hierarchy = 'granted_date' date_hierarchy = 'granted_date'
readonly_fields = ['service_id']
@admin.register(Travel) @admin.register(Travel)
class TravelAdmin(admin.ModelAdmin): class TravelAdmin(admin.ModelAdmin):
@ -101,6 +105,7 @@ class EmailAdmin(admin.ModelAdmin):
list_display_links = ('realname', 'service_id') list_display_links = ('realname', 'service_id')
date_hierarchy = 'granted_date' date_hierarchy = 'granted_date'
radio_fields = {'adult': admin.VERTICAL} radio_fields = {'adult': admin.VERTICAL}
readonly_fields = ['service_id']
class Media: class Media:
js = ('dropdown/js/base.js',) js = ('dropdown/js/base.js',)
@ -112,6 +117,7 @@ class ListAdmin(admin.ModelAdmin):
list_display = ('realname', 'service_id', 'granted', 'granted_date') list_display = ('realname', 'service_id', 'granted', 'granted_date')
list_display_links = ('realname', 'service_id') list_display_links = ('realname', 'service_id')
date_hierarchy = 'granted_date' date_hierarchy = 'granted_date'
readonly_fields = ['service_id']
# commented out because of the individual registering to control displays in admin panel # commented out because of the individual registering to control displays in admin panel

Loading…
Cancel
Save