Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/o/c/ocean-HEAD/webservice/user_account/views.py   ocean(Download)
    user = authenticate(username=username, password=password)
    # UserProfile init
    user_profile = UserProfile.objects.filter(user=user)
    if len(user_profile) == 0:
        UserProfile.objects.create(
            profile_image=None
        )
        user_profile = UserProfile.objects.filter(user=user)
 
    if user is not None:

src/o/c/ocean-HEAD/webservice/ocean/views.py   ocean(Download)
def edit_profile(request):
    # Read current user profile data
    user = User.objects.filter(username__exact=request.user.username)[0]
    user_profile = UserProfile.objects.filter(user=user.pk)[0]
    current_description = user_profile.description