change "paid" field to readonly in django admin

This commit is contained in:
Thomas Steen Rasmussen 2016-07-05 21:43:09 +02:00
parent add35068af
commit 5fe157a868

View file

@ -41,6 +41,7 @@ class TicketInline(admin.TabularInline):
@admin.register(models.Order) @admin.register(models.Order)
class OrderAdmin(admin.ModelAdmin): class OrderAdmin(admin.ModelAdmin):
change_form_template = 'admin/change_order_form.html' change_form_template = 'admin/change_order_form.html'
readonly_fields = ('paid',)
def get_email(self, obj): def get_email(self, obj):
return obj.user.email return obj.user.email