Ticket #693 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

Introspection plugin for Django Audit Log

Reported by: Rick.van.Hattem@… Owned by: andrew
Priority: major Milestone: 1.0
Component: commands Version: unknown
Keywords: Cc:


Since this came by at a StackOverflow? question I thought it might be nice to add the introspection plugin to South :)

Django Audit Log uses a custom field to store the current user, it's trivial to implement but might confuse some users.

Link to the field: http://code.google.com/p/django-audit-log/source/browse/audit_log/models/fields.py

The StackOverflow? question: http://stackoverflow.com/questions/4475377/django-south-with-django-audit-log/

The proposed plugin:

South introspection rules for django-audit-log
from south.modelsinspector import add_introspection_rules
    # Try and import the field so we can see if audit_log is available
    from audit_log.models import fields

    # Make sure the `to` and `null` parameters will be ignored
    rules = [(                                     
            'to': ['rel.to', {'default': User}],   
            'null': ['null', {'default': True}],   

    # Add the rules for the `LastUserField`
except ImportError:                                 

Change History

comment:1 Changed 5 years ago by andrew

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

Fixed in [abd220673d79].

Note: See TracTickets for help on using tickets.