1👍
✅
The very same way you’d do for just any function, why ?
def postview(request, *args, **kw):
post_type = guess_the_post_type_from(request)
view = get_the_view_for(post_type)
return view(request, *args, **kw)
Source:stackexchange.com