class Cart(models.Model):
    user = models.ForeignKey(UserProxy)


class UserProxy(models.Model):
    user = models.ForeignKey(User, unique=True, null=True)
session = models.CharField(max_length=32, null=True)
Giving anonymous users the same functionality as registered ones