From 2ed113bf7a5aee6f3d1bbb2197e895033f9ba403 Mon Sep 17 00:00:00 2001 From: hrcerqueira Date: Wed, 17 Feb 2010 14:26:36 +0000 Subject: Complete reorganization of models and managers, and removal of some raw sql queries. --- forum/views/users.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'forum/views/users.py') diff --git a/forum/views/users.py b/forum/views/users.py index 03d38834..965d3a68 100644 --- a/forum/views/users.py +++ b/forum/views/users.py @@ -8,6 +8,7 @@ from django.http import HttpResponse, HttpResponseForbidden from django.utils.translation import ugettext as _ from forum.forms import *#incomplete list is EditUserForm, ModerateUserForm, TagFilterSelectionForm, from forum import auth +from django.contrib.contenttypes.models import ContentType question_type = ContentType.objects.get_for_model(Question) answer_type = ContentType.objects.get_for_model(Answer) @@ -99,8 +100,8 @@ USER_TEMPLATE_VIEWS = ( def user(request, id): sort = request.GET.get('sort', 'stats') user_view = dict((v.id, v) for v in USER_TEMPLATE_VIEWS).get(sort, USER_TEMPLATE_VIEWS[0]) - from forum import views - func = getattr(views, user_view.view_name) + from forum.views import users + func = getattr(users, user_view.view_name) return func(request, id, user_view) -- cgit v1.2.3-1-g7c22