[Answered ]-Django Admin Interface ReadOnly

2👍

Yes you can make admin field read only

https://docs.djangoproject.com/en/1.9/ref/contrib/admin/#django.contrib.admin.ModelAdmin.readonly_fields

 class MyAdmin(admin.ModelAdmin)
     fields = ("organization", "field2")
     readonly_fields = ("organization", )

     def save_model(self, request, obj, form, change):
         obj.organization = request.user.organization
         obj.save()
👤Ramast

Leave a comment