Django editable=False and still show in fieldsets? -
i have image field in models.py...
qr_image = models.imagefield( upload_to="public/uploads/", height_field="qr_image_height", width_field="qr_image_width", null=true, blank=true, editable=false )
when it's editable=false
nasty error when trying show it. don't want field editable, want image show in admin 'edit' page i.e. fieldsets
i'm new django, can tell me if possible , point me in right direction here?
thank you.
an easy way accomplish create field read-only in modeladmin: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.modeladmin.readonly_fields
django django-admin
No comments:
Post a Comment