diff options
| author | Michael R <goodwillcoding@webhippo.net> | 2014-04-16 17:00:14 -0400 |
|---|---|---|
| committer | Michael R <goodwillcoding@webhippo.net> | 2014-04-16 17:00:14 -0400 |
| commit | 23b5311878af64244d7a11de93fe2c8a39e46664 (patch) | |
| tree | 4e1d02eb0f122cd259d525862a49f798b15358bf | |
| parent | 0eff6638d2470f77bd444941cb8261d91c236591 (diff) | |
| download | pyramid-23b5311878af64244d7a11de93fe2c8a39e46664.tar.gz pyramid-23b5311878af64244d7a11de93fe2c8a39e46664.tar.bz2 pyramid-23b5311878af64244d7a11de93fe2c8a39e46664.zip | |
update the alchemy template to use pyramid version and doc version
| -rw-r--r-- | pyramid/scaffolds/alchemy/+package+/templates/mytemplate.pt_tmpl | 4 | ||||
| -rw-r--r-- | pyramid/scaffolds/alchemy/+package+/views.py_tmpl | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/pyramid/scaffolds/alchemy/+package+/templates/mytemplate.pt_tmpl b/pyramid/scaffolds/alchemy/+package+/templates/mytemplate.pt_tmpl index 76451f9b5..5f860da26 100644 --- a/pyramid/scaffolds/alchemy/+package+/templates/mytemplate.pt_tmpl +++ b/pyramid/scaffolds/alchemy/+package+/templates/mytemplate.pt_tmpl @@ -41,8 +41,8 @@ <div class="row"> <div class="links"> <ul> - <li class="current-version">Currently v1.5</li> - <li><i class="glyphicon glyphicon-bookmark icon-muted"></i><a href="http://docs.pylonsproject.org">Docs</a></li> + <li class="current-version">Currently v${pyramid_version}</li> + <li><i class="glyphicon glyphicon-bookmark icon-muted"></i><a href="http://docs.pylonsproject.org/projects/pyramid/en/${pyramid_docs_branch}/">Docs</a></li> <li><i class="glyphicon glyphicon-cog icon-muted"></i><a href="https://github.com/Pylons/pyramid">Github Project</a></li> <li><i class="glyphicon glyphicon-globe icon-muted"></i><a href="irc://irc.freenode.net#pyramid">IRC Channel</a></li> <li><i class="glyphicon glyphicon-home icon-muted"></i><a href="http://pylonsproject.org">Pylons Project</a></li> diff --git a/pyramid/scaffolds/alchemy/+package+/views.py_tmpl b/pyramid/scaffolds/alchemy/+package+/views.py_tmpl index be0b45b0d..15e695d94 100644 --- a/pyramid/scaffolds/alchemy/+package+/views.py_tmpl +++ b/pyramid/scaffolds/alchemy/+package+/views.py_tmpl @@ -15,14 +15,19 @@ def my_view(request): one = DBSession.query(MyModel).filter(MyModel.name == 'one').first() except DBAPIError: return Response(conn_err_msg, content_type='text/plain', status_int=500) - return {'one': one, 'project': '{{project}}'} + return { + 'one': one, + 'project': '{{project}}', + 'pyramid_version': '{{pyramid_version}}', + 'pyramid_docs_branch': '{{pyramid_docs_branch}}'} + conn_err_msg = """\ Pyramid is having a problem using your SQL database. The problem might be caused by one of the following things: 1. You may need to run the "initialize_{{project}}_db" script - to initialize your database tables. Check your virtual + to initialize your database tables. Check your virtual environment's "bin" directory for this script and try to run it. 2. Your database server may not be running. Check that the |
