When last_version is deleted, do not delete text and previous versions in cascade, but really delete text only when there is no previous version, otherwise update text.last_version with previous version.
from django.utils.translation.trans_real import translation
def translate_to(value, language_code):
t = translation(language_code)
return getattr(t, 'gettext')(value)