source: products/qtheme.template/trunk/qthemetemplate/qplone3_theme.py @ 156

Last change on this file since 156 was 156, checked in by mylan, 14 years ago

Renamed all prefs_qpc* to prefs_comments*.
Added DiscussionManager? role to portal on installation.
Corrected appropriate tests.

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1import os
2import copy
3import datetime
4
5from zopeskel.plone3_theme import Plone3Theme
6from zopeskel.base import get_var
7from zopeskel.base import var
8
9class qPlone3Theme(Plone3Theme):
10    _template_dir = 'templates/qplone3_theme'
11    summary = "A Quinta Group Theme for Plone 3.0 with nested namespace"
12    required_templates = ['plone_app']
13    use_cheetah = True
14    use_local_commands = True
15
16    vars = copy.deepcopy(Plone3Theme.vars)
17    get_var(vars, 'namespace_package').default = 'quintagroup'
18    get_var(vars, 'namespace_package').description = 'Namespace package (like quintagroup)'
19    get_var(vars, 'author').default = 'Quintagroup'
20    get_var(vars, 'author_email').default = 'skins.develop.group@quintagroup.com'
21    get_var(vars, 'keywords').default = get_var(vars, 'keywords').default + ' quintagroup'
22    get_var(vars, 'url').default = 'http://svn.quintagroup.com/skins'
23    get_var(vars, 'package').default = 'example'
24    get_var(vars, 'description').default = 'An installable Quintagroup theme for Plone 3'
25    get_var(vars, 'version').default = '0.1'
26    vars.insert(1, var('namespace_package2',
27                        'Nested namespace package (like theme)',
28                        default='theme'))
29
30    def pre(self, command, output_dir, vars):
31        vars['timestamp'] = datetime.date.today().strftime("%Y%m%d")
32        super(qPlone3Theme, self).pre(command, output_dir, vars)
33
34    def post(self, command, output_dir, vars):
35        np2, np = vars['namespace_package2'], vars['namespace_package']
36        p = vars['package']
37        sdir = os.path.join(output_dir, np, np2, p, 'skins')
38
39        # Prevent overriding passed config file
40        # Result config will be written to same
41        # name file with '.result' postfix
42        if command.options.config:
43            command.options.config += '.result'
Note: See TracBrowser for help on using the repository browser.