Setting tag myslice-0.2-3
[unfold.git] / plugins / debug_platform / __init__.py
1 from unfold.plugin       import Plugin
2 from unfold.page         import Page
3 from plugins.code_editor import CodeEditor
4 from plugins.hazelnut    import Hazelnut
5
6 class DebugPlatform(Plugin):
7
8     def template_file(self):
9         return "debug_platform.html"
10
11     def requirements (self):
12         reqs = {
13             'js_files' : [
14                 'js/debug_platform.js',
15             ] ,
16             'css_files': [
17                 'css/debug_platform.css',
18             ]
19         }
20         return reqs
21
22     def json_settings_list (self):
23         return ['plugin_uuid', 'domid']
24
25     def export_json_settings (self):
26         return True
27
28     def template_env (self, request):
29         # This part should be moved to a Layout
30         env = {}
31         env['topleft'] = CodeEditor(page=self.page, lineNumbers=True).render(request)
32         env['bottomleft'] = Hazelnut(page=self.page, columns=['dummy']).render(request)
33         return env
34