Changes between Initial Version and Version 1 of Ticket #20279
- Timestamp:
- Apr 17, 2013, 3:40:44 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #20279
- Property Component Uncategorized → contrib.contenttypes
- Property Resolution → needsinfo
- Property Status new → closed
-
Ticket #20279 – Description
initial v1 1 while I used field names item_type, item_id instead of content_type, object_id. 2 to reference an object. and while delete the object, it will raise exception. 1 While I used field names `item_type`, `item_id` instead of `content_type`, `object_id` to reference an object. and while delete the object, it will raise exception. 3 2 4 3 For example: 5 4 5 {{{ 6 #!python 6 7 class ObjectPermission(models.Model): 7 8 # implement object/row based permission … … 17 18 class Publisher(models.Model): 18 19 name = models.CharField(max_length=255) 20 }}} 19 21 20 22 I create an relation between publisher and object permission. 21 23 while delete a publisher in django admin, it will raise fielderror, 22 24 25 {{{ 23 26 at query.py line 1320 24 27 raise FieldError("Cannot resolve keyword object into field. " 25 28 "Choices are: %s" % (name, ", ".join(names))) 26 29 }}} 27 30 and after I change the field name back to content_type, object_id, 28 31 the exception won't appear.