summaryrefslogtreecommitdiffstats
path: root/askbot/views
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-08-22 11:57:52 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-08-22 11:57:52 -0400
commit8ed7e7f6b5959895946f0c55c68532d59bad683c (patch)
treed698c32c72c3820c68eba9277169fa66444635d0 /askbot/views
parent86314df915bfc18a9d933d486179e191c700029d (diff)
parent7b25c50275d319ed26d4ec1b5a51783c989e05e8 (diff)
downloadaskbot-8ed7e7f6b5959895946f0c55c68532d59bad683c.tar.gz
askbot-8ed7e7f6b5959895946f0c55c68532d59bad683c.tar.bz2
askbot-8ed7e7f6b5959895946f0c55c68532d59bad683c.zip
merged adolfos branch
Diffstat (limited to 'askbot/views')
-rw-r--r--askbot/views/commands.py10
-rw-r--r--askbot/views/users.py11
2 files changed, 15 insertions, 6 deletions
diff --git a/askbot/views/commands.py b/askbot/views/commands.py
index aa602f55..a399e8c8 100644
--- a/askbot/views/commands.py
+++ b/askbot/views/commands.py
@@ -331,7 +331,7 @@ def vote(request, id):
response_data['count'] = post.offensive_flag_count
response_data['success'] = 1
-
+
elif vote_type in ['7.6', '8.6']:
#flag question or answer
if vote_type == '7.6':
@@ -469,7 +469,7 @@ def get_tags_by_wildcard(request):
wildcard = request.GET.get('wildcard', None)
if wildcard is None:
raise Http404
-
+
matching_tags = models.Tag.objects.get_by_wildcards( [wildcard,] )
count = matching_tags.count()
names = matching_tags.values_list('name', flat = True)[:20]
@@ -917,7 +917,7 @@ def edit_group_membership(request):
@decorators.admins_only
def save_group_logo_url(request):
"""saves urls for the group logo"""
- form = forms.GroupLogoURLForm(request.POST)
+ form = forms.GroupLogoURLForm(request.POST)
if form.is_valid():
group_id = form.cleaned_data['group_id']
image_url = form.cleaned_data['image_url']
@@ -1055,8 +1055,8 @@ def save_post_reject_reason(request):
@decorators.admins_only
def moderate_suggested_tag(request):
"""accepts or rejects a suggested tag
- if thread id is given, then tag is
- applied to or removed from only one thread,
+ if thread id is given, then tag is
+ applied to or removed from only one thread,
otherwise the decision applies to all threads
"""
form = forms.ModerateTagForm(request.POST)
diff --git a/askbot/views/users.py b/askbot/views/users.py
index d192ade9..7494f932 100644
--- a/askbot/views/users.py
+++ b/askbot/views/users.py
@@ -59,6 +59,15 @@ def owner_or_moderator_required(f):
def show_users(request, by_group=False, group_id=None, group_slug=None):
"""Users view, including listing of users by group"""
+
+ if askbot_settings.GROUPS_ENABLED and not by_group:
+ default_group = get_global_group()
+ group_slug = slugify(default_group.name)
+ new_url = reverse('users_by_group',
+ kwargs={'group_id': default_group.id,
+ 'group_slug': group_slug})
+ return HttpResponseRedirect(new_url)
+
users = models.User.objects.exclude(status = 'b')
group = None
group_email_moderation_enabled = False
@@ -397,7 +406,7 @@ def user_stats(request, user, context):
interesting_tag_names = None
ignored_tag_names = None
subscribed_tag_names = None
-
+
# tags = models.Post.objects.filter(author=user).values('id', 'thread', 'thread__tags')
# post_ids = set()
# thread_ids = set()