changeset 28 | 4dfcc826b241 |
parent 3 | 479cbf5c822a |
child 29 | b1245d75938d |
27:1ce8241a9628 | 28:4dfcc826b241 |
---|---|
1 # Create your views here. |
1 from django.shortcuts import render_to_response, redirect |
2 |
|
3 from django.contrib.auth.decorators import login_required |
|
4 |
|
5 @login_required |
|
6 def view_profile(request): |
|
7 |
|
8 user = request.user |
|
9 |
|
10 profile = user.get_profile() |
|
11 |
|
12 context = {"user": user, |
|
13 "profile": profile, |
|
14 } |
|
15 return render_to_response("/profile/view.html", context) |