'Process request'

def process_request(self, request):

    if (getattr(request, 'mobile', False) and (not request.POST) and ('/m' not in request.path[:2]) and ('/static' not in request.path[:7])):
        if request.GET.get('nomobile', False):
            request.session['nomobile'] = True
        elif ('nomobile' not in request.session):
            return HttpResponseRedirect(('/m' + request.path))
    if (hasattr(request, 'user') and request.user.is_authenticated()):
        domain = getattr(settings, 'CURRENT_DOMAIN', 'default')
        cache.set(('treeio_%s_last' % domain), time.time())
        if (getattr(settings, 'HARDTREE_SUBSCRIPTION_BLOCKED', False) and ('/accounts' not in request.path)):
            return HttpResponseRedirect('/accounts/logout')
        user = None
        try:
            user = request.user.profile
            self.objects[unicode(user.id)] = {}
        except Exception:
            pass
        if (not user):
            logout(request)
            return HttpResponseRedirect('/')
        do_fresh_subscribers = curry(self.do_fresh_subscribers, user, request)
        send_notifications_on_save = curry(self.send_notifications_on_save, user, request)
        send_notifications_on_delete = curry(self.send_notifications_on_delete, user, request)
        send_notifications_on_m2m = curry(self.send_notifcations_on_m2m, user, request)
        signals.pre_save.connect(send_notifications_on_save, dispatch_uid=request, weak=False)
        signals.post_save.connect(do_fresh_subscribers, dispatch_uid=request, weak=False)
        signals.pre_delete.connect(send_notifications_on_delete, dispatch_uid=request, weak=False)
        signals.m2m_changed.connect(send_notifications_on_m2m, dispatch_uid=request, weak=False)
