[Answered ]-Use different view depending on object model database value in Django

2👍

Function should return result of v2_page call:

def v1_page(request, page_id):
    page = get_object_or_404(Page, id=page_id)
    if page.upgraded:
        return v2_page(request, page)
    else:
        # load this page 

Leave a comment