Changeset 5061:52bd0c25fb31
- Timestamp:
- 06/19/07 08:57:35 (6 years ago)
- Branch:
- default
- Location:
- sage/server/notebook
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sage/server/notebook/conf.py
r5059 r5061 24 24 self.confs[key] = value 25 25 26 def html_conf_form(self, action): 27 D = self.defaults() 28 C = self.confs 29 K = list(set(self.confs.keys() + D.keys())) 30 K.sort() 31 options = '' 32 for key in K: 33 options += '<tr><td>%s</td><td><input type="text" name="%s" value="%s"></td></tr>\n'%(key, key, self[key]) 34 s = """ 35 <form method="post" action="%s" enctype="multipart/form-data"> 36 <input type="submit" value="Submit"> 37 <table border=0 cellpadding=5 cellspacing=2> 38 %s 39 </table> 40 </form> 41 """%(action, options) 42 return s -
sage/server/notebook/twist.py
r5060 r5061 621 621 622 622 623 class NotebookConf(Worksheets): 624 def render(self, ctx): 625 s = '<html>' + notebook.conf().html_conf_form('submit') + '</html>' 626 return http.Response(stream = s) 627 628 623 629 624 630 ############################ … … 884 890 class AdminToplevel(UserToplevel): 885 891 child_home = WorksheetsAdmin() 892 child_conf = NotebookConf() 886 893 887 894 def render(self, ctx):
Note: See TracChangeset
for help on using the changeset viewer.
