cmsmanage/membershipworks/admin.py

15 lines
369 B
Python
Raw Normal View History

from django.contrib import admin
from .models import Member
@admin.register(Member)
class MemberAdmin(admin.ModelAdmin):
readonly_fields = [field.name for field in Member._meta.get_fields() if field.concrete]
def has_add_permission(self, request, obj=None):
return False
def has_delete_permission(self, request, obj=None):
return False