reservation plugin - unbound request (unclean
[unfold.git] / sample / tabview.py
1 from django.core.context_processors import csrf
2 from django.template import RequestContext
3 from django.shortcuts import render_to_response
4 from django.contrib.auth.decorators import login_required
5
6 from unfold.prelude import Prelude
7
8 from ui.topmenu import topmenu_items, the_user
9 # tmp
10 from trashutils import lorem, hard_wired_slice_names
11
12 from myslice.settings import logger
13
14 @login_required
15 def tab_view (request):
16     logger.info("request {}".format(request.__class__))
17     logger.info("{}".format(request))
18     prelude=Prelude( js_files='js/bootstrap.js', css_files='css/bootstrap.css')
19
20     tab_env = {'title':'Page for playing with Tabs',
21                'topmenu_items': topmenu_items('tab',request),
22                'username':the_user (request),
23                'lorem': lorem,                                
24                }
25
26     tab_env.update (prelude.prelude_env())
27     return render_to_response ('view-tab.html', tab_env,
28                                context_instance=RequestContext(request))
29