Generic Setup De-Mystified

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    Generic Setup De-Mystified - Presentation Transcript

    1. GenericSetup De-mystified Clayton Parker Plone Symposium East 2009 nowhere to go but open source s ix fe e tup . co m / i mm e rs e
    2. Who am I? • Lead Developer at Six Feet Up, Inc. • claytron on IRC s ixf eet up. c om/ i mme r se
    3. What’s in store? • The what and why of GenericSetup • Importing and exporting • Best practices • portal_setup vs. portal_quickinstaller s ixf eet up. c om/ i mme r se
    4. What? • portal_quickinstaller replacement • CustomizationPolicy replacement • Site configuration • Upgrades s ixf eet up. c om/ i mme r se
    5. Why? “Persistence means always having to say you’re sorry” - Seaver’s Law s ixf eet up. c om/ i mme r se
    6. Install.py == sadness s ixf eet up. c om/ i mme r se
    7. GenericSetup Profiles • Base profile • Extension profile s ixf eet up. c om/ i mme r se
    8. What’s in a profile? <genericsetup:registerProfile name=\"default\" title=\"My Package\" directory=\"profiles/default\" description=\"My Package install profile\" provides=\"Products.GenericSetup.interfaces.EXTENSION\" /> • profile-<package_name>:<profile_name> • profile-my.package:default • my.package:default s ixf eet up. c om/ i mme r se
    9. On the filesystem my.package/my/package/ | |- configure.zcml |- exportimport/ | |- profiles/ | | | |- default/ | | | |- metadata.xml | |- my.package-default.txt | |- <other profile files> | |- setuphandlers.py |- upgrades.py s ixf eet up. c om/ i mme r se
    10. s ixf eet up. c om/ i mme r se
    11. s ixf eet up. c om/ i mme r se
    12. s ixf eet up. c om/ i mme r se
    13. s ixf eet up. c om/ i mme r se
    14. s ixf eet up. c om/ i mme r se
    15. metadata.xml <?xml version=\"1.0\"?> <metadata> <version>1.0</version> <dependencies> <dependency>profile-my.theme:default</dependency> <dependency>profile-my.other.package:default</dependency> </dependencies> </metadata> s ixf eet up. c om/ i mme r se
    16. s ixf eet up. c om/ i mme r se
    17. Careful with that axe, Eugene... s ixf eet up. c om/ i mme r se
    18. s ixf eet up. c om/ i mme r se
    19. Tell me more • Profile for initial site setup • Upgrade steps s ixf eet up. c om/ i mme r se
    20. Upgrade steps <genericsetup:upgradeStep title=\"Setup calendar\" description=\"Modify the calendar settings\" source=\"0.9\" destination=\"1.0\" handler=\".upgrades.setupCalendar\" sortkey=\"10\" profile=\"my.package:default\" /> s ixf eet up. c om/ i mme r se
    21. Upgrade steps from Products.CMFCore.utils import getToolByName def setupCalendar(context): ctool = getToolByName(context, 'portal_calendar') cal_types = list(ctool.calendar_types) if 'MyEventType' not in cal_types: cal_types.append('MyEventType') ctool.calendar_types = cal_types s ixf eet up. c om/ i mme r se
    22. Best Practices • Uninstall profiles • Trim the export • Be aware of other profiles s ixf eet up. c om/ i mme r se
    23. <property name=\"metaTypesNotToList\" type=\"lines\"> <element value=\"ATBooleanCriterion\"/> <element value=\"ATDateCriteria\"/> <element value=\"ATDateRangeCriterion\"/> <element value=\"ATListCriterion\"/> ... </property> <property name=\"metaTypesNotToList\" type=\"lines\" purge=\"False\"> <element value=\"Image\"/> <element value=\"File\"/> </property> s ixf eet up. c om/ i mme r se
    24. portal_setup vs. portal_quickinstaller s ixf eet up. c om/ i mme r se
    25. def install(portal): \"\"\"Run the GS profile to install this package\"\"\" out = StringIO() runProfile(portal, 'profile-my.package:default') print >>out, \"Installed my.package\" return out.getvalue() def uninstall(portal, reinstall=False): \"\"\"Run the GS profile to install this package\"\"\" out = StringIO() if not reinstall: runProfile(portal, 'profile-my.package:uninstall') print >>out, \"Uninstalled my.package\" return out.getvalue() s ixf eet up. c om/ i mme r se
    26. Make me a Zope 2 style product <five:registerPackage package=\".\" initialize=\".initialize\"/> s ixf eet up. c om/ i mme r se
    27. What did we learn? • The what and why of GenericSetup • Importing and exporting • Best practices • portal_setup vs. portal_quickinstaller s ixf eet up. c om/ i mme r se
    28. Links • http://www.sixfeetup.com/swag/generic-setup-quick-reference-card • http://plone.org/documentation/manual/generic-setup/ s ixf eet up. c om/ i mme r se
    29. Learn Plone by building a website from A to Z 1 non-profit project • 10 workshops • 14 mentors • 3 days s ixf eetup. com/im merse Register by June 30th and save $255!

    + Clayton ParkerClayton Parker, 6 months ago

    custom

    418 views, 2 favs, 0 embeds more stats

    A talk focusing on the GenericSetup tool and it's u more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 418
      • 418 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 2
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories