Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- The
alchemy
scaffold has been removed.
- The ``routesalchemy`` scaffold has been renamed ``alchemy``.
- Loading branch information
Showing
38 changed files
with
69 additions
and
662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 9 additions & 10 deletions
19
pyramid/scaffolds/alchemy/+package+/__init__.py_tmpl
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
from pyramid.config import Configurator | ||
from sqlalchemy import engine_from_config | ||
|
||
from {{package}}.models import appmaker | ||
from {{package}}.models import initialize_sql | ||
|
||
def main(global_config, **settings): | ||
""" This function returns a WSGI application. | ||
""" This function returns a Pyramid WSGI application. | ||
""" | ||
engine = engine_from_config(settings, 'sqlalchemy.') | ||
get_root = appmaker(engine) | ||
config = Configurator(settings=settings, root_factory=get_root) | ||
initialize_sql(engine) | ||
config = Configurator(settings=settings) | ||
config.add_static_view('static', '{{package}}:static', cache_max_age=3600) | ||
config.add_view('{{package}}.views.view_root', | ||
context='{{package}}.models.MyRoot', | ||
renderer="templates/root.pt") | ||
config.add_view('{{package}}.views.view_model', | ||
context='{{package}}.models.MyModel', | ||
renderer="templates/model.pt") | ||
config.add_route('home', '/') | ||
config.add_view('{{package}}.views.my_view', | ||
route_name='home', | ||
renderer='templates/mytemplate.pt') | ||
return config.make_wsgi_app() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 0 additions & 82 deletions
82
pyramid/scaffolds/alchemy/+package+/templates/model.pt_tmpl
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.