Postfix's Transport Encryption under Control of the User
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

admin.py 804B

1234567891011121314151617181920212223242526272829
  1. from django.contrib import admin
  2. from django.contrib.auth.admin import UserAdmin
  3. from .models import User, TLSNotification, TLSLogEntry, MandatoryTLSDomains
  4. # Custom User Model
  5. # see: Two Scoops of Django, page 258
  6. # see: https://www.youtube.com/watch?v=0bAJV0zNWQw
  7. @admin.register(User)
  8. class UserAdmin(UserAdmin):
  9. pass
  10. class TLSNotificationAdmin(admin.ModelAdmin):
  11. list_display = ('queue_id', 'notification')
  12. class TLSLogEntryAdmin(admin.ModelAdmin):
  13. list_display = ('queue_id', 'sender', 'recipients', 'action', 'date')
  14. class MandatoryTLSDomainsAdmin(admin.ModelAdmin):
  15. list_display = ('domain',)
  16. admin.site.register(TLSNotification, TLSNotificationAdmin)
  17. admin.site.register(TLSLogEntry, TLSLogEntryAdmin)
  18. admin.site.register(MandatoryTLSDomains, MandatoryTLSDomainsAdmin)