'Calculate What Links Here data for links going out from this.
Also returns a parsed version of the current html, because that
is a byproduct of the process, and is useful.'

def parse_and_calculate_links(self):

    if (not self.current_revision):
        return ''
    self.links_from().delete()
    DocumentImage.objects.filter(document=self).delete()
    from kitsune.wiki.parser import wiki_to_html, WhatLinksHereParser
    return wiki_to_html(self.current_revision.content, locale=self.locale, doc_id=self.id, parser_cls=WhatLinksHereParser)
