def get(self, request):
        """
        When signing a new user up - either display a setup form, or
        generate the username automatically.
        """

        if request.user.is_authenticated():
            return HttpResponseRedirect(self.get_next(request))

        try:
            user, profile, client = self.get_session_data(request)
        except __HOLE__:
            return self.error_to_response(request, dict(
                error=_("Social profile is missing from your session.")))
         
        if GENERATE_USERNAME:
            return self.generate_username_and_redirect(request, user, profile, client)
            
        form = self.get_form()(initial=self.get_initial_data(request, user, profile, client))
        
        additional_context = self.get_context(request, user, profile, client)
        return self.render_to_response(dict({'form': form}, **additional_context))
dataset/ETHPy150Open flashingpumpkin/django-socialregistration/socialregistration/views.py/Setup.get