Created
April 27, 2017 09:40
-
-
Save slomo/1e9d62ec9a362e86f7b667bcaab518a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if action = "create": | |
project = instance.project | |
if 'action_target' in instance._meta.action_target: | |
action.target = getattr(instance, instance._meta.action_target) | |
if 'content_object' in instance: | |
action.traget = instance.content_object | |
if 'module' in instance: | |
action.target = instance.module | |
elif action = "update": | |
project.instance = project | |
action.object = instance | |
action.target = None | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment