/withWebConf.py
Python | 30 lines | 17 code | 4 blank | 9 comment | 0 complexity | a823445523bf7be7827ce673c6872d27 MD5 | raw file
- # ('username', 'password', 'email'), can edit everything
- SuperUsers = [
- ('name', 'password', 'email')
- ,]
- # ('username', 'password'), can only edit what they create, and when explicitly listed in data
- Users = [
- ('name2', 'password2')
- ,('name3', 'password3')]
- # ('itemname', [(fieldName, type, {properties}),], ['users','who','have','these'], {'dict':'extra properties'}),
- # possible types: "Text", "LongText", "Photo", "MP3", "Checkbox", and "Dropdown"
- # for "Photo", you need 'imsize' : (int(width), int(height)), thumbsize : (int(width), int(height)) in the extra properties dict, this will set up scaling.
- # note MP3s use the xspf media player, if you search for the string "_INSERT_DOMAIN_HERE" in the resuling app_XXXX.py file, you should be able to figure out where to put the .swf file needed.
- # for "Dropdown" you need 'data' : [list,of,options] or [(key,value),] list
- DataMany = [
- ('item', [('property', 'Text', {'valid':'notnull'}),], ['name', 'name2'], {'sort' : "field2 DESC"})
- ,]
- # same as above, except only one can exist, and always does exist.
- DataSingle = [
- ('item2', [('property', 'LongText', {})], ['name', 'name2'], {})
- ,]
- # ('/path/to/url', 'name_of_page', [('item', 'where=clause', if autoiterating),]
- Urls = [
- ('/', 'index', [])
- ,('/items', 'items', [('item1', 'user="name2"', True),('item2', '', False)])
- ,('/other', 'other', [])
- ,]