@receiver(user_logged_in)
def handle_customer_login(sender, **kwargs):
 try:
  kwargs[u'request'].customer = kwargs[u'request'].user.customer
 except (AttributeError, ObjectDoesNotExist):
  kwargs[u'request'].customer = SimpleLazyObject((lambda : CustomerModel.objects.get_from_request(kwargs[u'request'])))

@ receiver ( user_logged_in ) def handle_customer_login ( sender , ** kwargs ) : try : kwargs [ u'request' ] . customer = kwargs [ u'request' ] . user . customer except ( AttributeError , ObjectDoesNotExist ) : kwargs [ u'request' ] . customer = SimpleLazyObject ( ( lambda : CustomerModel . objects . get_from_request ( kwargs [ u'request' ] ) ) )
update request .