summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-02-27 02:51:40 +0100
committerDan McGee <dan@archlinux.org>2013-02-27 02:51:40 +0100
commitdd0ecfaeaceb1e1b8a185800de35f0f6e741feac (patch)
tree5cdb1a5952ec510baac10a719dc7edc8d7d93be2 /devel
parent9ddee3494f931439e7c47eddee48ec9c6a09e662 (diff)
downloadarchweb-dd0ecfaeaceb1e1b8a185800de35f0f6e741feac.tar.gz
archweb-dd0ecfaeaceb1e1b8a185800de35f0f6e741feac.tar.xz
Use user.userprofile rather than user.get_profile()
The get_profile() function is deprecated as of Django 1.5. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r--devel/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/devel/views.py b/devel/views.py
index ff1dec1..61c1e56 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -152,7 +152,7 @@ def change_profile(request):
if request.POST:
form = ProfileForm(request.POST)
profile_form = UserProfileForm(request.POST, request.FILES,
- instance=request.user.get_profile())
+ instance=request.user.userprofile)
if form.is_valid() and profile_form.is_valid():
request.user.email = form.cleaned_data['email']
if form.cleaned_data['passwd1']:
@@ -163,7 +163,7 @@ def change_profile(request):
return HttpResponseRedirect('/devel/')
else:
form = ProfileForm(initial={'email': request.user.email})
- profile_form = UserProfileForm(instance=request.user.get_profile())
+ profile_form = UserProfileForm(instance=request.user.userprofile)
return render(request, 'devel/profile.html',
{'form': form, 'profile_form': profile_form})