'Overrides :meth:`pyramid.scaffolds.template.Template.pre`, adding
several variables to the default variables list (including
``random_string``, and ``package_logger``).  It also prevents common
misnamings (such as naming a package "site" or naming a package
logger "root".'

def pre(self, command, output_dir, vars):

    vars['random_string'] = native_(binascii.hexlify(os.urandom(20)))
    package_logger = vars['package']
    if (package_logger == 'root'):
        package_logger = 'app'
    vars['package_logger'] = package_logger
    return Template.pre(self, command, output_dir, vars)
