def get_version(self, obj):
    if obj.version:
        path = reverse('projects-versions-detail', kwargs={'parent_lookup_project__slug': obj.project.slug, 'version_slug': obj.version.slug})
        return self._absolute_url(path)
    return None
def get_version(self, obj):
    if obj.version:
        path = reverse('projects-versions-detail', kwargs={'parent_lookup_project__slug': obj.project.slug, 'version_slug': obj.version.slug})
        return self._absolute_url(path)
    return None