Anonymous avatar Anonymous committed ea9903f

remove choosing template default

Comments (0)

Files changed (2)


 import tw2.core.validation as twv
 import formencode.validators as fv
 from c5t.core.lib.helpers import make_template_list
-from c5t.core.lib.helpers import make_parent_list,get_default_template
+from c5t.core.lib.helpers import make_parent_list
 import tw2.jqplugins.elrte as elrte
 class TemplateField(twf.widgets.InputField):
+    default_template_name = ''
     def prepare(self):
         self.template_list = make_template_list()
-        default_template = get_default_template()
-        if default_template:
-            self.default_template_name = str(default_template)
-        else:
-            self.default_template_name = ''
+        for item in self.template_list:
+            if '' in self.template_list[item]:
+                self.default_template_name = ''            
 class ParentField(twf.widgets.InputField):


     return all_tags
-def get_default_template():
-    template_page = [page for page in Page.query.find({'slug':'default_template'})]
-    if template_page:
-       return template_page[0].template
-    else:
-       return None
 def get_child_pages(allpages,page_ids,page_names,parent_pages,previous_page_id,indent):
     for a_page in allpages:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.