source: products/QGSkel/trunk/qgskel/qgplone3_buildout.py @ 1126

Last change on this file since 1126 was 1126, checked in by chervol, 15 years ago

added paster template registration and initial controller

  • Property svn:eol-style set to native
File size: 2.0 KB
Line 
1from zopeskel.base import BaseTemplate
2from zopeskel.base import var
3
4class Plone3Buildout(BaseTemplate):
5    _template_dir = 'templates/plone3_buildout'
6    summary = "A buildout for Plone 3 projects"
7    required_templates = []
8    use_cheetah = True
9
10    vars = [
11        var('plone_version',
12            "Which Plone version to install",
13            default="3.2.2"),
14        var('zope2_install',
15            'Path to Zope 2 installation; leave blank to fetch one',
16            default=''),
17        var('plone_products_install',
18            'Path to directory containing Plone products; leave blank to fetch one',
19            default=''),
20        var('zope_user',
21            'Zope root admin user',
22            default='admin'),
23        var('zope_password',
24            'Zope root admin password'),
25        var('http_port',
26            'HTTP port',
27            default=8080),
28        var('debug_mode',
29            'Should debug mode be "on" or "off"?',
30            default='off'),
31        var('verbose_security',
32            'Should verbose security be "on" or "off"?',
33            default='off'),
34        ]
35
36    def pre(self, command, output_dir, vars):
37        vars['oldplone'] = vars['plone_version'].startswith("3.0") or \
38                            vars['plone_version'].startswith("3.1")
39        vars['veryoldplone'] = vars['plone_version'].startswith("2.")
40        if vars['veryoldplone']:
41            vars['zope2_version'] = "2.9.10"
42        vars['newplone'] = not vars['veryoldplone'] and not vars['oldplone']
43        super(Plone3Buildout, self).pre(command, output_dir, vars)
44   
45    def post(self, command, output_dir, vars):
46        print "-----------------------------------------------------------"
47        print "Generation finished"
48        print "You probably want to run python bootstrap.py and then edit"
49        print "buildout.cfg before running bin/buildout -v"
50        print
51        print "See README.txt for details"
52        print "-----------------------------------------------------------"
53
54
55
Note: See TracBrowser for help on using the repository browser.