Modified the template editing setup
[biaweb_qt.git] / templates_dialog.py
1 # BiaWeb Website content manager (c) 2010 V.Harishankar
2 # Templates dialog class
3
4 import PyQt4
5 import ui_templates_dialog
6 import biaweb_db
7
8 class TemplatesDialog (PyQt4.QtGui.QDialog, ui_templates_dialog.Ui_TemplatesDialog):
9 def __init__ (self, master, currentdb):
10 PyQt4.QtGui.QDialog.__init__ (self, master)
11 self.setupUi (self)
12
13 # set the current database
14 self.current_db = currentdb
15
16 # populate the templates
17 tpls = biaweb_db.get_templates (self.current_db)
18 for tpl_name, tpl_content in tpls:
19 self.templates.addItem (str (tpl_name))