From: Radek Czajka Date: Tue, 14 Apr 2020 14:35:49 +0000 (+0200) Subject: Fix error with saving readnly inlines in admin. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/65c2a737f0e3ac2fd83ad884edd1a47393a3f48b Fix error with saving readnly inlines in admin. --- diff --git a/src/messaging/admin.py b/src/messaging/admin.py index 6749106d6..c12b56ce3 100644 --- a/src/messaging/admin.py +++ b/src/messaging/admin.py @@ -5,21 +5,8 @@ from fnpdjango.actions import export_as_csv_action from . import models -class EmailSentInline(admin.TabularInline): - model = models.EmailSent - fields = ['timestamp', 'contact', 'subject'] - readonly_fields = ['timestamp', 'contact', 'subject'] - extra = 0 - can_delete = False - show_change_link = True - - def has_add_permission(self, request, obj): - return False - - class EmailTemplateAdmin(admin.ModelAdmin): list_display = ['state', 'min_days_since', 'subject', 'min_hour'] - inlines = [EmailSentInline] fieldsets = [ (None, {"fields": [ 'state',