Modify

Ticket #414 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Classes that inherit from django.contrib.contenttypes.generic.GenericRelation are not ignored

Reported by: jazzido@… Owned by: andrew
Priority: major Milestone: 0.7.1
Component: commands Version: 0.7
Keywords: Cc:

Description

django-objectpermissions (http://github.com/washingtontimes/django-objectpermissions) implements two classes (models.UserPermissionRelation and models.GroupPermissionRelation) that inherit from django.contrib.contenttypes.generic.GenericRelation.

South's modelsinspector ignores GenericRelation by default, but doesn't check if a field inherits from it causing an error in instrospection.

Here's a patch to include an introspection plugin for django-objectpermission (a quite popular Django app) to ignore models.UserPermissionRelation and models.GroupPermissionRelation.

More generally, modelsinspector.can_ignore could be modified to check a field's base class. I'm not sure if that'd be correct...

Thanks!

--
Manuel Aristarán

Attachments

django-objectpermissions-plugin.py (891 bytes) - added by jazzido@… 4 years ago.
objectpermissions introspection plugin

Change History

Changed 4 years ago by jazzido@…

objectpermissions introspection plugin

comment:1 Changed 4 years ago by andrew

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to 0.7.1

Committed in [758283ed1e6e].

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.