1
0
Fork 0

all service ids are readonly fields now

This commit is contained in:
Benni Bärmann 2022-12-09 16:33:52 +00:00
parent e814b7fa41
commit fbad8873ba
2 changed files with 6 additions and 0 deletions

BIN
input/.models.py.swp Normal file

Binary file not shown.

View File

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