diff options
author | Nishanth Amuluru | 2011-01-07 11:19:36 +0530 |
---|---|---|
committer | Nishanth Amuluru | 2011-01-07 11:19:36 +0530 |
commit | 7c47c84aea9196fdbe76b2d905774f81cffea112 (patch) | |
tree | 8f0b4c0ae5d2355871496a1c43c856a51eb9d4f2 /profile | |
parent | 745d5f4b89bd466ccbe2e41530b442bdf35b35f8 (diff) | |
download | pytask-7c47c84aea9196fdbe76b2d905774f81cffea112.tar.gz pytask-7c47c84aea9196fdbe76b2d905774f81cffea112.tar.bz2 pytask-7c47c84aea9196fdbe76b2d905774f81cffea112.zip |
Created a view for viewing profile
Diffstat (limited to 'profile')
-rwxr-xr-x | profile/views.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/profile/views.py b/profile/views.py index 60f00ef..53f1648 100755 --- a/profile/views.py +++ b/profile/views.py @@ -1 +1,15 @@ -# Create your views here. +from django.shortcuts import render_to_response, redirect + +from django.contrib.auth.decorators import login_required + +@login_required +def view_profile(request): + + user = request.user + + profile = user.get_profile() + + context = {"user": user, + "profile": profile, + } + return render_to_response("/profile/view.html", context) |