"""
    DataGridField quick install script
            
    Copyright 2006 DataGridField authors
    
"""

__author__  = 'Mikko Ohtamaa <mikko@redinnovation.com>'
__docformat__ = 'restructuredtext'

# Python imports
import StringIO
from cStringIO import StringIO
import string

from Products.CMFCore.DirectoryView import addDirectoryViews
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.permissions import ManagePortal
from Products.Archetypes.Extensions.utils import installTypes, install_subskin
from Products.Archetypes import listTypes

# Installer helpers
from Products.DataGridField.Extensions import utils

# Config
from Products.DataGridField.config import *

def install(self):
    out=StringIO()
    install_subskin(self, out, GLOBALS)

    classes = listTypes(PKG_NAME)
    if INSTALL_DEMO_TYPES:
        installTypes(self, out, classes, PKG_NAME)
                 
    out.write('Installation completed.\n')
    return out.getvalue()

def uninstall(self):
    out=StringIO()
    return out.getvalue()

