1 """TurboGears Front-to-Back Web Framework"""
2
3 __all__ = ['absolute_url', 'database', 'command', 'config',
4 'controllers', 'expose', 'flash', 'error_handler',
5 'exception_handler', 'mochikit', 'redirect',
6 'scheduler', 'start_server', 'update_config',
7 'url', 'validate', 'validators', 'view', 'widgets']
8
9 import warnings
10
11 import pkg_resources
12
13 from turbogears.release import (version as __version__, author as __author__,
14 email as __email__, license as __license__, copyright as __copyright__)
15 from turbogears.config import update_config
16 from turbogears.controllers import (absolute_url, expose, flash, validate,
17 redirect, error_handler, exception_handler, url)
18 from turbogears.paginate import paginate
19 from turbogears.widgets import mochikit, jsi18nwidget
20 from turbogears.startup import start_server
21 from turbogears import (config, controllers, view, database, validators,
22 command, i18n, widgets, startup, scheduler)
23
24
25
26 extensions = pkg_resources.iter_entry_points('turbogears.extensions')
27 for entrypoint in extensions:
28 try:
29 extension = entrypoint.load()
30 if hasattr(extension, 'tgsymbols'):
31 globals().update(extension.tgsymbols())
32 except Exception, exception:
33 warnings.warn("Could not load extension %s from %s: %s"
34 % (entrypoint, entrypoint.dist, exception), stacklevel=2)
35
36 i18n.install()
37