All pastes #182160 Raw Edit

Something

public python v1 · immutable
#182160 ·published 2006-09-25 19:58 UTC
rendered paste body
def update_profile_view(request):        try:            profile = UserProfile.objects.get(pk=request.user.id)            return update_object(                request,                model = UserProfile,                object_id = int(request.user.id),                #extra_context = { 'UserProfile': UserProfile._meta, },                login_required = True,                post_save_redirect = '/home/',            )        except UserProfile.DoesNotExist:            return create_object(                request,                model = UserProfile,                #extra_context = { 'UserProfile': UserProfile._meta, },                login_required = True,                post_save_redirect = '/home/',            )