Files @ 9dd726706178
Branch filter:

Location: kallithea/rhodecode/lib/dbmigrate/migrate/versioning/templates/manage/pylons.py_tmpl

Bradley M. Kuhn
Complete copyright notices for web interface; change footer to link to them.

The original copyright notice found in the footer was not accurate as it
included only one of the many copyright holders in this project. This change
creates an "about" page, which currently contains just the copyright and
license information. It links to repository for additional potential copyright
holders not listed on the about page.

Unlisted contributors are mentioned in template comments.

Html links for Kallithea is fixed and we link to Conservancy.

Display of version information in the footer is improved.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys

from sqlalchemy import engine_from_config
from paste.deploy.loadwsgi import ConfigLoader

from migrate.versioning.shell import main
from {{ locals().pop('repository_name') }}.model import migrations


if '-c' in sys.argv:
    pos = sys.argv.index('-c')
    conf_path = sys.argv[pos + 1]
    del sys.argv[pos:pos + 2]
else:
    conf_path = 'development.ini'

{{py:
_vars = locals().copy()
del _vars['__template_name__']
defaults = ", ".join(["%s='%s'" % var for var in _vars.iteritems()])
}}

conf_dict = ConfigLoader(conf_path).parser._sections['app:main']

# migrate supports passing url as an existing Engine instance (since 0.6.0)
# usage: migrate -c path/to/config.ini COMMANDS
if __name__ == '__main__':
    main(url=engine_from_config(conf_dict), repository=migrations.__path__[0],{{ defaults }})