Ejemplo n.º 1
0
def saving_eventable_model(instance, created=False, **kwaegs):

    if created:
        e = Event()
        e.title = instance.get_event_title()
        e.author = instance.get_author()
        e.content_type = ContentType.objects.get_for_model(instance)
        e.object_id = instance.id
        e.save()