At first,I create a 'profile' for User:
User.profile = property(lambda u: Configs.objects.get_or_create(user=u)[0])
and use this to get the profile:
request.user.profile
more detail here: https://code.djangoproject.com/ticket/15937
At first,I create a 'profile' for User:
User.profile = property(lambda u: Configs.objects.get_or_create(user=u)[0])
and use this to get the profile:
request.user.profile
more detail here: https://code.djangoproject.com/ticket/15937