source: trunk/config.py @ 66

Revision 66, 1.3 KB checked in by tarmo, 14 years ago (diff)

Changed the svn:eol-style property to "native", since
people aren't using unix line feeds uniformally.

  • Property svn:eol-style set to native
Line 
1from Products.CMFCore import permissions
2from types import UnicodeType
3
4ADD_CONTENT_PERMISSION = permissions.AddPortalContent
5MANAGE_PORTAL = permissions.ManagePortal
6
7# Must match the folder in Products/ where this product is installed
8PROJECTNAME = "Toolbox"
9
10# Skin name that is used for registering our skin
11SKIN_NAME = PROJECTNAME
12# Subdirectory of this product folder which contains our skin folders
13SKINS_DIR = 'skins'
14# List of skin folders we have under SKINS_DIR
15SKIN_FOLDERS = ('toolbox',)
16# The skin from which to build our own skin
17BASE_SKIN = 'Plone Default'
18
19# Main sections of the site
20SECTIONS = ('Content','Activities','Tools','Community')
21
22SECTION_PROPERTIES = {
23    'Activities':
24    {'left_slots':('here/portlet_add_activity/macros/portlet',)},
25    'Tools':
26    {'left_slots':('here/portlet_add_tool/macros/portlet',)},
27    'Content':
28    {'left_slots': ('here/portlet_add_content/macros/portlet',)},
29}
30
31for section in SECTIONS:
32    if section not in SECTION_PROPERTIES.keys():
33        SECTION_PROPERTIES[section]={}
34
35GLOBALS = globals()
36
37def to_unicode(s,encoding='iso-8859-1'):
38    """Convenience method for converting strings to unicode."""
39    us=None
40    if not s:
41        us=u''
42    elif type(s)==UnicodeType:
43        us=s
44    else:
45        us=unicode(s,encoding)
46    return us.encode('utf-8')
Note: See TracBrowser for help on using the repository browser.