Back to index

plone3  3.1.7
Classes | Functions | Variables
ATContentTypes.content.base Namespace Reference

Classes

class  ATCTMixin
class  ATCTContent
class  ATCTFileContent
class  ATCTFolder
class  ATCTFolderMixin
class  ATCTOrderedFolder
class  ATCTBTreeFolder

Functions

def registerATCT
def cleanupFilename
def translateMimetypeAlias

Variables

string __author__ = 'Christian Heimes <tiran@cheimes.de>'
string __docformat__ = 'restructuredtext'
 DEBUG = True
tuple LOG = logging.getLogger('ATCT')
tuple __all__

Function Documentation

def ATContentTypes.content.base.cleanupFilename (   filename,
  request = None 
)
Removes bad chars from file names to make them a good id

Definition at line 84 of file base.py.

00084 
00085 def cleanupFilename(filename, request=None):
00086     """Removes bad chars from file names to make them a good id
00087     """
00088     if not filename:
00089         return
00090     if request is not None:
00091         return IUserPreferredFileNameNormalizer(request).normalize(filename)
00092     return None

Here is the call graph for this function:

Here is the caller graph for this function:

def ATContentTypes.content.base.registerATCT (   class_,
  project 
)
Registers an ATContentTypes based type

One reason to use it is to hide the lingua plone related magic.

Definition at line 76 of file base.py.

00076 
00077 def registerATCT(class_, project):
00078     """Registers an ATContentTypes based type
00079 
00080     One reason to use it is to hide the lingua plone related magic.
00081     """
00082     assert IATContentType.isImplementedByInstancesOf(class_)
00083     registerType(class_, project)

Here is the call graph for this function:

Here is the caller graph for this function:

Maps old CMF content types to real mime types

Definition at line 93 of file base.py.

00093 
00094 def translateMimetypeAlias(alias):
00095     """Maps old CMF content types to real mime types
00096     """
00097     if alias.find('/') != -1:
00098         mime = alias
00099     else:
00100         mime = MIME_ALIAS.get(alias, None)
00101     assert(mime) # shouldn't be empty
00102     return mime
00103 

Here is the caller graph for this function:


Variable Documentation

Initial value:
00001 ('ATCTContent', 'ATCTFolder', 'ATCTOrderedFolder',
00002            'ATCTBTreeFolder' )

Definition at line 573 of file base.py.

string ATContentTypes.content.base.__author__ = 'Christian Heimes <tiran@cheimes.de>'

Definition at line 22 of file base.py.

string ATContentTypes.content.base.__docformat__ = 'restructuredtext'

Definition at line 23 of file base.py.

Definition at line 73 of file base.py.

tuple ATContentTypes.content.base.LOG = logging.getLogger('ATCT')

Definition at line 74 of file base.py.