-\r
-def render(template=None, tab=None):\r
- def decorator(func):\r
- def decorated(request, *args, **kwargs):\r
- context = func(request, *args, **kwargs)\r
+from django.utils.translation import ungettext, ugettext as _\r
+from forum.modules import ui, decorate\r
+import logging\r
+\r
+def login_required(func, request, *args, **kwargs):\r
+ if not request.user.is_authenticated():\r
+ return HttpResponseRedirect(reverse('auth_signin'))\r
+ else:\r
+ return func(request, *args, **kwargs)\r
+\r
+def render(template=None, tab=None, tab_title='', weight=500, tabbed=True):\r
+ def decorator(func): \r
+ def decorated(context, request, *args, **kwargs):\r
+ if isinstance(context, HttpResponse):\r
+ return context\r