|
@@ -7,7 +7,7 @@ collections_app = Blueprint('collections', __name__)
|
|
|
|
|
|
@collections_app.route('/backstage/collections')
|
|
|
def collection_list():
|
|
|
- collections = requests.get('http://127.0.0.1:5000/api/contents?url=/collection')
|
|
|
- if collections.status_code == 200:
|
|
|
+ response = requests.get('http://127.0.0.1:5000/api/contents?url=/collection')
|
|
|
+ if response.status_code == 200:
|
|
|
return render_template(
|
|
|
- 'collections.html', title='家具規劃作品', legend='家具規劃作品列表', collections=collections.json())
|
|
|
+ 'collections.html', title='家具規劃作品', legend='家具規劃作品列表', collections=response.json(), length=len(response.json()))
|