Back to index

plone3  3.1.7
config.py
Go to the documentation of this file.
00001 # -*- coding: utf-8 -*-
00002 #  ATContentTypes http://plone.org/products/atcontenttypes/
00003 #  Archetypes reimplementation of the CMF core types
00004 #  Copyright (c) 2003-2006 AT Content Types development team
00005 #
00006 #  This program is free software; you can redistribute it and/or modify
00007 #  it under the terms of the GNU General Public License as published by
00008 #  the Free Software Foundation; either version 2 of the License, or
00009 #  (at your option) any later version.
00010 #
00011 #  This program is distributed in the hope that it will be useful,
00012 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 #  GNU General Public License for more details.
00015 #
00016 #  You should have received a copy of the GNU General Public License
00017 #  along with this program; if not, write to the Free Software
00018 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 #
00020 """AT Content Types configuration file
00021 
00022 DO NOT CHANGE THIS FILE!
00023 
00024 Use ZConfig to configure ATCT
00025 """
00026 __docformat__ = 'restructuredtext'
00027 
00028 import string
00029 import os
00030 from Products.ATContentTypes.configuration import zconf
00031 
00032 ## options for mx tidy
00033 ## read http://www.egenix.com/files/python/mxTidy.html for more informations
00034 MX_TIDY_ENABLED = zconf.mxtidy.enable
00035 MX_TIDY_OPTIONS= zconf.mxtidy.options
00036 
00037 ###############################################################################
00038 ## private options
00039 
00040 PROJECTNAME = "ATContentTypes"
00041 TOOLNAME = "portal_atct"
00042 SKINS_DIR = 'skins'
00043 
00044 ATCT_DIR = os.path.abspath(os.path.dirname(__file__))
00045 WWW_DIR = os.path.join(ATCT_DIR, 'www')
00046 
00047 GLOBALS = globals()
00048 
00049 ## swallow PIL exceptions when resizing the image?
00050 SWALLOW_IMAGE_RESIZE_EXCEPTIONS = zconf.swallowImageResizeExceptions.enable
00051 
00052 ## mxTidy available?
00053 try:
00054     from mx import Tidy
00055 except ImportError:
00056     HAS_MX_TIDY = False
00057 else:
00058     HAS_MX_TIDY = True
00059     try:
00060         del Tidy
00061     except AttributeError:
00062         pass
00063 
00064 ## tidy only these document types
00065 MX_TIDY_MIMETYPES = (
00066     'text/html',
00067      )
00068 
00069 ## ExternalStorage available?
00070 try:
00071     from Products.ExternalStorage.ExternalStorage import ExternalStorage
00072 except ImportError:
00073     HAS_EXT_STORAGE = False
00074 else:
00075     HAS_EXT_STORAGE = True
00076     del ExternalStorage
00077 
00078 ## LinguaPlone addon?
00079 try:
00080     from Products.LinguaPlone.public import registerType
00081 except ImportError:
00082     HAS_LINGUA_PLONE = False
00083 else:
00084     HAS_LINGUA_PLONE = True
00085     del registerType
00086 
00087 try:
00088     from PIL import Image
00089 except ImportError:
00090     HAS_PIL = False
00091 else:
00092     HAS_PIL = True
00093 
00094 
00095 ## workflow mapping for the installer
00096 WORKFLOW_DEFAULT  = '(Default)'
00097 WORKFLOW_FOLDER   = 'folder_workflow'
00098 WORKFLOW_TOPIC    = 'folder_workflow'
00099 WORKFLOW_CRITERIA = ''
00100 
00101 ## icon map used for overwriting ATFile icons
00102 ICONMAP = {'application/pdf' : 'pdf_icon.gif',
00103            'image'           : 'image_icon.gif'}
00104 
00105 MIME_ALIAS = {
00106     'plain' : 'text/plain',
00107     'stx'   : 'text/structured',
00108     'html'  : 'text/html',
00109     'rest'  : 'text/x-rst',
00110     'text/stx' : 'text/structured',
00111     'structured-text' : 'text/structured',
00112     'restructuredtext' : 'text/x-rst',
00113     'text/restructured' : 'text/x-rst',
00114     }