insert_above is integrated for adding js/css on the fly
[myslice.git] / slice / views.py
1 # Create your views here.
2 from django.core.context_processors import csrf
3 from django.template import RequestContext
4 from django.template.loader import render_to_string
5 from django.shortcuts import render_to_response
6
7 def foo (request):
8     
9     content_string = render_to_string ('foo-menu.html',
10                                        {'menu_items' : {'item1':'/url1/', 'item2':'/url2',},
11                                         'current_item': 'item1'})
12     
13     result=render_to_response('foo.html',{'foo':'bar', 'content_string' : content_string },
14                               context_instance=RequestContext(request))
15
16     print 'foo : result=',result
17
18     return result