I have two views.
class IndexView(TemplateView):
template_name = 'index.html'
@require_POST
@login_required
def partial_view(request):
return render(request, 'partials/stuff.html')
I want the index page to be "public" but if user takes action (which triggers partial view), they should be redirected to LOGIN_URL, if not logged in.
The problem is that my partial view will return the entire LOGIN_URL page. So there's a page within a page now.
Is it possible to redirect the "parent" page when using partial views?