~yeliabmas/sloecode/sloecode-template

« back to all changes in this revision

Viewing changes to sloecode/model/template.py

  • Committer: Sam Bailey
  • Date: 2012-10-30 03:41:50 UTC
  • Revision ID: yeliabmas@gmail.com-20121030034150-o554fsbpuucn7p7i
newfile button on wiki pages now creates a new file at the current directory level. Only provides template options at root directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
 
74
74
 
75
75
class NewFileSchema(formencode.Schema):
76
 
    """A formencode schema for the Project object."""
 
76
    """A formencode schema for a plain newfile."""
 
77
 
 
78
    allow_extra_fields = True
 
79
    filter_extra_fields = False
 
80
 
 
81
    filename = formencode.validators.String(not_empty=True)
 
82
    description = formencode.validators.String()
 
83
    template_content = formencode.validators.String()
 
84
    path = formencode.validators.String(not_empty=True)
 
85
 
 
86
 
 
87
class NewFileTemplateSchema(formencode.Schema):
 
88
    """A formencode schema for a newfile with page template options."""
77
89
 
78
90
    allow_extra_fields = True
79
91
    filter_extra_fields = False
82
94
    description = formencode.validators.String()
83
95
    save_location = formencode.validators.String()
84
96
    template_content = formencode.validators.String()
 
97
    path = formencode.validators.String()