diff options
author | hrcerqueira <hrcerqueira@gmail.com> | 2010-02-17 14:26:36 +0000 |
---|---|---|
committer | hrcerqueira <hrcerqueira@gmail.com> | 2010-02-17 14:26:36 +0000 |
commit | 2ed113bf7a5aee6f3d1bbb2197e895033f9ba403 (patch) | |
tree | 40db174acecbcb3ebda18f19a0dfa763cfdfd88d /forum/views | |
parent | dd93c0b1e84b6cdb2eca873bceb8c829aacc48d6 (diff) | |
download | askbot-2ed113bf7a5aee6f3d1bbb2197e895033f9ba403.tar.gz askbot-2ed113bf7a5aee6f3d1bbb2197e895033f9ba403.tar.bz2 askbot-2ed113bf7a5aee6f3d1bbb2197e895033f9ba403.zip |
Complete reorganization of models and managers, and removal of some raw sql queries.
Diffstat (limited to 'forum/views')
-rw-r--r-- | forum/views/__init__.py | 2 | ||||
-rw-r--r-- | forum/views/content.py | 1 | ||||
-rw-r--r-- | forum/views/users.py | 5 |
3 files changed, 5 insertions, 3 deletions
diff --git a/forum/views/__init__.py b/forum/views/__init__.py index 7fdb6f61..9c112c9b 100644 --- a/forum/views/__init__.py +++ b/forum/views/__init__.py @@ -1,4 +1,4 @@ import content import users import meta -import books +#import books diff --git a/forum/views/content.py b/forum/views/content.py index 2833edfc..9506fe3a 100644 --- a/forum/views/content.py +++ b/forum/views/content.py @@ -20,6 +20,7 @@ from django.utils.translation import ugettext as _ from django.utils.datastructures import SortedDict from django.template.defaultfilters import slugify from django.core.exceptions import PermissionDenied +from django.core.urlresolvers import reverse from utils.html import sanitize_html from utils.decorators import ajax_method, ajax_login_required 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) |