diff gpp/bio/views.py @ 259:75ea1a8be7f2

Fix some old import problems where I used 'from django.contrib import auth' instead of 'from django.contrib.auth.models import User'. Also some formatting changes while I was in there.
author Brian Neal <bgneal@gmail.com>
date Tue, 21 Sep 2010 23:49:05 +0000
parents 7ddd60164245
children 1ba2c6bf6eb7
line wrap: on
line diff
--- a/gpp/bio/views.py	Tue Sep 21 23:08:36 2010 +0000
+++ b/gpp/bio/views.py	Tue Sep 21 23:49:05 2010 +0000
@@ -5,8 +5,8 @@
 from django.shortcuts import render_to_response
 from django.shortcuts import get_object_or_404
 from django.template import RequestContext
-from django.contrib import auth
 from django.contrib import messages
+from django.contrib.auth.models import User
 from django.http import HttpResponse
 from django.http import HttpResponseBadRequest
 from django.http import HttpResponseRedirect
@@ -38,7 +38,7 @@
     """
     This view displays the member list. Only active members are displayed.
     """
-    qs = auth.models.User.objects.filter(is_active=True)
+    qs = User.objects.filter(is_active=True)
     if type == 'user':
         qs = qs.order_by('username')
     else:
@@ -91,7 +91,7 @@
 @login_required
 def view_profile(request, username):
 
-    user = get_object_or_404(auth.models.User, username = username)
+    user = get_object_or_404(User, username=username)
     if user == request.user:
         return HttpResponseRedirect(reverse('bio.views.my_profile'))