Skip to main content

UI and utility methods to generate sampledata for Plone projects

Project description

Why use this?

Standardized sampledata makes it soo much easier to work on a project (especially when working in teams).

This package eases the generation of sampledata for your plone project.

How to use it

For developers working on a project there’s a view listing and running all available sampledata plugins:

http://localhost/plone/@@sampledata

Screenshot of the @@sampledata with enabled example plugin

By default the view does not list any plugins. The screen above shows the example plugin activated via <include package="wm.sampledata.example" />.

Writing and registering your custom sampledata plugin is very easy:

class MyPlugin(object):
    implements(ISampleDataPlugin)

    title = u"My Plugin Content"
    description = u"Creates a portlet"

    def generate(self, context):
        portlet = StaticAssignment(u"Sample Portlet", "<p>some content</p>")
        addPortlet(context, 'plone.leftcolumn', portlet)

myPlugin = MyPlugin()
component.provideUtility(myPlugin,
                         ISampleDataPlugin
                         'my.plugin')

See wm.sampledata.example for a complete example of a custom plugin.

There is a growing set of utility methods in wm.sampledata.utils (eg for handling portlets and files) which you can use in your plugins.

Installation

Simply add wm.sampledata to your buildout’s instance eggs - a zcml slug is not needed in plone versions that ship with z3c.autoinclude (Plone>=3.3):

[buildout]
...
eggs =
    ...
    wm.sampledata

Why yet another package?

There are several other packages for generating test/sampledata but none of them fitted my usecase. (Which is providing a user interface for pluggable sampledata generators so developers/skinners can use standardized data when developing on a project)

A while ago i asked what other people do on plone.users

If you have any ideas for improvement or know another alternative to this package please drop me a mail

z3c.sampledata

Would do the same and much more (dependencies, groups, configuration ui for each plugin)

for me it was too complex to get it running on my zope2 instance and it seems to be tailored for zope3 anyway.

Basically it would be great to make wm.sampledata use z3c.sampledata and provide plone specific plugins for it.

ely.contentgenerator

provides a xml syntax to create samplecontent, might be useful to use in custom plugins

collective.contentgenerator

looks like this is meant for creating (random) sampledata for stresstests

Changelog

0.2 (2011-12-02)

0.1 (2011-01-31)

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wm.sampledata-0.2.zip (81.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page