Mercurial > piecrust2
comparison foodtruck/views/sources.py @ 610:efc1dc916e7c
admin: Configuration changes.
* Move publish targets to site configuration.
* Add direct accessor for the current site.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 28 Jan 2016 22:17:58 -0800 |
parents | 2713b54b5d76 |
children | c1a94e1beb9d |
comparison
equal
deleted
inserted
replaced
609:978d8bca9fb3 | 610:efc1dc916e7c |
---|---|
8 | 8 |
9 @app.route('/list/<source_name>/', defaults={'page_num': 1}) | 9 @app.route('/list/<source_name>/', defaults={'page_num': 1}) |
10 @app.route('/list/<source_name>/<int:page_num>') | 10 @app.route('/list/<source_name>/<int:page_num>') |
11 @login_required | 11 @login_required |
12 def list_source(source_name, page_num): | 12 def list_source(source_name, page_num): |
13 site = g.sites.get().piecrust_app | 13 site = g.site.piecrust_app |
14 source = site.getSource(source_name) | 14 source = site.getSource(source_name) |
15 if source is None: | 15 if source is None: |
16 abort(400) | 16 abort(400) |
17 | 17 |
18 i = 0 | 18 i = 0 |