profile/views.py
changeset 28 4dfcc826b241
parent 3 479cbf5c822a
child 29 b1245d75938d
--- a/profile/views.py	Fri Jan 07 11:11:53 2011 +0530
+++ b/profile/views.py	Fri Jan 07 11:19:36 2011 +0530
@@ -1,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)