]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/views/users.py
Adds custom header and footer, and a preview mechanism.
[osqa.git] / forum / views / users.py
index 7202d39e7fbd2f2a5b1e8f758048972dd6572b72..da556be2654706cf0124786f99bd6b7663142f7e 100644 (file)
@@ -204,7 +204,7 @@ def user_stats(request, user):
 \r
 @user_view('users/recent.html', 'recent', _('recent user activity'), _('recent activity'))\r
 def user_recent(request, user):\r
 \r
 @user_view('users/recent.html', 'recent', _('recent user activity'), _('recent activity'))\r
 def user_recent(request, user):\r
-    activities = user.actions.exclude(action_type__in=("voteup", "votedown", "voteupcomment", "flag")).order_by('-action_date')[:USERS_PAGE_SIZE]\r
+    activities = user.actions.exclude(action_type__in=("voteup", "votedown", "voteupcomment", "flag", "newpage", "editpage")).order_by('-action_date')[:USERS_PAGE_SIZE]\r
 \r
     return {"view_user" : user, "activities" : activities}\r
 \r
 \r
     return {"view_user" : user, "activities" : activities}\r
 \r
@@ -250,13 +250,13 @@ def user_subscriptions(request, user):
                 request.user.message_set.create(message=_('Notifications are now enabled'))\r
             else:\r
                 request.user.message_set.create(message=_('Notifications are now disabled'))\r
                 request.user.message_set.create(message=_('Notifications are now enabled'))\r
             else:\r
                 request.user.message_set.create(message=_('Notifications are now disabled'))\r
-        else:\r
-            form.is_valid()\r
-            for k,v in form.cleaned_data.items():\r
-                setattr(user.subscription_settings, k, v)\r
 \r
 \r
-            user.subscription_settings.save()\r
-            request.user.message_set.create(message=_('New subscription settings are now saved'))\r
+        form.is_valid()\r
+        for k,v in form.cleaned_data.items():\r
+            setattr(user.subscription_settings, k, v)\r
+\r
+        user.subscription_settings.save()\r
+        request.user.message_set.create(message=_('New subscription settings are now saved'))\r
     else:\r
         form = SubscriptionSettingsForm(user.subscription_settings.__dict__)\r
 \r
     else:\r
         form = SubscriptionSettingsForm(user.subscription_settings.__dict__)\r
 \r