12345678910111213141516171819202122 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- """
- demeter web page
- name:origin.py
- author:rabin
- """
- from __load__ import *
- class index_path(Load):
- @Web.setting
- def get(self):
- id = self.input('id')
- if not id:
- self.out('error')
- return
- self.data['info'] = self.service('common').one('web_article', id=id)
- self.data['category'] = self.service('common').list('web_help_category')
- if self.data['category']:
- for key, value in enumerate(self.data['category']):
- self.data['category'][key]['link'] = '/help?category=' + str(value['id'])
- self.view("detail.html")
|