Created
August 24, 2012 08:16
-
-
Save lig/3447412 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def another_profile(request, id): | |
user2 = CustomUser.objects.get(id = id) | |
if request.user.is_authenticated(): | |
if request.user == user2: | |
viewable = False | |
else: | |
viewable = True | |
userlist = request.user.friends.all() | |
try: | |
Friendship.objects.get(user=request.user) | |
friend = True | |
except ValueError: | |
friend = False | |
form = CustomUser.objects.get(id = id) | |
return render(request, "another_profile.html", locals()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment