diff options
Diffstat (limited to 'lib/srtgui/widgets.py')
-rw-r--r-- | lib/srtgui/widgets.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/srtgui/widgets.py b/lib/srtgui/widgets.py index b43b7619..0c2b56bf 100644 --- a/lib/srtgui/widgets.py +++ b/lib/srtgui/widgets.py @@ -34,7 +34,7 @@ from django.utils import timezone from django.http import JsonResponse from django.core.urlresolvers import reverse -from orm.models import Vulnerability, SrtSetting, Access, Keywords +from orm.models import SrtSetting, Access, Keywords from srtgui.templatetags.projecttags import sectohms, get_tasks from srtgui.templatetags.projecttags import json as template_json @@ -89,8 +89,12 @@ class ToasterTable(TemplateView): context['empty_state'] = self.empty_state # global variables - context['project_enable'] = ('1' == os.environ.get('TOASTER_BUILDSERVER')) - context['access'] = Access() + context['report_id_list'] = '' + + # Number of visits to this view, as counted in the session variable. + srt_user_id=int(self.request.session.get('srt_user_id', '0')) + context['srt_user_id'] = srt_user_id ### REMOVE + context['access'] = Access(srt_user_id) return context @@ -113,6 +117,12 @@ class ToasterTable(TemplateView): return super(ToasterTable, self).get(request, *args, **kwargs) + def put(self, *args, **kwargs): + """ function to implement in the subclass which sets up + the put method """ + _log("TABLE_PUT_SUPER") + pass + def get_filter_info(self, request, **kwargs): self.setup_filters(**kwargs) |