| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import json
- from flask import Blueprint, render_template, url_for, request
- import requests
- __author__ = 'James Iter'
- __date__ = '2018/2/5'
- __contact__ = 'james.iter.cn@gmail.com'
- __copyright__ = '(c) 2018 by James Iter.'
- blueprint = Blueprint(
- 'v_os_template_image',
- __name__,
- url_prefix='/os_template_image'
- )
- blueprints = Blueprint(
- 'v_os_templates_image',
- __name__,
- url_prefix='/os_templates_image'
- )
- def show():
- url = url_for('api_os_templates_image.r_show', _external=True)
- if request.args.__len__() >= 1:
- args = list()
- for k, v in request.args.items():
- args.append('='.join([k, v]))
- url += '?' + '&'.join(args)
- ret = requests.get(url=url, cookies=request.cookies)
- ret = json.loads(ret.content)
- return render_template('os_templates_image_show.html', os_templates_image=ret['data']['os_templates_image'],
- os_templates_profile_mapping_by_id=ret['data']['os_templates_profile_mapping_by_id'],
- page=ret['data']['page'], page_size=ret['data']['page_size'], keyword=ret['data']['keyword'],
- pages=ret['data']['pages'], order_by=ret['data']['order_by'], order=ret['data']['order'],
- last_page=ret['data']['last_page'], public_count=ret['data']['public_count'],
- custom_count=ret['data']['custom_count'])
|