Ticket #12351: t12351-r11807.diff
File t12351-r11807.diff, 1.2 KB (added by , 15 years ago) |
---|
-
django/contrib/contenttypes/generic.py
268 268 obj.delete() 269 269 clear.alters_data = True 270 270 271 def get(self, **kwargs): 272 kwargs[self.content_type_field_name] = self.content_type 273 kwargs[self.object_id_field_name] = self.pk_val 274 return super(GenericRelatedObjectManager, self).get(**kwargs) 275 271 276 def create(self, **kwargs): 272 277 kwargs[self.content_type_field_name] = self.content_type 273 278 kwargs[self.object_id_field_name] = self.pk_val 274 279 return super(GenericRelatedObjectManager, self).create(**kwargs) 275 280 create.alters_data = True 276 281 282 def get_or_create(self, **kwargs): 283 kwargs[self.content_type_field_name] = self.content_type 284 kwargs[self.object_id_field_name] = self.pk_val 285 return super(GenericRelatedObjectManager, self).get_or_create(**kwargs) 286 get_or_create.alters_data = True 287 277 288 return GenericRelatedObjectManager 278 289 279 290 class GenericRel(ManyToManyRel):