from django.views.generic import TemplateView
from django.shortcuts import redirect

class Signup(TemplateView):
    template_name = 'signup.html'
    def dispatch(self, request, *args, **kwargs):
        if request.user.is_authenticated():
            return redirect('Dashboard')
        else:
            return super(Signup, self).dispatch(request, *args, **kwargs)