def publish(self, dry_run=False, all_published=None, parent=None):
    '\n        either publish changes or deletions, depending on\n        whether this model is public or draft.\n    \n        public models will be examined to see if they need deleting\n        and deleted if so.\n        '
    if self.is_public:
        raise PublishException('Cannot publish public model - publish should be called from draft model')
    if (self.pk is None):
        raise PublishException('Please save model before publishing')
    if (self.publish_state == Publishable.PUBLISH_DELETE):
        self.publish_deletions(dry_run=dry_run, all_published=all_published, parent=parent)
        return None
    else:
        return self.publish_changes(dry_run=dry_run, all_published=all_published, parent=parent)
either publish changes or deletions, depending on
whether this model is public or draft.

public models will be examined to see if they need deleting
and deleted if so.
def publish(self, dry_run=False, all_published=None, parent=None):
    '\n        either publish changes or deletions, depending on\n        whether this model is public or draft.\n    \n        public models will be examined to see if they need deleting\n        and deleted if so.\n        '
    if self.is_public:
        raise PublishException('Cannot publish public model - publish should be called from draft model')
    if (self.pk is None):
        raise PublishException('Please save model before publishing')
    if (self.publish_state == Publishable.PUBLISH_DELETE):
        self.publish_deletions(dry_run=dry_run, all_published=all_published, parent=parent)
        return None
    else:
        return self.publish_changes(dry_run=dry_run, all_published=all_published, parent=parent)