diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index d398a9f..6387e8f 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -18,8 +18,7 @@ try: except ModuleNotFoundError: pass - wiki_path = Path(MOIN_PATH) / module_name if wiki_path.exists(): print('ERROR: wiki %s already exists!' % module_name) - sys.exit(1) + sys.exit(3) diff --git a/{{cookiecutter.directory_name}}/{{cookiecutter.directory_name}}.py b/{{cookiecutter.directory_name}}/{{cookiecutter.directory_name}}.py new file mode 100644 index 0000000..7a5f64b --- /dev/null +++ b/{{cookiecutter.directory_name}}/{{cookiecutter.directory_name}}.py @@ -0,0 +1,37 @@ +# -*- coding: iso-8859-1 -*- +# IMPORTANT! This encoding (charset) setting MUST be correct! If you live in a +# western country and you don't know that you use utf-8, you probably want to +# use iso-8859-1 (or some other iso charset). If you use utf-8 (a Unicode +# encoding) you MUST use: coding: utf-8 +# That setting must match the encoding your editor uses when you modify the +# settings below. If it does not, special non-ASCII chars will be wrong. + +""" +This is a sample config for a wiki that is part of a wiki farm and uses +farmconfig for common stuff. Here we define what has to be different from +the farm's common settings. +""" + +# we import the FarmConfig class for common defaults of our wikis: +from farmconfig import FarmConfig + +# now we subclass that config (inherit from it) and change what's different: +class Config(FarmConfig): + + # basic options (you normally need to change these) + sitename = u'{{cookiecutter.directory_name}}' # [Unicode] + interwikiname = '{{cookiecutter.directory_name}}' + + # name of entry page / front page [Unicode], choose one of those: + page_front_page = u"FrontPage" + + data_dir = '/var/www/moin/wikis/{{cookiecutter.directory_name}}/data/' + + acl_rights_before = u"HolgerFrey:read,write,delete,revert,admin OswaldPrucker:read,write,delete,revert,admin" + + acl_rights_default = u"{{cookiecutter.wiki_name}}Group:read,write,delete,revert All:" + + logo_string = u'Logo' + + # style the "today" calendar cell + html_head = u''