source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/form.py @ 4315

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/form.py@4315
Revision 4315, 763 bytes checked in by cbyrom, 13 years ago (diff)

Add new template and controller code for adding and editing parameters +
fix data entities so they can properly associate granules and deployments with
them + add new form module to handle all the form validations and implement
basics for the create atom form.

Line 
1from formencode import Schema, validators, Invalid
2import logging
3
4class AtomFormSchema(Schema):
5    def __init__(self):
6        logging.debug("Setting up AtomFormSchema")
7       
8    filter_extra_fields = True
9    allow_extra_fields = True
10    #subtype = validators.UnicodeString(not_empty=True)#URL(not_empty=True, add_http=True, check_exists=False)
11    title = validators.UnicodeString(not_empty=True)
12
13class CreateAtomFormSchema(Schema):
14    def __init__(self):
15        logging.debug("Setting up CreateAtomFormSchema")
16       
17    filter_extra_fields = True
18    allow_extra_fields = True
19    title = validators.UnicodeString(not_empty=True)
20    providerID = validators.UnicodeString(not_empty=True)
21    atomTypeID = validators.UnicodeString(not_empty=True)
Note: See TracBrowser for help on using the repository browser.