#342: Add a way for fields to be displayed in the admin without being editable -------------------------------------------+-------------------------------- Reporter: Bless | Owner: brosner Status: reopened | Milestone: 1.2 Component: django.contrib.admin | Version: newforms-admin Resolution: | Keywords: djangocon Stage: Accepted | Has_patch: 1 Needs_docs: 0 | Needs_tests: 1 Needs_better_patch: 1 | -------------------------------------------+-------------------------------- Changes (by hejsan):
* status: closed => reopened * resolution: fixed => Comment: This breaks if a ManyToMany field is specified as readonly. This is because the contents() function that is called in the fieldset.html template tries to display the value of the field but gets a ValueError if it is a ManyToManyField because they can't be used: "[Model name] instance needs to have a primary key value before a many-to-many relationship can be used" Just need to add ValueError to the catch as seen in the patch I attached, called catch_value_error.diff. -- Ticket URL: <http://code.djangoproject.com/ticket/342#comment:40> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.