├── app ├── core │ ├── __init__.py │ ├── home │ │ ├── forms.py │ │ ├── __init__.py │ │ ├── urls.py │ │ └── views.py │ ├── page │ │ ├── forms.py │ │ ├── __init__.py │ │ └── views.py │ ├── admin │ │ ├── __init__.py │ │ ├── forms.py │ │ └── views.py │ ├── module │ │ ├── forms.py │ │ ├── static │ │ │ ├── robots.txt │ │ │ ├── sitemap.xml.gz │ │ │ ├── sitemap.html │ │ │ ├── sitemap_baidu.xml │ │ │ └── sitemap.xml │ │ ├── __init__.py │ │ └── views.py │ ├── apiv1 │ │ ├── __init__.py │ │ ├── fields.py │ │ ├── views.py │ │ └── service.py │ ├── models.py │ ├── constants.py │ └── views.py ├── service │ ├── __init__.py │ └── BaseService.py ├── static │ ├── images │ │ ├── bg.png │ │ ├── jfs.jpg │ │ ├── logo.gif │ │ ├── img_012.gif │ │ ├── img_exit.gif │ │ ├── spot_cats.gif │ │ ├── web_logo.gif │ │ └── animated_favicon1.gif │ └── css │ │ ├── pagenavi-css.css │ │ └── style.css ├── templates │ ├── new │ │ ├── logo.gif │ │ ├── css │ │ │ └── style.css │ │ └── index.html │ ├── admin_template │ │ └── admin.html │ ├── test.jinja2 │ ├── commentbox.html │ ├── home │ │ ├── archive.jinja2 │ │ ├── category.jinja2 │ │ ├── tag.jinja2 │ │ ├── index.jinja2 │ │ └── post.jinja2 │ ├── comment.html │ ├── sidebar.html │ ├── tag.jinja2 │ ├── utils.html │ ├── index.jinja2 │ ├── post.jinja2 │ └── base.jinja2 └── __init__.py ├── logs └── make_git_happy ├── README.md ├── wsgi.py ├── .gitignore ├── config.py ├── requirements.txt ├── api_docs ├── PageDataFormat.md └── RESTful.raml └── manage.py /app/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/core/home/forms.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/core/page/forms.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/core/admin/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/core/module/forms.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/core/module/static/robots.txt: -------------------------------------------------------------------------------- 1 | hahah 2 | -------------------------------------------------------------------------------- /app/service/__init__.py: -------------------------------------------------------------------------------- 1 | from config import logger 2 | -------------------------------------------------------------------------------- /logs/make_git_happy: -------------------------------------------------------------------------------- 1 | no say.... 2 | say happy please.... 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wp2flask-cms 2 | A CMS engine written in Flask for tigang.net 3 | -------------------------------------------------------------------------------- /app/static/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HB6H057/wp2flask-cms/HEAD/app/static/images/bg.png -------------------------------------------------------------------------------- /app/static/images/jfs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HB6H057/wp2flask-cms/HEAD/app/static/images/jfs.jpg -------------------------------------------------------------------------------- /app/static/images/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HB6H057/wp2flask-cms/HEAD/app/static/images/logo.gif -------------------------------------------------------------------------------- /app/templates/new/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HB6H057/wp2flask-cms/HEAD/app/templates/new/logo.gif -------------------------------------------------------------------------------- /app/static/images/img_012.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HB6H057/wp2flask-cms/HEAD/app/static/images/img_012.gif -------------------------------------------------------------------------------- /app/static/images/img_exit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HB6H057/wp2flask-cms/HEAD/app/static/images/img_exit.gif -------------------------------------------------------------------------------- /app/static/images/spot_cats.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HB6H057/wp2flask-cms/HEAD/app/static/images/spot_cats.gif -------------------------------------------------------------------------------- /app/static/images/web_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HB6H057/wp2flask-cms/HEAD/app/static/images/web_logo.gif -------------------------------------------------------------------------------- /app/core/module/static/sitemap.xml.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HB6H057/wp2flask-cms/HEAD/app/core/module/static/sitemap.xml.gz -------------------------------------------------------------------------------- /app/core/page/__init__.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint 2 | 3 | page = Blueprint('page', __name__) 4 | 5 | from . import views 6 | -------------------------------------------------------------------------------- /app/core/home/__init__.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint 2 | 3 | home = Blueprint('home', __name__) 4 | 5 | from . import views, urls 6 | -------------------------------------------------------------------------------- /app/static/images/animated_favicon1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HB6H057/wp2flask-cms/HEAD/app/static/images/animated_favicon1.gif -------------------------------------------------------------------------------- /wsgi.py: -------------------------------------------------------------------------------- 1 | from app import create_app 2 | 3 | application = create_app() 4 | 5 | if __name__ == '__main__': 6 | application.run() 7 | -------------------------------------------------------------------------------- /app/templates/admin_template/admin.html: -------------------------------------------------------------------------------- 1 | {% extends 'admin/index.html' %} 2 | {% block body %} 3 |

主播去做早餐了。

4 | {% endblock %} 5 | -------------------------------------------------------------------------------- /app/core/apiv1/__init__.py: -------------------------------------------------------------------------------- 1 | from flask_restful import Api 2 | 3 | apiv1 = Api() 4 | 5 | from .views import Test, PostsApi 6 | 7 | apiv1.add_resource(Test, '/api/v1/test') 8 | apiv1.add_resource(PostsApi, '/api/v1/posts') 9 | -------------------------------------------------------------------------------- /app/core/module/__init__.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint 2 | 3 | module = Blueprint('module', __name__, 4 | static_folder='static', 5 | template_folder='templates',) 6 | 7 | from . import views 8 | -------------------------------------------------------------------------------- /app/templates/test.jinja2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ title }} 6 | 7 | 8 | this is a test Page :) 9 | 2016目标是早睡早起作息规律按时吃饭 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/core/admin/forms.py: -------------------------------------------------------------------------------- 1 | from wtforms import Form, BooleanField, TextField, PasswordField, validators 2 | from wtforms.ext.appengine.db import model_form 3 | 4 | from app.core.models import db, Post 5 | 6 | MyForm = model_form(Post, Form, exclude=('title', 'slug', 'tags', 'category', 'body', )) 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows: 2 | Thumbs.db 3 | ehthumbs.db 4 | Desktop.ini 5 | 6 | # Python: 7 | *.py[cod] 8 | *.so 9 | *.egg 10 | *.egg-info 11 | dist 12 | build 13 | 14 | # My configurations: 15 | db.ini 16 | deploy_key_rsa 17 | /*.db 18 | /db.py 19 | /db_repository/* 20 | /flask/* 21 | /env/* 22 | .idea/ 23 | /logs/*.log 24 | *.DS_Store 25 | *.project 26 | /migrations/* 27 | -------------------------------------------------------------------------------- /app/core/page/views.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | from . import page 4 | 5 | 6 | @page.route('/about', methods=['GET', 'POST']) 7 | def about(): 8 | """ 9 | about page 10 | """ 11 | return 'Yes, it really, really, really could happen' 12 | 13 | 14 | @page.route('/jiaofushu', methods=['GET', 'POST']) 15 | def jiaofushu(): 16 | """ 17 | jiaofushu page 18 | """ 19 | return 'All goes round again' 20 | -------------------------------------------------------------------------------- /app/core/module/views.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | from flask import send_from_directory, request 3 | 4 | from . import module 5 | 6 | 7 | @module.route('/sitemap.xml') 8 | @module.route('/robots.txt') 9 | @module.route('/sitemap_baidu.xml') 10 | @module.route('/sitemap.html') 11 | def robots_txt(): 12 | return send_from_directory(module.static_folder, request.path[1:]) 13 | 14 | 15 | @module.route('/sitemap.xml.gz') 16 | def sitemap_xml_gz(): 17 | return 'All goes round again' 18 | -------------------------------------------------------------------------------- /app/static/css/pagenavi-css.css: -------------------------------------------------------------------------------- 1 | /* 2 | Default style for WP-PageNavi plugin 3 | 4 | http://wordpress.org/extend/plugins/wp-pagenavi/ 5 | */ 6 | 7 | .wp-pagenavi { 8 | clear: both; 9 | } 10 | 11 | .wp-pagenavi a, .wp-pagenavi span { 12 | text-decoration: none; 13 | border: 1px solid #BFBFBF; 14 | padding: 3px 5px; 15 | margin: 2px; 16 | } 17 | 18 | .wp-pagenavi a:hover, .wp-pagenavi span.current { 19 | border-color: #000; 20 | } 21 | 22 | .wp-pagenavi span.current { 23 | font-weight: bold; 24 | } 25 | -------------------------------------------------------------------------------- /app/core/apiv1/fields.py: -------------------------------------------------------------------------------- 1 | # from flask_restful import fields 2 | # 3 | # post_base_fields = dict( 4 | # 'id'=fields.Integer, 5 | # 'title'=fields.String, 6 | # 'slug'=fields.String, 7 | # 'body'=fields.String, 8 | # 'timestamp'=fields.String( 9 | # attribute=lambda x: x.timestamp.strftime("%F %H:%M:%S") 10 | # ) 11 | # ) 12 | # 13 | # category_base_fields = dict( 14 | # 'id'=fields.Integer, 15 | # 'title'=fields.String, 16 | # 'slug'=fields.String, 17 | # 'body'=fields.String, 18 | # 'timestamp'=fields.String( 19 | # attribute=lambda x: x.timestamp.strftime("%F %H:%M:%S") 20 | # ) 21 | # ) 22 | -------------------------------------------------------------------------------- /app/templates/new/css/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | 6 | .header { 7 | /*background-image: url(http://image.golaravel.com/5/c9/44e1c4e50d55159c65da6a41bc07e.jpg);*/ 8 | background-color: white; 9 | height: 120px; 10 | border: solid 1px gainsboro; 11 | border-bottom: none; 12 | } 13 | .search-block{ 14 | display: inline; 15 | padding: 20px; 16 | } 17 | 18 | .cate-button{ 19 | } 20 | 21 | .navbar-header{ 22 | } 23 | 24 | .logo { 25 | background-image: url(http://i1.mb5u.com/img/logo.gif) ; 26 | height: 65px; 27 | width: 247px; 28 | margin-left: 5px; 29 | text-indent: -9999px; 30 | } 31 | 32 | .cate-navbar { 33 | font-size: 20px; 34 | text-align: center; 35 | } 36 | .test { 37 | border: solid 1px darkgray; 38 | } 39 | -------------------------------------------------------------------------------- /app/templates/commentbox.html: -------------------------------------------------------------------------------- 1 |
2 |

发表评论

3 |
4 |
5 |
6 |
7 |

*

8 |

* 绝不会泄露

9 |

10 |
11 |


12 |

13 | 14 |

15 |
16 |
17 | -------------------------------------------------------------------------------- /app/templates/home/archive.jinja2: -------------------------------------------------------------------------------- 1 | {% extends "base.jinja2"%} 2 | {% from 'utils.html' import render_pagination, render_plist %} 3 | {%block title%}高中复习提纲网-高一,高二,高三高中各科必修选修复习资料提纲聚集地{%endblock title%} 4 | {%block description%}高中复习提纲网是一个收集高中复习资料提纲的聚集地{%endblock description%} 5 | {%block keywords%}提纲,高中,复习,数学,语文,英语,物理,化学,生物,政治,地理,历史,重点,归纳{%endblock keywords%} 6 | {% block style %} 7 | 8 | {{ super() }} 9 | {% endblock style %} 10 | {% block content %} 11 |
12 | 13 | 16 | 17 | 18 |
19 | {{ render_plist(object_list.items) }} 20 | 21 | {{ render_pagination(object_list, 'home.archive', **filter_kwargs) }} 22 | 23 |
24 | 25 |
26 | {% include 'sidebar.html' %} 27 | {% endblock content %} 28 | -------------------------------------------------------------------------------- /app/templates/comment.html: -------------------------------------------------------------------------------- 1 | {% macro generate_comment(c, index) %} 2 |
  • 3 |
    4 | 5 |
    6 | 十月 13th, 2011 at 12:40 下午    7 | {{c.author}} 说: 8 |

    {{c.content}}

    9 |
  • 10 | {% endmacro %} 11 | 12 | 13 |

    已经有2个评论,你也说点什么吧

    14 |
      15 | {% for c in object.comments %} 16 | {{ generate_comment(c=c, index=loop.index) }} 17 | {% endfor %} 18 |
    19 | {% include 'commentbox.html' %} 20 | -------------------------------------------------------------------------------- /app/core/home/urls.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | from . import views, home 4 | 5 | index_view_func = views.IndexView.as_view('index') 6 | home.add_url_rule('/', view_func=index_view_func) 7 | 8 | category_view_func = views.CategoryView.as_view('category') 9 | home.add_url_rule('/category/', view_func=category_view_func) 10 | home.add_url_rule('/category//page/', view_func=category_view_func) 11 | 12 | tag_view_func = views.TagView.as_view('tag') 13 | home.add_url_rule('/tag/', view_func=tag_view_func) 14 | home.add_url_rule('/tag//page/', view_func=tag_view_func) 15 | 16 | post_view_func = views.PostView.as_view('post') 17 | home.add_url_rule('//.html', view_func=post_view_func ) 18 | 19 | archive_view_func = views.ArchivePageView.as_view('archive') 20 | home.add_url_rule('//', view_func=archive_view_func) 21 | home.add_url_rule('///page/', view_func=archive_view_func ) 22 | home.add_url_rule('/', view_func=archive_view_func) 23 | home.add_url_rule('//page/', view_func=archive_view_func ) 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/templates/sidebar.html: -------------------------------------------------------------------------------- 1 | {% macro render_sidebar_category(cate) %} 2 |
  • 3 |

    复习提纲分类

    4 |
      5 | {% for c in cate %} 6 |
    • {{c.title}} ({{c.count}})
    • 7 | {% endfor %} 8 |
    9 |
  • 10 | {% endmacro %} 11 | 12 | {% macro render_sidebar_new(new) %} 13 |
  • 14 |

    最新复习提纲

    15 |
      16 | {% for p in new %} 17 |
    • 18 | {{p.title}} 19 |
    • 20 | {% endfor %} 21 |
    22 |
  • 23 | {% endmacro %} 24 | 25 | {% macro render_sidebar_tag(tags) %} 26 |
  • 27 |

    复习提纲标签

    28 |
    29 | {% for t in tags %} 30 | {{t.name}} 31 | {% endfor %} 32 |
    33 |
  • 34 | {% endmacro %} 35 | -------------------------------------------------------------------------------- /app/templates/home/category.jinja2: -------------------------------------------------------------------------------- 1 | {% extends "base.jinja2"%} 2 | {% from 'utils.html' import render_pagination, render_plist %} 3 | {%block title%}高中复习提纲网-高一,高二,高三高中各科必修选修复习资料提纲聚集地{%endblock title%} 4 | {%block description%}高中复习提纲网是一个收集高中复习资料提纲的聚集地{%endblock description%} 5 | {%block keywords%}提纲,高中,复习,数学,语文,英语,物理,化学,生物,政治,地理,历史,重点,归纳{%endblock keywords%} 6 | {% block style %} 7 | 8 | {{ super() }} 9 | {% endblock style %} 10 | {% block content %} 11 |
    12 | 13 | 16 | 17 | 18 |
    19 | {{ render_plist(object_list.items) }} 20 | 21 | {{ render_pagination(object_list, 'home.category', slug=object.slug) }} 22 | 23 |
    24 | 25 |
    26 | {% include 'sidebar.html' %} 27 | {% endblock content %} 28 | -------------------------------------------------------------------------------- /app/templates/tag.jinja2: -------------------------------------------------------------------------------- 1 | {% extends "base.jinja2"%} 2 | {% from 'utils.html' import render_pagination, render_plist %} 3 | 4 | {%block title%}高中复习提纲网-高一,高二,高三高中各科必修选修复习资料提纲聚集地{%endblock title%} 5 | {%block description%}高中复习提纲网是一个收集高中复习资料提纲的聚集地{%endblock description%} 6 | {%block keywords%}提纲,高中,复习,数学,语文,英语,物理,化学,生物,政治,地理,历史,重点,归纳{%endblock keywords%} 7 | {% block style %} 8 | 9 | {{ super() }} 10 | {% endblock style %} 11 | {% block content %} 12 | 13 |
    14 | 15 | 18 | 19 | 20 |
    21 | {{ render_plist(ct.td.plist) }} 22 | 23 | {{ render_pagination(ct.td.pagination, 'home.tag', tslug=ct.td.slug) }} 24 | 25 |
    26 | 27 |
    28 | {% include 'sidebar.html' %} 29 | {% endblock content %} 30 | -------------------------------------------------------------------------------- /app/templates/home/tag.jinja2: -------------------------------------------------------------------------------- 1 | {% extends "base.jinja2"%} 2 | {% from 'utils.html' import render_pagination, render_plist %} 3 | 4 | {%block title%}高中复习提纲网-高一,高二,高三高中各科必修选修复习资料提纲聚集地{%endblock title%} 5 | {%block description%}高中复习提纲网是一个收集高中复习资料提纲的聚集地{%endblock description%} 6 | {%block keywords%}提纲,高中,复习,数学,语文,英语,物理,化学,生物,政治,地理,历史,重点,归纳{%endblock keywords%} 7 | {% block style %} 8 | 9 | {{ super() }} 10 | {% endblock style %} 11 | {% block content %} 12 | 13 |
    14 | 15 | 18 | 19 | 20 |
    21 | {{ render_plist(object_list.items) }} 22 | 23 | {{ render_pagination(object_list, 'home.tag', slug=object.slug) }} 24 | 25 |
    26 | 27 |
    28 | {% include 'sidebar.html' %} 29 | {% endblock content %} 30 | -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | import os 2 | import logging 3 | 4 | from db import * 5 | 6 | basedir = os.path.abspath(os.path.dirname(__file__)) 7 | 8 | SECRET_KEY = 'buyaoyongroot' 9 | CSRF_ENABLE = True 10 | 11 | # remove to db.py 12 | # MYSQL_USERNAME = 'root' 13 | # MYSQL_PASSWORD = '123123' 14 | # MYSQL_HOST = 'localhost' 15 | # MYSQL_DBNAME = 'flask' 16 | 17 | LOGGING_PATH = os.path.join(basedir, 'logs') 18 | LOGGING_FILENAME = 'wp2flask-cms.log' 19 | 20 | # SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db') 21 | SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://%s:%s@%s/%s' % (MYSQL_USERNAME, 22 | MYSQL_PASSWORD, 23 | MYSQL_HOST, 24 | MYSQL_DBNAME) 25 | SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository') 26 | 27 | fh = logging.FileHandler('%s/%s' % (LOGGING_PATH, LOGGING_FILENAME)) 28 | ch = logging.StreamHandler() 29 | formatter = logging.Formatter('%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s') 30 | fh.setFormatter(formatter) 31 | ch.setFormatter(formatter) 32 | 33 | logger = logging.getLogger('wp2flask-cms') 34 | logger.setLevel(logging.DEBUG) 35 | 36 | logger.addHandler(fh) 37 | logger.addHandler(ch) 38 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | alembic==0.9.1 2 | aniso8601==1.2.0 3 | appdirs==1.4.3 4 | appnope==0.1.0 5 | Babel==2.4.0 6 | backports.shutil-get-terminal-size==1.0.0 7 | blinker==1.4 8 | click==6.7 9 | decorator==4.0.11 10 | enum34==1.1.6 11 | Faker==0.7.10 12 | Flask==0.12.1 13 | Flask-Admin==1.5.0 14 | Flask-BabelEx==0.9.3 15 | Flask-Login==0.4.0 16 | Flask-Migrate==2.0.3 17 | Flask-RESTful==0.3.5 18 | Flask-Script==2.0.5 19 | Flask-SQLAlchemy==2.2 20 | Flask-WhooshAlchemy==0.56 21 | Flask-WTF==0.14.2 22 | gnureadline==6.3.3 23 | gunicorn==19.7.1 24 | ipaddress==1.0.18 25 | ipython==5.3.0 26 | ipython-genutils==0.2.0 27 | itsdangerous==0.24 28 | Jinja2==2.9.6 29 | lxml==3.7.3 30 | Mako==1.0.6 31 | Markdown==2.6.8 32 | MarkupSafe==1.0 33 | meld3==1.0.2 34 | packaging==16.8 35 | path.py==10.1 36 | pathlib2==2.2.1 37 | pbr==2.0.0 38 | pexpect==4.2.1 39 | pickleshare==0.7.4 40 | prompt-toolkit==1.0.14 41 | ptyprocess==0.5.1 42 | Pygments==2.2.0 43 | PyMySQL==0.7.10 44 | pyparsing==2.2.0 45 | python-dateutil==2.6.0 46 | python-editor==1.0.3 47 | python-slugify==1.2.2 48 | pytz==2017.2 49 | scandir==1.5 50 | simplegeneric==0.8.1 51 | six==1.10.0 52 | speaklater==1.3 53 | SQLAlchemy==1.1.9 54 | sqlalchemy-migrate==0.11.0 55 | sqlparse==0.2.3 56 | supervisor==3.3.1 57 | Tempita==0.5.2 58 | traitlets==4.3.2 59 | Unidecode==0.4.20 60 | wcwidth==0.1.7 61 | Werkzeug==0.12.1 62 | wheel==0.29.0 63 | Whoosh==2.7.4 64 | WTForms==2.1 65 | xpinyin==0.5.5 66 | -------------------------------------------------------------------------------- /app/core/apiv1/views.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | from flask_restful import Resource, reqparse, fields, marshal_with 3 | from app.service.BaseService import * 4 | from . import apiv1 5 | 6 | 7 | class Test(Resource): 8 | def get(self): 9 | parser = reqparse.RequestParser() 10 | parser.add_argument('rate') 11 | args = parser.parse_args() 12 | return {'hello': args}, 201, {'fuck': 'you'} 13 | 14 | def post(self): 15 | parser = reqparse.RequestParser() 16 | parser.add_argument('name', type=int, location='from') 17 | args = parser.parse_args() 18 | return {'hello': args}, 200 19 | 20 | 21 | class PostsApi(Resource): 22 | def __init__(self): 23 | self.get_parser = reqparse.RequestParser() 24 | self.get_parser.add_argument('category_id', type=int, location='args') 25 | # self.get_parser.add_argument('tag_id', type=str, location='args') 26 | self.get_parser.add_argument('limit', type=int, location='args') 27 | 28 | self.post_parser = reqparse.RequestParser() 29 | # Defaults type to unicode in python2 and str in python3 30 | self.post_parser.add_argument('title', location='json', required=True) 31 | self.post_parser.add_argument('body', location='json', required=True) 32 | self.post_parser.add_argument('slug', location='json') 33 | self.post_parser.add_argument('tag_ids', type=list, location='json') 34 | self.post_parser.add_argument('category_id', location='json', 35 | default=1) 36 | 37 | def get(self): 38 | parser = self.get_parser.parse_args() 39 | pservice = PostService() 40 | # lklk 41 | s = pservice.get_list(**parser) 42 | 43 | return s 44 | 45 | def post(self): 46 | a = self.post_parser.parse_args() 47 | 48 | return a 49 | 50 | 51 | def fuck(): 52 | pass 53 | -------------------------------------------------------------------------------- /app/core/home/views.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | from flask import abort 4 | 5 | from app.core.views import ( 6 | TemplateView, DetailView, ModelFieldListView, ArchiveView 7 | ) 8 | from app.core.models import Category, Tag, Post 9 | from . import home 10 | 11 | 12 | class TestView(TemplateView): 13 | template_name = 'index.jinja2' 14 | 15 | def get_context_data(self, **kwargs): 16 | context = super(TestView, self).get_context_data(**kwargs) 17 | return context 18 | 19 | home.add_url_rule('/test//', view_func=TestView.as_view('test123'), methods=['GET', 'POST']) 20 | 21 | 22 | class IndexView(TemplateView): 23 | template_name = "home/index.jinja2" 24 | 25 | 26 | class CategoryView(ModelFieldListView): 27 | model = Category 28 | model_field = 'posts' 29 | paginate_by = 10 30 | template_name = "home/category.jinja2" 31 | 32 | 33 | class TagView(ModelFieldListView): 34 | model = Tag 35 | model_field = 'posts' 36 | paginate_by = 10 37 | template_name = "home/tag.jinja2" 38 | 39 | 40 | class PostView(DetailView): 41 | model = Post 42 | template_name = 'home/post.jinja2' 43 | 44 | def get_basequery(self): 45 | basequery = super(PostView, self).get_basequery() 46 | cslug = self.kwargs.get('cslug') 47 | if cslug is None: 48 | abort(404) 49 | basequery = basequery.filter(self.model.category.has(slug=cslug)) 50 | return basequery 51 | 52 | 53 | class ArchivePageView(ArchiveView): 54 | template_name = 'home/archive.jinja2' 55 | model = Post 56 | paginate_by = 10 57 | 58 | def get_context_data(self, **kwargs): 59 | context = super(ArchivePageView, self).get_context_data(**kwargs) 60 | return context 61 | 62 | 63 | # @home.route('//', methods=['GET', 'POST']) 64 | # @home.route('///page/', methods=['GET', 'POST']) 65 | # def archive(year, month, page_num=1): 66 | # """ 67 | # Archive default page 68 | # """ 69 | # return 'High & Dry' 70 | -------------------------------------------------------------------------------- /api_docs/PageDataFormat.md: -------------------------------------------------------------------------------- 1 | ## 文章列表页 2 | ```python 3 | page_dict = dict( 4 | id=c.id, # t.id 5 | name=c.name, # t.name 6 | slug=c.slug, # t.slug 7 | post_count=c.posts.count(), # t.posts.count 8 | pagination=self.pagination, 9 | plist=[ 10 | dict( 11 | id=p.id, 12 | title=p.title, 13 | slug=p.slug, 14 | ) 15 | for p in posts 16 | ], 17 | ) 18 | ``` 19 | ## 文章列表部件(无分类信息): 20 | 21 | ```python 22 | post_dict_list = [ 23 | dict( 24 | id=p.id, 25 | title=p.title, 26 | slug=p.slug, 27 | cslug=p.category.cslug, 28 | ) 29 | for p in posts 30 | ] 31 | ``` 32 | 33 | ## 文章列表部件(含分类信息) 34 | 35 | ```python 36 | cate_posts_list = dict( 37 | id=c.id, 38 | name=c.name, 39 | slug=c.slug, 40 | post_count=c.posts.count(), 41 | plist=[ 42 | dict( 43 | id=p.id, 44 | title=p.title, 45 | slug=p.slug, 46 | ) 47 | for p in posts 48 | ], 49 | ) 50 | ``` 51 | ## 文章(不是那个出轨的明星) 52 | 53 | ```python 54 | post_dict = dict( 55 | id=p.id, 56 | title=p.title, 57 | slug=p.slug, 58 | cslug=p.category.slug 59 | body=p.body, 60 | create_date=p.timestamp.strftime("%F"), 61 | tags=[ 62 | dict( 63 | id=t.id, 64 | name=t.name, 65 | slug=t.slug, 66 | ) 67 | for t in tags 68 | ], 69 | ) 70 | ``` 71 | 72 | ## 分类列表 73 | 74 | ```python 75 | cate_dict_list = [ 76 | dict( 77 | id=c.id, 78 | name=c.name, 79 | slug=c.slug, 80 | post_count=c.posts.count() 81 | ) 82 | for c in cates 83 | ] 84 | ``` 85 | 86 | ## 首页推荐 87 | ```python 88 | plist = [ 89 | dict( 90 | id=p.id, 91 | title=p.title, 92 | slug=p.slug, 93 | cslug=p.category.slug, 94 | brief=briefy(p.body, 120), 95 | ) 96 | for p in posts 97 | ] 98 | ``` 99 | 100 | ## 标签部件 101 | ```python 102 | tag_dict_list = [ 103 | dict( 104 | id=t.id, 105 | name=t.name, 106 | slug=t.slug, 107 | font_size=tag_font_size(t.posts.count()), 108 | ) 109 | for t in tags 110 | ] 111 | ``` 112 | -------------------------------------------------------------------------------- /app/__init__.py: -------------------------------------------------------------------------------- 1 | from flask import Flask 2 | 3 | from app.core.models import db 4 | 5 | 6 | def create_app(): 7 | """ 8 | Initialize && create app 9 | """ 10 | app = Flask(__name__) 11 | app.config.from_object('config') 12 | app.config.setdefault('SQLALCHEMY_TRACK_MODIFICATIONS', True) 13 | init_db(app) 14 | init_login(app) 15 | init_blueprint(app) 16 | init_restful(app) 17 | init_admin(app) 18 | init_babel(app) 19 | 20 | return app 21 | 22 | 23 | def init_db(app): 24 | """ 25 | Initialize db 26 | """ 27 | db.init_app(app) 28 | db.app = app 29 | 30 | 31 | def init_login(app): 32 | """ 33 | Initialize login 34 | """ 35 | from flask_login import LoginManager 36 | login_manager = LoginManager() 37 | login_manager.session_protection = 'strong' 38 | login_manager.login_view = 'manage.login' 39 | login_manager.init_app(app) 40 | 41 | @login_manager.user_loader 42 | def load_user(user_id): 43 | from app.core.models import User 44 | return User.query.get(int(user_id)) 45 | 46 | 47 | def init_blueprint(flask_app): 48 | """ 49 | Initialize blueprint 50 | """ 51 | from app.core.home import home 52 | flask_app.register_blueprint(home) 53 | 54 | from app.core.page import page 55 | flask_app.register_blueprint(page) 56 | 57 | from app.core.module import module 58 | flask_app.register_blueprint(module) 59 | 60 | # from app.core.apiv1 import apiv1 61 | # app.register_blueprint(apiv1, url_prefix='/api/v1') 62 | 63 | 64 | def init_restful(flask_app): 65 | from app.core.apiv1 import apiv1 66 | apiv1.init_app(flask_app) 67 | apiv1.app = flask_app 68 | 69 | 70 | def init_admin(flask_app): 71 | from flask_admin import Admin 72 | 73 | admin = Admin(flask_app, name='manager', template_mode='bootstrap3') 74 | 75 | from core.admin.views import MyView, PostView, CategoryView, TagView 76 | 77 | admin.add_view(MyView(name='test', endpoint='test')) 78 | admin.add_view(PostView(db.session)) 79 | admin.add_view(CategoryView(db.session)) 80 | admin.add_view(TagView(db.session)) 81 | 82 | return admin 83 | 84 | 85 | def init_babel(flask_app): 86 | from flask_babelex import Babel 87 | babel = Babel(flask_app) 88 | flask_app.config['BABEL_DEFAULT_LOCALE'] = 'zh_CN' 89 | return babel 90 | -------------------------------------------------------------------------------- /app/templates/utils.html: -------------------------------------------------------------------------------- 1 | {% macro render_plist(plist) %} 2 | {% for p in plist %} 3 |
    4 |

    {{ p.title }}

    6 | {{ p.create_date }} 7 |
    8 | {{ p.body[:200] }}......复习提纲详细内容 10 |
    11 |
    12 | {% endfor %} 13 | {% endmacro %} 14 | 15 | {% macro _page_url(endpoint, _page) %} 16 | {% if _page == 1 %} 17 | {{ url_for(endpoint, **kwargs) }} 18 | {% else %} 19 | {{ url_for(endpoint, page=_page, **kwargs) }} 20 | {% endif %} 21 | {% endmacro %} 22 | 23 | 24 | {% macro render_pagination(pagination, endpoint) %} 25 | 52 | {% endmacro %} 53 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!env/bin/python 2 | from faker import Factory 3 | from random import choice, sample, randint 4 | 5 | from sqlalchemy import func 6 | from flask_migrate import Migrate, MigrateCommand 7 | from flask_script import Manager, Server 8 | 9 | from app import create_app 10 | from app.core.models import db, User, Category, Post, Tag, Comment 11 | 12 | app = create_app() 13 | 14 | manager = Manager(app) 15 | Migrate(app, db) 16 | 17 | app.jinja_env.globals['Category'] = Category 18 | app.jinja_env.globals['Post'] = Post 19 | app.jinja_env.globals['Tag'] = Tag 20 | app.jinja_env.globals['func'] = func 21 | 22 | @manager.command 23 | def forged(): 24 | 25 | db.drop_all() 26 | db.create_all() 27 | 28 | faker = Factory.create() 29 | 30 | def generate_post(func_user, func_categorys, func_tags): 31 | return Post(title=faker.sentence(), 32 | body=faker.paragraph(), 33 | user=func_user(), 34 | category=func_categorys(), 35 | tags=func_tags()) 36 | 37 | def generate_user(): 38 | return User(email=faker.email(), 39 | username=faker.word(), 40 | nickname=faker.name(), 41 | password='buyaoyongroot') 42 | 43 | def generate_category(): 44 | return Category(name=faker.last_name(), 45 | description=faker.sentence()) 46 | 47 | def generate_tag(): 48 | return Tag(name=faker.first_name()) 49 | 50 | def generate_comment(func_post): 51 | return Comment(author=faker.first_name(), 52 | email=faker.email(), 53 | site='http://www.%s.com' % (faker.first_name()), 54 | content=faker.sentence(), 55 | post=func_post()) 56 | 57 | users = [generate_user() for i in xrange(10)] 58 | db.session.add_all(users) 59 | 60 | categorys = [generate_category() for i in xrange(10)] 61 | db.session.add_all(categorys) 62 | 63 | tags = [generate_tag() for i in xrange(30)] 64 | db.session.add_all(tags) 65 | 66 | def random_user(): return choice(users) 67 | 68 | def random_category(): return choice(categorys) 69 | 70 | def random_tags(): return sample(tags, randint(1, 5)) 71 | 72 | posts = [generate_post(random_user, 73 | random_category, random_tags) for i in xrange(100)] 74 | db.session.add_all(posts) 75 | 76 | def random_post(): return choice(posts) 77 | 78 | comments = [generate_comment(random_post) for i in xrange(1000)] 79 | db.session.add_all(comments) 80 | 81 | db.session.commit() 82 | 83 | if __name__ == '__main__': 84 | manager.add_command("runserver", Server(use_debugger=True)) 85 | manager.add_command("db", MigrateCommand) 86 | manager.run() 87 | -------------------------------------------------------------------------------- /app/core/admin/views.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | from markdown import markdown 3 | 4 | from wtforms import TextAreaField 5 | from jinja2 import Markup 6 | from flask_admin import expose, BaseView 7 | from flask_admin.contrib.sqla import ModelView 8 | 9 | from app.core.models import Post, Category, Tag 10 | 11 | 12 | def tags_formatter(view, context, model, name): 13 | return ", ".join(map(lambda t: t.name, model.tags)) 14 | 15 | 16 | class MyView(BaseView): 17 | @expose('/') 18 | def index(self): 19 | return self.render('admin_template/admin.html') 20 | 21 | 22 | class PostView(ModelView): 23 | page_size = 10 24 | column_default_sort = ('update_time', True) 25 | column_list = ('title', 'category', 'tags', 'update_time', ) 26 | form_columns = ('title', 'slug', 'tags', 'category', 'body', ) 27 | column_searchable_list = ('title', ) 28 | column_filters = ('category', ) 29 | 30 | column_formatters = dict( 31 | category=lambda v, c, m, p: m.category.name, 32 | update_time=lambda v, c, m, p: m.update_time.strftime(u'%Y-%m-%d'), 33 | tags=tags_formatter, 34 | ) 35 | 36 | column_labels = { 37 | 'title': u'标题', 38 | 'category': u'分类', 39 | 'update_time': u'更新时间', 40 | 'body': u'内容', 41 | 'tags': u'标签', 42 | } 43 | 44 | def get_form(self): 45 | form = super(PostView, self).get_form() 46 | form.body = TextAreaField(render_kw={'rows': 20}) 47 | return form 48 | 49 | def __init__(self, session, **kwargs): 50 | super(PostView, self).__init__(Post, session, **kwargs) 51 | 52 | 53 | class CategoryView(ModelView): 54 | page_size = 10 55 | column_list = ('name', 'description', 'post_count', ) 56 | form_columns = ('name', 'slug', 'description', ) 57 | column_searchable_list = ('name', ) 58 | column_formatters = { 59 | 'post_count': lambda v, c, m, p: Markup('%s' % (m.slug, m.posts.count())) 60 | } 61 | column_labels = { 62 | 'name': u'分类', 63 | 'description': u'描述', 64 | 'post_count': u'文章数量', 65 | } 66 | 67 | def __init__(self, session, **kwargs): 68 | super(CategoryView, self).__init__(Category, session, **kwargs) 69 | 70 | 71 | class TagView(ModelView): 72 | page_size = 10 73 | column_list = ('name', 'post_count', ) 74 | form_columns = ('name', 'slug', ) 75 | column_searchable_list = ('name', ) 76 | column_formatters = { 77 | 'post_count': lambda v, c, m, p: Markup('%s' % (m.slug, m.posts.count())) 78 | } 79 | column_labels = { 80 | 'name': u'标签', 81 | 'post_count': u'文章数量', 82 | } 83 | 84 | def __init__(self, session, **kwargs): 85 | super(TagView, self).__init__(Tag, session, **kwargs) 86 | -------------------------------------------------------------------------------- /app/templates/index.jinja2: -------------------------------------------------------------------------------- 1 | {% extends "base.jinja2"%} 2 | {% from 'sidebar.html' import render_sidebar_category, render_sidebar_tag %} 3 | {% from 'sidebar.html' import render_sidebar_new %} 4 | {%block title%}高中复习提纲网-高一,高二,高三高中各科必修选修复习资料提纲聚集地{%endblock title%} 5 | {%block description%}高中复习提纲网是一个收集高中复习资料提纲的聚集地{%endblock description%} 6 | {%block keywords%}提纲,高中,复习,数学,语文,英语,物理,化学,生物,政治,地理,历史,重点,归纳{%endblock keywords%} 7 | 8 | {%block content%} 9 |
    10 | 11 |
    12 | 13 |
    14 |

    最热复习提纲

    15 |
    16 |
      17 | {% for h in Post.query.order_by(func.random()).limit(10).all()%} 18 |
    • {{h.title}}
    • 19 | {% endfor %} 20 |
    21 |
    22 |
    23 | 24 |
    25 | 26 | 27 |
    28 | {% for p in Post.query.order_by(func.random()).limit(3).all() %} 29 |
    30 |

    {{p.title}}

    31 |
    32 | 核心知识 课标解读 力的概念 1 理解力是物体之间的相互作用,能找出施力物体和受力物体. 2 知...... 33 |
    34 |
    35 | {% endfor %} 36 |
    37 | 38 |
    39 |
    40 | 高中教辅书排行榜 41 |
    42 |
    43 |
    44 | 45 | 46 | {% for c in Category.query.all() %} 47 |
    48 |
    49 |

    {{c.name}}

    50 |
      51 | {% for p in c.posts.limit(5).all() %} 52 |
    • {{p.title}}
    • 53 | {% endfor %} 54 |
    55 |
    56 |
    57 | {% endfor %} 58 | 59 |
    60 |
    61 |
    62 | 63 |
    64 |
      65 | {{ render_sidebar_new(Post.query.limit(15).all()) }} 66 | {{ render_sidebar_tag(Tag.query.all()) }} 67 |
    68 |
    69 | {% endblock content %} 70 | -------------------------------------------------------------------------------- /app/templates/home/index.jinja2: -------------------------------------------------------------------------------- 1 | {% extends "base.jinja2"%} 2 | {% from 'sidebar.html' import render_sidebar_category, render_sidebar_tag %} 3 | {% from 'sidebar.html' import render_sidebar_new %} 4 | {%block title%}高中复习提纲网-高一,高二,高三高中各科必修选修复习资料提纲聚集地{%endblock title%} 5 | {%block description%}高中复习提纲网是一个收集高中复习资料提纲的聚集地{%endblock description%} 6 | {%block keywords%}提纲,高中,复习,数学,语文,英语,物理,化学,生物,政治,地理,历史,重点,归纳{%endblock keywords%} 7 | 8 | {%block content%} 9 |
    10 | 11 |
    12 | 13 |
    14 |

    最热复习提纲

    15 |
    16 |
      17 | {% for h in Post.query.order_by(func.random()).limit(10).all()%} 18 |
    • {{h.title}}
    • 19 | {% endfor %} 20 |
    21 |
    22 |
    23 | 24 |
    25 | 26 | 27 |
    28 | {% for p in Post.query.order_by(func.random()).limit(3).all() %} 29 |
    30 |

    {{p.title}}

    31 |
    32 | 核心知识 课标解读 力的概念 1 理解力是物体之间的相互作用,能找出施力物体和受力物体. 2 知...... 33 |
    34 |
    35 | {% endfor %} 36 |
    37 | 38 |
    39 |
    40 | 高中教辅书排行榜 41 |
    42 |
    43 |
    44 | 45 | 46 | {% for c in Category.query.all() %} 47 |
    48 |
    49 |

    {{c.name}}

    50 |
      51 | {% for p in c.posts.limit(5).all() %} 52 |
    • {{p.title}}
    • 53 | {% endfor %} 54 |
    55 |
    56 |
    57 | {% endfor %} 58 | 59 |
    60 |
    61 |
    62 | 63 |
    64 |
      65 | {{ render_sidebar_new(Post.query.limit(15).all()) }} 66 | {{ render_sidebar_tag(Tag.query.all()) }} 67 |
    68 |
    69 | {% endblock content %} 70 | -------------------------------------------------------------------------------- /app/templates/new/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 高中复习提纲网 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    13 |
    14 |
    15 | 18 |
    19 |
    20 |
    21 |
    22 | 23 | 24 | 25 | 26 |
    27 |
    28 |
    29 | 32 |
    33 |
    34 | 35 | 60 |
    61 |
    62 | http://127.0.0.1:8020/test/index.html 63 |
    64 |
    65 |
    66 |
    67 |
    68 |
    69 |
    70 |
    71 |
    72 |
    73 |
    74 |
    75 |
    76 |
    77 |
    78 |
    79 |
    80 |
    81 |
    82 |
    83 |
    84 |
    85 |
    86 |
    87 | 88 | 89 | 90 | 91 |
    92 |
    93 |
    94 |
    95 |
    96 |
    97 |
    98 |
    99 |
    100 |
    101 |
    102 |
    103 |
    104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /app/templates/post.jinja2: -------------------------------------------------------------------------------- 1 | {% extends "base.jinja2"%} 2 | 3 | {%block title%}高中复习提纲网-高一,高二,高三高中各科必修选修复习资料提纲聚集地{%endblock title%} 4 | {%block description%}高中复习提纲网是一个收集高中复习资料提纲的聚集地{%endblock description%} 5 | {%block keywords%}提纲,高中,复习,数学,语文,英语,物理,化学,生物,政治,地理,历史,重点,归纳{%endblock keywords%} 6 | {% block content %} 7 |
    8 | 11 | 12 |
    13 |
    14 |

    {{ ct.pd.title }}

    15 |
    16 | 17 |
    18 | 19 |
    20 | 21 | 分享 22 | 23 |
    24 | 25 |
    26 | {{ ct.pd.body }} 27 |
    28 |
    29 |

    转载请注明文章转载自:高中复习提纲网 [http://www.tigang.net]
    本文链接地址:{{ ct.pd.title }}
    30 | 高中教辅书排行榜 31 |

    32 |
    33 |
    34 |
    35 | 36 |
    37 | 38 |
    39 |
    40 | 41 |
    42 |

    相关提纲

    43 |
    44 |
    45 |
    46 |
      47 | {% for p in ct.rel %} 48 |
    • {{ p.title }}
    • 49 | {% endfor %} 50 |
    51 |
    52 |
    53 |
    54 |
    55 | 56 | 57 |
    58 |

    随机提纲

    59 |
    60 |
      61 | {% for p in ct.random %} 62 |
    • {{ p.title }}
    • 63 | {% endfor %} 64 |
    65 |
    66 |
    67 | 68 |
    69 | 70 | 71 | {% include 'comment.html' %} 72 |
    73 | 74 | 75 |
    76 | 77 |
    78 | {% include 'sidebar.html' %} 79 | {% endblock content %} 80 | -------------------------------------------------------------------------------- /app/templates/home/post.jinja2: -------------------------------------------------------------------------------- 1 | {% extends "base.jinja2"%} 2 | 3 | {%block title%}高中复习提纲网-高一,高二,高三高中各科必修选修复习资料提纲聚集地{%endblock title%} 4 | {%block description%}高中复习提纲网是一个收集高中复习资料提纲的聚集地{%endblock description%} 5 | {%block keywords%}提纲,高中,复习,数学,语文,英语,物理,化学,生物,政治,地理,历史,重点,归纳{%endblock keywords%} 6 | {% block content %} 7 |
    8 | 11 | 12 |
    13 |
    14 |

    {{ object.title }}

    15 |
    16 | 17 |
    18 | 19 |
    20 | 21 | 分享 22 | 23 |
    24 | 25 |
    26 | {{ object.body }} 27 |
    28 |
    29 |

    转载请注明文章转载自:高中复习提纲网 [http://www.tigang.net]
    本文链接地址:{{ object.title }}
    30 | 高中教辅书排行榜 31 |

    32 |
    33 |
    34 |
    35 | 36 |
    37 | 38 |
    39 |
    40 | 41 |
    42 |

    相关提纲

    43 |
    44 |
    45 |
    46 |
      47 | {# {% for p in ct.rel %}#} 48 | {#
    • {{ p.title }}
    • #} 49 | {# {% endfor %}#} 50 |
    51 |
    52 |
    53 |
    54 |
    55 | 56 | 57 |
    58 |

    随机提纲

    59 |
    60 |
      61 | {# {% for p in ct.random %}#} 62 | {#
    • {{ p.title }}
    • #} 63 | {# {% endfor %}#} 64 |
    65 |
    66 |
    67 | 68 |
    69 | 70 | 71 | {% include 'comment.html' %} 72 |
    73 | 74 | 75 |
    76 | 77 |
    78 | {% include 'sidebar.html' %} 79 | {% endblock content %} 80 | -------------------------------------------------------------------------------- /app/service/BaseService.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | from sqlalchemy.orm.exc import NoResultFound 3 | from sqlalchemy.orm.exc import MultipleResultsFound 4 | 5 | from app.core.models import * 6 | from config import logger 7 | 8 | 9 | def try_read(fn): 10 | def wrapped(*args, **kwargs): 11 | try: 12 | fn(*args, **kwargs) 13 | except NoResultFound, e: 14 | logger.info(' No Query Result Found: %s' % str(kwargs)) 15 | except MultipleResultsFound, e: 16 | logger.error('Multiple Query Results Found: %s' % str(kwargs)) 17 | except Exception, e: 18 | logger.error('Query Error: %s' % e) 19 | return wrapped 20 | 21 | 22 | def try_curd(fn): 23 | def wrapped(*args, **kwargs): 24 | try: 25 | fn(*args, **kwargs) 26 | except Exception, e: 27 | logger.error('Service curd error: %s' % e) 28 | db.session.rollback() 29 | raise TypeError 30 | else: 31 | logger.info('Service curd success: %s' % str(args)) 32 | db.session.commit() 33 | return wrapped 34 | 35 | 36 | class BaseService(object): 37 | def __init__(self, model=None): 38 | self.model = model 39 | 40 | def get(self, **kwargs): 41 | logger.debug('slef.get: %s' % str(kwargs)) 42 | model = self.model.query.filter_by(**kwargs).one() 43 | return model 44 | 45 | def get_list(self, limit=None, offset=None, tag_id=None, **kwargs): 46 | if tag_id is not None: 47 | # TODO 48 | query = self.model.query.filter(Post.tags.any(Tag.id.in_(tag_id))) 49 | else: 50 | query = self.model.query 51 | models = query.filter_by(**kwargs).limit(limit).offset(offset).all() 52 | return models 53 | 54 | def add(self, **kwargs): 55 | model = self.model(**kwargs) 56 | db.session.add(model) 57 | db.session.commit() 58 | 59 | def delete(self, **kwargs): 60 | models = self.get_list(**kwargs) 61 | for m in models: 62 | db.session.delete(m) 63 | db.session.commit() 64 | 65 | def update(self, new_info=None, **kwargs): 66 | model = self.model.query.filter_by(**kwargs) 67 | model.update(new_info) 68 | db.session.commit() 69 | 70 | def save(self): 71 | db.session.commit() 72 | 73 | 74 | class CategoryService(BaseService): 75 | def __init__(self): 76 | super(CategoryService, self).__init__(model=Category) 77 | 78 | def get_cate_posts_by_id(self, cid): 79 | cate = self.get(id=cid) 80 | ps = cate.posts 81 | return ps 82 | 83 | 84 | class PostService(BaseService): 85 | def __init__(self): 86 | super(PostService, self).__init__(model=Post) 87 | 88 | def get_post_tags_by_id(self, pid): 89 | post = self.get(id=pid) 90 | tags = post.tags 91 | 92 | return tags 93 | 94 | def get_post_cate_by_id(self, pid): 95 | post = self.get(id=pid) 96 | cate = post.category 97 | 98 | return cate 99 | 100 | def get_post_comments_by_id(self, pid): 101 | post = self.get(id=pid) 102 | comments = post.comments 103 | 104 | return comments 105 | 106 | 107 | class TagService(BaseService): 108 | 109 | def __init__(self): 110 | super(TagService, self).__init__(model=Tag) 111 | 112 | def get_tag_posts_by_id(self, tid): 113 | tag = self.model.get(id=tid) 114 | ps = tag.posts 115 | 116 | return ps 117 | 118 | 119 | class CommentService(BaseService): 120 | def __init__(self): 121 | super(CommentService, self).__init__(model=Comment) 122 | 123 | def get_comment_post_by_id(self, comid): 124 | comment = self.model.get(id=comid) 125 | post = comment.post 126 | 127 | return post 128 | -------------------------------------------------------------------------------- /app/core/models.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | from datetime import datetime 3 | 4 | from slugify import slugify 5 | 6 | from flask_sqlalchemy import SQLAlchemy 7 | from flask_login import UserMixin 8 | from werkzeug.security import generate_password_hash, check_password_hash 9 | 10 | db = SQLAlchemy() 11 | 12 | post_tag_table = db.Table( 13 | 'post_tag', 14 | db.Column('tag_id', db.Integer, db.ForeignKey('tag.id')), 15 | db.Column('post_id', db.Integer, db.ForeignKey('post.id')), 16 | ) 17 | 18 | 19 | class PageModelMixin(db.Model): 20 | __abstract__ = True 21 | 22 | create_time = db.Column(db.DateTime, index=True, default=datetime.utcnow) 23 | update_time = db.Column(db.DateTime, index=True, default=datetime.utcnow, onupdate=datetime.utcnow()) 24 | 25 | def __init__(self, *args, **kwargs): 26 | if 'slug' not in kwargs: 27 | kwargs['slug'] = self.make_slug() 28 | super(PageModelMixin, self).__init__(*args, **kwargs) 29 | 30 | def get_slug_field(self): 31 | raise NotImplementedError 32 | 33 | def make_slug(self): 34 | field = self.get_slug_field() 35 | slug_ = slugify(field) 36 | model = self.__class__ 37 | if slug_ is None: 38 | raise TypeError('%s slugify Error' % model) 39 | 40 | # TODO: 优化 41 | i = 2 42 | while model.query.filter_by(slug=slug_).first() is not None: 43 | slug_ = "%s-%s" % (slug_, i) 44 | i += 1 45 | 46 | return slug_ 47 | 48 | 49 | class User(UserMixin, db.Model): 50 | id = db.Column(db.Integer, primary_key=True) 51 | email = db.Column(db.String(120), index=True, unique=True) 52 | username = db.Column(db.String(64), index=True, unique=True) 53 | nickname = db.Column(db.String(64)) 54 | password_hash = db.Column(db.String(128)) 55 | 56 | posts = db.relationship('Post', backref='user', lazy='dynamic') 57 | 58 | @property 59 | def password(self): 60 | raise AttributeError('error: password only read') 61 | 62 | @password.setter 63 | def password(self, password): 64 | self.password_hash = generate_password_hash(password) 65 | 66 | def verify_password(self, password): 67 | return check_password_hash(self.password_hash, password) 68 | 69 | def __repr__(self): 70 | return '' % self.username 71 | 72 | 73 | class Category(PageModelMixin): 74 | id = db.Column(db.Integer, primary_key=True) 75 | name = db.Column(db.String(64), index=True, unique=True) 76 | slug = db.Column(db.String(64), index=True, unique=True) 77 | description = db.Column(db.String(128)) 78 | 79 | posts = db.relationship('Post', backref='category', lazy='dynamic') 80 | 81 | def get_slug_field(self): 82 | return self.name 83 | 84 | def __repr__(self): 85 | return '' % self.name 86 | 87 | 88 | class Post(PageModelMixin): 89 | id = db.Column(db.Integer, primary_key=True) 90 | title = db.Column(db.String(128), index=True) 91 | slug = db.Column(db.String(128), index=True, unique=True) 92 | body = db.Column(db.Text) 93 | 94 | user_id = db.Column(db.Integer, db.ForeignKey('user.id')) 95 | category_id = db.Column(db.Integer, db.ForeignKey('category.id')) 96 | 97 | comments = db.relationship('Comment', backref='post', lazy='dynamic') 98 | tags = db.relationship( 99 | 'Tag', 100 | secondary=post_tag_table, 101 | backref=db.backref('posts', lazy='dynamic') 102 | ) 103 | 104 | def get_slug_field(self): 105 | return self.title 106 | 107 | def __repr__(self): 108 | return '' % self.title 109 | 110 | 111 | class Tag(PageModelMixin): 112 | id = db.Column(db.Integer, primary_key=True) 113 | name = db.Column(db.String(64), index=True, unique=True) 114 | slug = db.Column(db.String(64), index=True, unique=True) 115 | description = db.Column(db.String(128)) 116 | 117 | # posts m2m 118 | 119 | def get_slug_field(self): 120 | return self.name 121 | 122 | def __repr__(self): 123 | return '' % self.name 124 | 125 | 126 | class Comment(db.Model): 127 | id = db.Column(db.Integer, primary_key=True) 128 | author = db.Column(db.String(64), nullable=False) 129 | email = db.Column(db.String(64), nullable=False) 130 | site = db.Column(db.String(64)) 131 | content = db.Column(db.Text) 132 | create_time = db.Column(db.DateTime, index=True, default=datetime.utcnow) 133 | update_time = db.Column(db.DateTime, index=True, default=datetime.utcnow, onupdate=datetime.utcnow()) 134 | 135 | post_id = db.Column(db.Integer, db.ForeignKey('post.id')) 136 | 137 | def __repr__(self): 138 | return '' % self.content 139 | -------------------------------------------------------------------------------- /app/templates/base.jinja2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% block head %} 5 | 6 | {% block title %}{% endblock title %} 7 | 8 | 10 | 11 | 12 | 13 | 14 | {% block style %} 15 | 17 | {% endblock style %} 18 | {% endblock head %} 19 | 20 | 21 | 22 | {% block body %} 23 | {% block header %} 24 |
    25 |
    26 | 27 | 31 |
    32 |
    33 | 41 |
    42 |
    43 |
    44 |
    45 |
    46 | 47 | 48 |
    49 |
    50 |
    51 |
    52 | 53 |
    54 | {% block navigation %} 55 | 70 | {% endblock navigation %} 71 |
    72 |
    73 | {% endblock header %} 74 | 75 |
    76 | 77 |
    78 |
    79 | {% block content %} 80 | 81 | {% endblock content %} 82 |
    83 |
    84 | 85 |
    86 | 87 | {% block footer %} 88 |
    89 |

    Copyright © 高中复习提纲网为公益性网站,为服务师生而建,部分内容来源网络,版权为原作者所有. 90 |
    如无意中侵犯了您的版权,或是含有非法内容,请及时与我们联系请来信告知,我们将在第一时间做出回应!谢谢!

    91 |

    Powered by wp2flask-cms and Theme by Wpyou and Sitemap 92 |

    93 |

    94 |
    95 | {% endblock footer %} 96 | 97 | {% endblock body %} 98 | 99 | 100 | -------------------------------------------------------------------------------- /app/core/constants.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # encoding: utf-8 3 | 4 | # ## 5 | CAGE_PER_PAGE = 6 6 | TAG_PER_PAGE = 12 7 | HOME_HOT_POSTS_NUM = 11 8 | # ## Post PageService Constants ## 9 | # Post dict key 10 | POST_DICT_KEY = [ 11 | "id", 12 | "title", 13 | "slug", 14 | "cslug", 15 | "create_date", 16 | ] 17 | 18 | # post page dict key 19 | POST_PAGE_DICT_KEY = [ 20 | "body", 21 | ] 22 | POST_PAGE_DICT_KEY.extend(POST_DICT_KEY) 23 | 24 | # post brief dict key 25 | POST_BRIEF_DICT_KEY = [ 26 | "brief", 27 | ] 28 | POST_BRIEF_DICT_KEY.extend(POST_DICT_KEY) 29 | 30 | # ## Tag PageService Constants ## 31 | TAG_DICT_KEY = [ 32 | "id", 33 | "name", 34 | "slug", 35 | "post_count", 36 | ] 37 | 38 | # tag widget dict key 39 | TAG_WIDGET_DICT_KEY = [ 40 | "font_size", 41 | ] 42 | TAG_WIDGET_DICT_KEY.extend(TAG_DICT_KEY) 43 | 44 | # posts of cate page dict 45 | TAG_PAGE_DICT_KEY = [ 46 | "pagination", 47 | ] 48 | TAG_PAGE_DICT_KEY.extend(TAG_DICT_KEY) 49 | 50 | # ## Category PageService Constants ## 51 | CATEGORY_DICT_KEY = [ 52 | "id", 53 | "name", 54 | "slug", 55 | "post_count", 56 | ] 57 | # posts of cate page dict 58 | CATEGORY_PAGE_DICT_KEY = [ 59 | "pagination", 60 | ] 61 | CATEGORY_PAGE_DICT_KEY.extend(CATEGORY_DICT_KEY) 62 | 63 | # ## ListPageService Constants ## 64 | LIST_PAGE_DICT_KEY = [ 65 | "id", 66 | "name", 67 | "slug", 68 | "post_count", 69 | "pagination", 70 | ] 71 | 72 | # ## Comment PageService Constants ## 73 | COMMENT_DICT_KEY = [ 74 | "id", 75 | "author", 76 | "email", 77 | "site", 78 | "content", 79 | "create_date", 80 | "post_id" 81 | ] 82 | 83 | HTML = u''' 84 | 85 | 86 | 核心知识 87 | 课标解读  88 | 89 | 90 | 力的概念 91 | 1 92 | 理解力是物体之间的相互作用,能找出施力物体和受力物体. 93 | 94 | 95 | 2 96 | 知道力的作用效果. 97 | 98 | 99 | 3 100 | 知道力有大小和方向,会画出力的图示或力的示意图. 101 | 102 | 103 | 4 104 | 知道力的分类. 105 | 106 | 107 | 重力的确概念 108 | 5 109 | 知道重力是地面附近的物体由于受到地球的吸引而产生的. 110 | 111 | 112 | 6 113 | 知道重力的大小和方向,会用公式G=mg计算重力. 114 | 115 | 116 | 7 117 | 知道重心的概念以及均匀物体重心的位置. 118 | 119 | 120 | 弹力的概念 121 | 8 122 | 知道什么是弹力以及弹力产生的条件. 123 | 124 | 125 | 9 126 | 能在力的图示(或力的示意图)中正确画出弹力的方向. 127 | 128 | 129 | 10 130 | 知道如何显示微小形变. 131 | 132 | 133 | 胡克定律 134 | 11 135 | 知道在各种形变中,形变越大,弹力越大. 136 | 137 | 138 | 12 139 | 知道胡克定律的内容和适用条件. 140 | 141 | 142 | 13 143 | 对一根弹簧,会用公式f=kx进行计算. 144 | 145 | 146 | 摩擦力的概念 147 | 14 148 | 知道滑动摩擦力产生的条件,会判断滑动摩擦力的方向. 149 | 150 | 151 | 15 152 | 会利用公式f=μN进行计算,知道动摩擦因数跟什么有关 153 | 154 | 155 | 16 156 | 知道静摩擦产生的条件,会判断静摩擦力的方向. 157 | 158 | 159 | 17 160 | 知道最大静摩擦力跟两物间的压力成正比 161 | 162 | 163 | 二力平衡 164 | 18 165 | 知道什么是力的平衡. 166 | 167 | 168 | 19 169 | 知道二力平衡的条件. 170 | 171 | 172 | 力的合成和分解 173 | 20 174 | 理解力的合成和合力的概念. 175 | 176 | 177 | 21 178 | 理解力的合成和合力的概念. 179 | 180 | 181 | 22 182 | 掌握平行四边形定则,会用作图法、公式法求合力的大小和方向. 183 | 184 | 185 | 23 186 | 熟悉力的三角形法. 187 | 188 | 189 | 24 190 | 掌握平行四边形定则. 191 | 192 | 193 | 25 194 | 理解力的分解和分力的概念.理解力的分解是力的合成逆运算, 195 | 196 | 197 | 26 198 | 会用作图法求分力,会用直角三角形的知识计算分力 199 | 200 | 201 | 矢量和标量及运算 202 | 27 203 | 知道什么是矢量,什么是标量. 204 | 205 | 206 | 28 207 | 知道平行四边形定则是矢量加法运算的普遍定则. 208 | 209 | 210 | 受力分析 211 | 2 212 | 初步熟悉物体的受力分析. 213 | 214 | 215 | ''' 216 | -------------------------------------------------------------------------------- /app/core/apiv1/service.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | from sqlalchemy import func 4 | from app.core.models import User, Post, Category, Tag, Comment 5 | 6 | post_keys = [ 7 | "id", 8 | "title", 9 | "slug", 10 | "body", 11 | "category_id", 12 | ] 13 | 14 | post_special_keys = [ 15 | "timestamp", 16 | "tags", 17 | ] 18 | 19 | cate_keys = [ 20 | "id", 21 | "name", 22 | "slug", 23 | "description", 24 | ] 25 | 26 | cate_special_keys = [ 27 | "post_count", 28 | ] 29 | 30 | comment_keys = [ 31 | "id", 32 | "author", 33 | "email", 34 | "site", 35 | "content", 36 | ] 37 | 38 | comment_special_keys = [ 39 | "timestamp", 40 | ] 41 | 42 | tag_keys = [ 43 | "id", 44 | "name", 45 | "slug", 46 | ] 47 | 48 | tag_special_keys = [ 49 | "post_count", 50 | ] 51 | 52 | 53 | class BaseService(object): 54 | def data_dict_generator(self, d, keys=[], skeys=[]): 55 | data_dict = {} 56 | 57 | for k in keys: 58 | data_dict[k] = getattr(d, k, None) 59 | for sk in skeys: 60 | if sk == "post_count": 61 | data_dict[sk] = d.posts.count() 62 | elif sk == "timestamp": 63 | data_dict[sk] = d.create_time.strftime("%F %H:%M:%S") 64 | elif sk == "tags": 65 | data_dict[sk] = [t.name for t in d.tags] 66 | 67 | return data_dict 68 | 69 | def data_dict_list_generator(self, data=[], keys=[], skeys=[]): 70 | data_dict_list = [] 71 | 72 | for d in data: 73 | data_dict = self.data_dict_generator(d, keys, skeys) 74 | data_dict_list.append(data_dict) 75 | 76 | return data_dict_list 77 | 78 | 79 | class PostService(BaseService): 80 | 81 | def get_post_list(self, kw=[]): 82 | base_query = Post.query 83 | 84 | if kw is not None and isinstance(kw, dict): 85 | if 'cid' in kw.keys() and kw['cid'] is not None: 86 | base_query = base_query.filter_by(category_id=kw['cid']) 87 | if 'tid' in kw.keys() and kw['tid'] is not None: 88 | base_query = base_query.filter_by(category_id=kw['cid']) 89 | if 'random' in kw.keys() and kw['random'] == 'true': 90 | base_query = base_query.order_by(func.random()) 91 | if 'limit' in kw.keys() and kw['limit'] is not None: 92 | base_query = base_query.limit(kw['limit']) 93 | 94 | posts = base_query.all() 95 | 96 | post_dict_list = self.data_dict_list_generator( 97 | posts, 98 | post_keys, 99 | post_special_keys 100 | ) 101 | 102 | return post_dict_list 103 | 104 | def get_post_by_pid(self, pid): 105 | p = Post.query.get(pid) 106 | 107 | post_dict = self.data_dict_generator( 108 | p, 109 | post_keys, 110 | post_special_keys, 111 | ) 112 | 113 | return post_dict 114 | 115 | def get_cate_of_post(self, pid): 116 | post = Post.query.get(pid) 117 | 118 | cate_dict = self.data_dict_generator( 119 | post.category, 120 | cate_keys, 121 | cate_special_keys 122 | ) 123 | 124 | return cate_dict 125 | 126 | def get_tags_of_post(self, pid): 127 | post = Post.query.get(pid) 128 | 129 | tag_dict_list = [ 130 | dict( 131 | id=t.id, 132 | name=t.name, 133 | slug=t.slug, 134 | post_count=t.posts.count() 135 | ) 136 | for t in post.tags 137 | ] 138 | 139 | return tag_dict_list 140 | 141 | def get_comments_of_post(self, pid): 142 | post = Post.query.get(pid) 143 | 144 | comment_dict_list = self.data_dict_list_generator( 145 | post.comments, 146 | comment_keys, 147 | comment_special_keys 148 | ) 149 | 150 | return comment_dict_list 151 | 152 | 153 | class CategoryService(BaseService): 154 | def get_cate_list(self): 155 | cates = Category.query.all() 156 | 157 | cate_dict_list = self.data_dict_list_generator( 158 | cates, 159 | cate_keys, 160 | cate_special_keys 161 | ) 162 | 163 | return cate_dict_list 164 | 165 | def get_cate_by_cid(self, cid): 166 | cate = Category.query.get(cid) 167 | 168 | cate_dict = self.data_dict_generator( 169 | cate, 170 | cate_keys, 171 | cate_special_keys 172 | ) 173 | 174 | return cate_dict 175 | 176 | def get_posts_by_cid(self, cid): 177 | cate = Category.query.get(cid) 178 | 179 | post_dict_list = self.data_dict_list_generator( 180 | cate.posts, 181 | post_keys, 182 | post_special_keys 183 | ) 184 | 185 | return post_dict_list 186 | 187 | 188 | class CommentService(BaseService): 189 | def get_comment_list(self): 190 | comments = Comment.query.all() 191 | 192 | comment_dict_list = self.data_dict_list_generator( 193 | comments, 194 | comment_keys, 195 | comment_special_keys 196 | ) 197 | 198 | return comment_dict_list 199 | 200 | def get_comment_by_cmid(self, cmid): 201 | comment = Comment.query.get(cmid) 202 | 203 | comment_dict = self.data_dict_generator( 204 | comment, 205 | comment_keys, 206 | comment_special_keys 207 | ) 208 | 209 | return comment_dict 210 | 211 | def get_post_by_cmid(self, cmid): 212 | comment = Comment.query.get(cmid) 213 | 214 | post_dict = self.data_dict_generator( 215 | comment.post, 216 | post_keys, 217 | post_special_keys 218 | ) 219 | 220 | return post_dict 221 | 222 | 223 | class TagService(BaseService): 224 | def get_tag_list(self): 225 | tags = Tag.query.all() 226 | 227 | tag_dict_list = self.data_dict_list_generator( 228 | tags, 229 | tag_keys, 230 | tag_special_keys 231 | ) 232 | 233 | return tag_dict_list 234 | 235 | def get_tag_by_tid(self, tid): 236 | tag = Tag.query.get(tid) 237 | 238 | tag_dict = self.data_dict_generator( 239 | tag, 240 | tag_keys, 241 | tag_special_keys 242 | ) 243 | 244 | return tag_dict 245 | 246 | def get_posts_by_tid(self, tid): 247 | tag = Tag.query.get(tid) 248 | 249 | post_dict_list = self.data_dict_list_generator( 250 | tag.posts, 251 | post_keys, 252 | post_special_keys 253 | ) 254 | 255 | return post_dict_list 256 | -------------------------------------------------------------------------------- /app/core/views.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | from flask.views import MethodView 3 | from flask import request, render_template, abort 4 | from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound 5 | from sqlalchemy.sql.expression import extract 6 | 7 | 8 | class View(MethodView): 9 | 10 | def dispatch_request(self, *args, **kwargs): 11 | self.kwargs = kwargs 12 | self.args = args 13 | self.request = request 14 | return super(View, self).dispatch_request(*args, **kwargs) 15 | 16 | 17 | class TemplateResponseMixin(object): 18 | template_name = None 19 | 20 | def get_template_name(self): 21 | if self.template_name: 22 | return self.template_name 23 | return {} 24 | 25 | def render_to_response(self, context): 26 | return render_template( 27 | self.get_template_name(), 28 | **context 29 | ) 30 | 31 | 32 | class ContextMixin(object): 33 | def get_context_data(self, **kwargs): 34 | if 'view' not in kwargs.keys(): 35 | kwargs['view'] = self 36 | 37 | return kwargs 38 | 39 | 40 | class MultipleObjectMixin(ContextMixin): 41 | model = None 42 | paginate_by = None 43 | page_kwarg = 'page' 44 | ordering = None 45 | 46 | def get_context_data(self, **kwargs): 47 | context = dict() 48 | if self.object_list is not None: 49 | context['object_list'] = self.object_list 50 | context.update(kwargs) 51 | return super(MultipleObjectMixin, self).get_context_data(**context) 52 | 53 | def get_basequery(self): 54 | if self.model is not None: 55 | return self.model.query 56 | else: 57 | raise ValueError("model is None") 58 | 59 | def get_page_kwargs(self): 60 | return self.page_kwarg 61 | 62 | def get_ordering(self): 63 | return self.ordering 64 | 65 | 66 | class SingleObjectMixin(ContextMixin): 67 | model = None 68 | pk_url_kwarg = 'id' 69 | slug_url_kwarg = 'slug' 70 | 71 | def get_object(self, basequery=None): 72 | pk = self.kwargs.get(self.pk_url_kwarg) 73 | slug = self.kwargs.get(self.slug_url_kwarg) 74 | 75 | if basequery is None: 76 | basequery = self.model.query 77 | 78 | if slug is not None: 79 | basequery = basequery.filter_by(slug=slug) 80 | if pk is not None: 81 | basequery = basequery.filter_by(slug=slug) 82 | if slug is None and pk is None: 83 | raise ValueError("bad feel") 84 | try: 85 | obj = basequery.one() 86 | except NoResultFound: 87 | abort(404) 88 | except MultipleResultsFound: 89 | raise MultipleResultsFound 90 | return obj 91 | 92 | def get_basequery(self): 93 | return self.model.query 94 | 95 | def get_context_data(self, **kwargs): 96 | context = dict() 97 | if self.object is not None: 98 | context['object'] = self.object 99 | context.update(kwargs) 100 | return super(SingleObjectMixin, self).get_context_data(**context) 101 | 102 | 103 | class SingleObjectFieldListMixin(SingleObjectMixin, MultipleObjectMixin): 104 | model_field = None 105 | 106 | def get_basequery(self, obj=None): 107 | model_field = self.get_model_field() 108 | if model_field is None: 109 | raise ValueError, 'bad feel' 110 | if obj is None: 111 | obj = self.get_object() 112 | basequery = getattr(obj, model_field) 113 | return basequery 114 | 115 | def get_model_field(self): 116 | return self.model_field 117 | 118 | 119 | class TemplateView(TemplateResponseMixin, ContextMixin, View): 120 | def get(self, **kwargs): 121 | return self.render_to_response( 122 | self.get_context_data(**kwargs) 123 | ) 124 | 125 | 126 | class DetailView(SingleObjectMixin, TemplateResponseMixin, View): 127 | def get(self, *args, **kwargs): 128 | basequery = self.get_basequery() 129 | self.object = self.get_object(basequery) 130 | context = self.get_context_data(object=self.object) 131 | return self.render_to_response(**dict(context=context)) 132 | 133 | 134 | class ListView(MultipleObjectMixin, TemplateView, View): 135 | def get(self, *args, **kwargs): 136 | # self.object_list = self.get_basequery() 137 | basequery = self.get_basequery() 138 | page_kwargs = self.get_page_kwargs() 139 | page = self.kwargs.get(page_kwargs) or 1 140 | self.object_list = basequery.paginate(page, self.paginate_by) 141 | context = self.get_context_data(object_list=self.object_list) 142 | return self.render_to_response(**dict(context=context)) 143 | 144 | 145 | class ModelFieldListView(SingleObjectFieldListMixin, TemplateView, View): 146 | def get(self, *args, **kwargs): 147 | obj = self.get_object() 148 | basequery = self.get_basequery(obj=obj) 149 | 150 | page_kwargs = self.get_page_kwargs() 151 | page = self.kwargs.get(page_kwargs) or 1 152 | 153 | self.object = obj 154 | self.object_list = basequery.paginate(page, self.paginate_by) 155 | 156 | context = self.get_context_data(object_list=self.object_list, object=self.object) 157 | return self.render_to_response(**dict(context=context)) 158 | 159 | 160 | class ArchiveView(ListView): 161 | day_kwarg = 'day' 162 | month_kwarg = 'month' 163 | year_kwarg = 'year' 164 | 165 | def get_basequery(self): 166 | basequery = super(ArchiveView, self).get_basequery() 167 | day_kwarg = self.get_day_kwarg() 168 | month_kwarg = self.get_month_kwarg() 169 | year_kwarg = self.get_year_kwarg() 170 | 171 | day = self.kwargs.get(day_kwarg) or self.request.args.get(day_kwarg) 172 | month = self.kwargs.get(month_kwarg) or self.request.args.get(month_kwarg) 173 | year = self.kwargs.get(year_kwarg) or self.request.args.get(year_kwarg) 174 | 175 | if year is None: 176 | raise ValueError, 'feel bad' 177 | basequery = basequery.filter(extract('year', self.model.create_time) == int(year)) 178 | if month is None: 179 | return basequery 180 | basequery = basequery.filter(extract('month', self.model.create_time) == int(month)) 181 | if day is None: 182 | return basequery 183 | basequery = basequery.filter(extract('day', self.model.create_time) == int(day)) 184 | return basequery 185 | 186 | def get_context_data(self, **kwargs): 187 | context = super(ArchiveView, self).get_context_data(**kwargs) 188 | filter_kwargs = dict() 189 | year = self.kwargs.get(self.get_year_kwarg()) 190 | month = self.kwargs.get(self.get_month_kwarg()) 191 | day = self.kwargs.get(self.get_day_kwarg()) 192 | if year: 193 | filter_kwargs['year'] = year 194 | if month: 195 | filter_kwargs['month'] = month 196 | if day: 197 | filter_kwargs['day'] = day 198 | context['filter_kwargs'] = filter_kwargs 199 | return context 200 | 201 | def get_day_kwarg(self): 202 | return self.day_kwarg 203 | 204 | def get_month_kwarg(self): 205 | return self.month_kwarg 206 | 207 | def get_year_kwarg(self): 208 | return self.year_kwarg 209 | -------------------------------------------------------------------------------- /app/core/module/static/sitemap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 站点地图 - 高中复习提纲网 7 | 8 | 9 | 10 | 11 | 12 | 20 | 21 | 22 |

    高中复习提纲网's SiteMap

    23 |
    24 | 25 |
    26 |

    最新文章

    27 | 80 |
    81 |
    82 |
    83 |
    Baidu-SiteMap   84 | Latest Update: 2012-04-01 08:15:43

    85 |
    86 |
    87 |
    Powered by Baidu SiteMap Generator   88 | © 2008-2009 柳城

    89 |
    90 | 91 | 92 | -------------------------------------------------------------------------------- /api_docs/RESTful.raml: -------------------------------------------------------------------------------- 1 | #%RAML 0.8 2 | --- 3 | title: tigang-api 4 | baseUri: /api 5 | version: v1 6 | 7 | /posts: 8 | description: 所有文章 9 | get: 10 | queryParameters: 11 | cid: 12 | description: 获取`cate_id = {cate_id}`条件下的所有文章 13 | tid: 14 | description: 获取`tag_id = {tag_id}`条件下的所有文章 15 | limit: 16 | description: 获取`tag_id = {tag_id}`条件下{limit}条文章 17 | radom: 18 | description: 随机排序(默认为false) 19 | post: 20 | description: 提交一篇新文章 21 | /{post_id}: 22 | description: Post实体 23 | get: 24 | description: 获取`post_id = {post_id}`的文章 25 | responses: 26 | 200: 27 | body: 28 | application/json: 29 | example: | 30 | { 31 | "id": 1, 32 | "title": "我猜你们在看这段文字", 33 | "slug": "wo-cai-ni-men-zai-kan-zhe-duan-wen-zi", 34 | "body": "直播写代码:http://www.douyutv.com/socket", 35 | "timestamp":"2016-03-13 05:55", 36 | "tags":[ 37 | "直播", 38 | "熬夜", 39 | "写代码" 40 | ] 41 | } 42 | 404: 43 | body: 44 | application/json: 45 | example: | 46 | { 47 | "message": "没有找到该文章" 48 | } 49 | put: 50 | description: 更改`post_id = {post_id}`文章的内容 51 | delete: 52 | description: 删除一篇新文章 53 | /category: 54 | get: 55 | description: 获取`post_id = {post_id}`文章的分类信息 56 | responses: 57 | 200: 58 | body: 59 | application/json: 60 | example: | 61 | { 62 | "id": 1, 63 | "name": "斗鱼直播间", 64 | "slug": "douyutv", 65 | "post_count": 30, 66 | "description": "所有斗鱼直播间" 67 | } 68 | /tags: 69 | description: 所有归属于`post_id = {post_id}`文章的标签 70 | get: 71 | description: 获取所有`post_id = {post_id}`文章的标签 72 | responses: 73 | 200: 74 | body: 75 | application/json: 76 | example: | 77 | [ 78 | { 79 | "id": 1, 80 | "name": "直播", 81 | "slug": "live", 82 | "post_count": 3 83 | }, 84 | { 85 | "id": 2, 86 | "name": "熬夜", 87 | "slug": "stay-up-late", 88 | "post_count": 3 89 | }, 90 | { 91 | "id": 3, 92 | "name": "写代码", 93 | "slug": "coding", 94 | "post_count": 4 95 | } 96 | ] 97 | /comments: 98 | get: 99 | description: 获取所有`post_id = {post_id}`文章的评论 100 | responses: 101 | 200: 102 | body: 103 | application/json: 104 | example: | 105 | [ 106 | { 107 | "id": 1, 108 | "author": "你家伟哥", 109 | "email": "we@foobar.com", 110 | "site": "http://www.hb6.org/", 111 | "content": "叫我伟哥就可以了。", 112 | "timestamp": "2016-03-13 05:57" 113 | }, 114 | { 115 | "id": 2, 116 | "author": "你家伟哥", 117 | "email": "we@foobar.com", 118 | "site": "http://www.hb6.org/", 119 | "content": "实在不行你就叫我小伟", 120 | "timestamp": "2016-03-13 05:59" 121 | }, 122 | { 123 | "id": 3, 124 | "author": "李纳斯·托沃兹(伪)", 125 | "email": "Linus@foobar.com", 126 | "site": "http://www.Linus.org/", 127 | "content": "hello", 128 | "timestamp": "2016-03-13 06:57" 129 | } 130 | ] 131 | 132 | /categorys: 133 | description: 所有分类 134 | get: 135 | queryParameters: 136 | post_id: 137 | post: 138 | description: 添加新分类 139 | /{cate_id}: 140 | description: Category实体 141 | get: 142 | description: 获取`cate_id = {cate_id}`的分类 143 | responses: 144 | 200: 145 | body: 146 | application/json: 147 | example: | 148 | { 149 | "id": 1, 150 | "name": "斗鱼直播间", 151 | "slug": "douyutv", 152 | "post_count": 30, 153 | "description": "所有斗鱼直播间" 154 | } 155 | 404: 156 | body: 157 | application/json: 158 | example: | 159 | { 160 | "messgae": "找不到这个分类" 161 | } 162 | 163 | put: 164 | description: 更改`cate_id = {cate_id}`的分类 165 | delete: 166 | description: 删除`cate_id = {cate_id}`的分类 167 | /posts: 168 | get: 169 | description: 获取所有所属在`cate_id = {caite_id}`分类的文章 170 | responses: 171 | 200: 172 | body: 173 | application/json: 174 | example: | 175 | [ 176 | { 177 | "id": 1, 178 | "title": "我猜你们在看这段文字", 179 | "slug": "wo-cai-ni-men-zai-kan-zhe-duan-wen-zi", 180 | "body": "直播写代码:http://www.douyutv.com/socket", 181 | "timestamp":"2016-03-13 05:55", 182 | "tags":[ 183 | "直播", 184 | "熬夜", 185 | "写代码" 186 | ] 187 | }, 188 | { 189 | "id": 2, 190 | "title": "吃饭了吗?", 191 | "slug": "chi-fan-le-ma", 192 | "body": "直播写代码:http://www.douyutv.com/socket", 193 | "timestamp":"2016-03-13 06:55", 194 | "tags":[ 195 | "直播", 196 | "熬夜", 197 | "吃饭" 198 | ] 199 | }, 200 | { 201 | "id": 3, 202 | "title": "快去看我直播", 203 | "slug": "see-my-live", 204 | "body": "直播写代码:http://www.douyutv.com/socket", 205 | "timestamp":"2016-03-14 06:55", 206 | "tags":[ 207 | "直播", 208 | "熬夜", 209 | "写代码" 210 | ] 211 | } 212 | ] 213 | 214 | /tags: 215 | description: 所有标签 216 | get: 217 | queryParameters: 218 | post_id: 219 | post: 220 | description: 添加新标签 221 | /{tag_id}: 222 | description: Tag实体 223 | get: 224 | description: 获取`tag_id = {tag_id}`的标签信息 225 | responses: 226 | 200: 227 | body: 228 | application/json: 229 | example: | 230 | { 231 | "id": 1, 232 | "name": "直播", 233 | "slug": "live", 234 | "post_count": 3 235 | } 236 | 404: 237 | body: 238 | application/json: 239 | example: | 240 | { 241 | "message": "没有找到该标签" 242 | } 243 | put: 244 | description: 更改`tag_id = {tag_id}`的标签信息 245 | delete: 246 | description: 删除`tag_id = {tag_id}`的标签 247 | /posts: 248 | get: 249 | description: 获取所有标有`tag_id = {tag_id}`分类的文章 250 | responses: 251 | 200: 252 | body: 253 | application/json: 254 | example: | 255 | [ 256 | { 257 | "id": 1, 258 | "title": "我猜你们在看这段文字", 259 | "slug": "wo-cai-ni-men-zai-kan-zhe-duan-wen-zi", 260 | "body": "直播写代码:http://www.douyutv.com/socket", 261 | "timestamp":"2016-03-13 05:55", 262 | "tags":[ 263 | "直播", 264 | "熬夜", 265 | "写代码" 266 | ] 267 | }, 268 | { 269 | "id": 2, 270 | "title": "吃饭了吗?", 271 | "slug": "chi-fan-le-ma", 272 | "body": "直播写代码:http://www.douyutv.com/socket", 273 | "timestamp":"2016-03-13 06:55", 274 | "tags":[ 275 | "直播", 276 | "熬夜", 277 | "吃饭" 278 | ] 279 | }, 280 | { 281 | "id": 3, 282 | "title": "快去看我直播", 283 | "slug": "see-my-live", 284 | "body": "直播写代码:http://www.douyutv.com/socket", 285 | "timestamp":"2016-03-14 06:55", 286 | "tags":[ 287 | "直播", 288 | "熬夜", 289 | "写代码" 290 | ] 291 | } 292 | ] 293 | 294 | /comments: 295 | description: 所有评论 296 | get: 297 | queryParameters: 298 | post: 299 | post: 300 | description: 添加新评论 301 | /{comment_id}: 302 | description: Comment实体 303 | get: 304 | description: 获取`comment_id = {comment_id}`的评论 305 | responses: 306 | 200: 307 | body: 308 | application/json: 309 | example: | 310 | [ 311 | { 312 | "id": 1, 313 | "author": "你家伟哥", 314 | "email": "we@foobar.com", 315 | "site": "http://www.hb6.org/", 316 | "content": "叫我伟哥就可以了。", 317 | "timestamp": "2016-03-13 05:57" 318 | }, 319 | { 320 | "id": 2, 321 | "author": "你家伟哥", 322 | "email": "we@foobar.com", 323 | "site": "http://www.hb6.org/", 324 | "content": "实在不行你就叫我小伟", 325 | "timestamp": "2016-03-13 05:59" 326 | }, 327 | { 328 | "id": 3, 329 | "author": "李纳斯·托沃兹(伪)", 330 | "email": "Linus@foobar.com", 331 | "site": "http://www.Linus.org/", 332 | "content": "hello", 333 | "timestamp": "2016-03-13 06:57" 334 | } 335 | ] 336 | put: 337 | description: 更改`comment_id = {comment_id}`的评论 338 | delete: 339 | description: 删除`comment_id = {comment_id}`的评论 340 | /post: 341 | get: 342 | description: 获取`comment_id = {comment_id}`的评论所属的文章 343 | responses: 344 | 200: 345 | body: 346 | application/json: 347 | example: | 348 | { 349 | "id": 1, 350 | "title": "我猜你们在看这段文字", 351 | "slug": "wo-cai-ni-men-zai-kan-zhe-duan-wen-zi", 352 | "body": "直播写代码:http://www.douyutv.com/socket", 353 | "timestamp":"2016-03-13 05:55", 354 | "tags":[ 355 | "直播", 356 | "熬夜", 357 | "写代码" 358 | ] 359 | } 360 | -------------------------------------------------------------------------------- /app/static/css/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: WPYOU CMS 3 | Theme URI: http://www.wpyou.com/ 4 | Description: A Web 2.0 Wordpress Lovers Theme designed by WPYOU. 5 | Version: 1.0 6 | Author: Bob 7 | Author URI: http://www.wpyou.com/ 8 | Tags: blue, white, cms, fixed width, two columns, widgets 9 | /* 10 | 11 | /* ???CSS???? */ 12 | body { margin:0 auto; padding:0; font-family: '????'; font-size:12px; text-align:left; color:#000; background: #FFF;} 13 | 14 | div,form,ul,ol,li,span,p { margin:0; padding:0; border:0;} 15 | h1,h2,h3,h4,h5,h6{ margin:0;padding:0;} 16 | input,select{ line-height:16px;} 17 | img,a img{border:0;} 18 | ul,ol,li{list-style-type:none;} 19 | em{ font-style:normal;} 20 | 21 | .clear{ clear:both; font-size:1px; width:1px; margin-top:0px !important; *margin-top:-1px; line-height:0; visibility:hidden; } 22 | .banner_ad{ margin:0px auto; padding:10px 0px; width:970px; text-align:center;} 23 | .long_ad{ margin-top:10px; width:658px; height:80px; overflow:hidden; background:#999;} 24 | 25 | /* ?????????? */ 26 | a{ color:#0040D8; text-decoration: none;} 27 | a:hover{ color:#BD0A01; text-decoration: underline; } 28 | 29 | .a_help:link, .a_help:visited{ text-decoration:underline;} 30 | 31 | /* ???? */ 32 | .header{ margin:0px auto; width:970px; } 33 | .header-content{ float:left;} 34 | #logo{ float:left; margin:10px 0px; } 35 | #blogtitle{ float:left; text-indent:-1000px; display:block; } 36 | #blogtitle a:link, #blogtitle a:visited{ width:180px; height:70px; background:url(/static/images/logo.gif) no-repeat 0px top; overflow:hidden; display:block;} 37 | 38 | /* Header Right */ 39 | .headerR{ float:right; overflow:hidden;} 40 | .top_menu{ float:right; padding-left:14px; color:#DDD; background:url(/static/images/bg.png) no-repeat 0 0px;} 41 | .menu_list{ float:left; height:26px; padding:6px 14px 4px 0px; background:url(/static/images/bg.png) no-repeat right 0px;} 42 | .menu_list li{ float:left; padding:0px 5px;} 43 | .menu_list li.current_page_item{ color:#F60;} 44 | .menu_list a:link, .menu_list a:visited{ color:#666; text-decoration:none; display:block;} 45 | .menu_list a:hover{ color:#000;} 46 | .menu_list li.current_page_item a:link, .menu_list li.current_page_item a:visited{ color:#006ADF; font-weight:bold; text-decoration:none; display:block;} 47 | 48 | /* ?????? */ 49 | .so{ float:right; margin-top:10px; overflow:hidden;} 50 | #ls{ float:left; width:220px; padding: 2px 0px 0px 3px; height:20px; line-height:19px; border:1px solid #CCCCCC;} 51 | #searchsubmit{ float:left; width:65px; height:24px; margin-left:4px; cursor:pointer; } 52 | 53 | /* ?????? */ 54 | .menu{ float:right; margin:-15px 80px 0px 0px; _margin:-15px 0px 0px 0px;} 55 | .menu ul{ float:right; height:26px;} 56 | .menu ul li{ float:left; margin-left:10px; width:80px; padding:7px 0px 4px; text-align:center; font-size:14px; font-weight:bold; background:url(/static/images/bg.png) no-repeat 0 -41px;} 57 | .menu ul li.current_page_item{ background:url(/static/images/bg.png) no-repeat 0 -84px;} 58 | .menu ul a:link, .menu ul a:visited{ color:#666; text-decoration:none; display:block;} 59 | .menu ul a:hover{ color:#000;} 60 | .menu ul li.current_page_item a:link, .menu ul li.current_page_item a:visited{ color:#000; text-decoration:none; display:block;} 61 | 62 | /* ??????? */ 63 | .navigation{ float:left; width:970px; height:35px;} 64 | .mnavil, .mnavim, .mnavir{ float:left; width:6px; height:36px;} 65 | .mnavil{ background:url(/static/images/bg.png) no-repeat right -39px;} 66 | .mnavim{ width:958px; background:url(/static/images/bg.png) no-repeat 0 -126px; } 67 | .mnavir{ float:right; background:url(/static/images/bg.png) no-repeat right -79px;} 68 | 69 | .main_menu{ margin:5px 6px;} 70 | .main_menu li{ float:left; padding:7px 8px 5px; font-size:14px; background:url(/static/images/bg.png) no-repeat right -181px; } 71 | .main_menu li.lir{ background:none;} 72 | .main_menu li.current-cat a{ color:#FFFF00; text-decoration:underline;} 73 | .main_menu a:link, .main_menu a:visited{ color:#FFF; text-decoration:none; display:block;} 74 | .main_menu a:hover{ color:#FFFF00; text-decoration:underline;} 75 | 76 | /* ????????? */ 77 | .taobao{ margin:0 auto; width:970px;} 78 | .taobaoso{ float:left; margin:10px 0px 0px 30px; width:970px; height:70px;} 79 | 80 | /* ???????? */ 81 | .wrap{ margin:0px auto; width:970px;} 82 | .content{ float:left; width:970px; margin-top:10px;} 83 | .bb_home{ float:left; width:658px; overflow:hidden;} 84 | 85 | /* ??????01 ???? */ 86 | .sidebar1{ float:left; width:198px; height:267px; border:1px solid #CCC; overflow:hidden;} 87 | .special, .sbar1{ margin-bottom:10px;} 88 | .sbar1 h2{ padding:6px 10px 4px; font-size:14px; border-bottom:1px solid #8CC1FC; color:#404040; background:url(/static/images/bg.png) no-repeat 0 -177px;} 89 | .sbar1_content{ margin:10px 0px 8px;} 90 | .promo{ margin-left:6px;} 91 | .promo li{ margin:6px 0px 7px; *margin:5px 0px 5px; padding-left:10px; height:14px; line-height:14px; background:url(/static/images/spot_cats.gif) no-repeat 0 5px; overflow:hidden;} 92 | .promo li ul li{ padding-left:10px; line-height:22px; font-size:12px; font-weight:normal; background:url(/static/images/spot_cats.gif) no-repeat 0 10px;} 93 | 94 | /* baobei tuijian */ 95 | .bb_recommend{ float:left; margin-left:10px; padding:5px 0px; width:446px; height:257px; border:1px solid #CCC; overflow:hidden;} 96 | .baobei{ border-bottom:1px dashed #DDD;} 97 | .baobei h2{ width:426px; line-height:20px; padding:12px 10px 6px; font-size:16px;} 98 | .baobei_detail{ padding:0px 10px 5px; color:#333; line-height:20px;} 99 | .baobei_detail p{ padding:6px 0px;} 100 | 101 | .allcats{ float:left; margin-left:-10px;} 102 | 103 | /* ??????????? */ 104 | .bb_cats{ float:left; margin:10px 0px 0px; width:334px;} 105 | .cats_content{ margin:0px 0px 0px 10px; height:150px; border:1px solid #CCC;} 106 | .cats_content h2{ padding:7px 0px 5px 8px; font-size:14px; background:url(/static/images/bg.png) no-repeat 0 -255px;} 107 | .cats_content ul{ float:left; padding:10px 5px 12px 10px;} 108 | .cats_content ul li{ margin:6px 0px 2px; padding-left:12px; width:290px; height:16px; font-size:14px; background:url(/static/images/spot_cats.gif) no-repeat 0 6px; overflow:hidden;} 109 | .cats_content ul li a:link, .cats_content ul li a:visited{ color:#333;} 110 | .cats_content ul li a:hover{ color:#BD0A01;} 111 | 112 | /* ??????02 ???? */ 113 | .sidebar2 ul{ margin:0 auto;} 114 | .sidebar2{ float:right; width:302px;} 115 | .sidebar2 li{ margin-bottom:10px; background:#FFFBEE;} 116 | .sidebar2 h2{ padding:7px 0px 5px 8px; font-size:14px; background:url(/static/images/bg.png) no-repeat right -232px;} 117 | .sidebar2 li ul{ padding:10px 10px; border:1px solid #CCC;} 118 | .sidebar2 li ul li{ margin-bottom:0px; padding:6px 0px 2px 12px; width:268px; height:14px; font-size:13px; background:url(/static/images/spot_cats.gif) no-repeat 0 12px; overflow:hidden;} 119 | .sidebar2 h2 a:link, .sidebar2 h2 a:visited{ color:#000;} 120 | .sidebar2 h2 a:hover{ color:#BD0A01;} 121 | 122 | 123 | /* ?????? */ 124 | .subnavi{ float:left; width:658px; margin-bottom:10px; text-indent:8px; height:28px; line-height:28px; border-bottom:1px solid #CCC; background:#F8F8F8; color:#000000;} 125 | .subnavi .subnavi-l{ float:left; width:420px; height:28px; line-height:28px; overflow:hidden;} 126 | .subnavi .subnavi-r{ float:right; width:500px; height:28px; line-height:28px; overflow:hidden;} 127 | .subnavi a:link, .subnavi a:visited{color:#333333; text-decoration:none; font-weight:normal;} 128 | .subnavi a:hover{ color:#CC0000; text-decoration:underline;} 129 | 130 | /** ?б?? **/ 131 | .taobaobei{ float:left; width:658px; border:1px solid #CCC; overflow:hidden;} 132 | .bb_post{} 133 | .bb_list{ width:98%; margin:0 1%; padding-bottom:5px; border-bottom:1px dashed #CCC;} 134 | .bb_list_page{ border-bottom:none;} 135 | .bb_list h2{ width:96%; line-height:30px; padding:10px 10px 8px; font-size:14px;} 136 | .bb_detail{ padding:0px 10px 5px; color:#333; line-height:20px;} 137 | .bb_detail p{ width:616px; padding:8px 0px;} 138 | .bb_list h2 a:link, .bb_list h2 a:visited{ color:#000; text-decoration:none;} 139 | .bb_list h2 a:hover{ color:#C30; text-decoration:underline;} 140 | .bb_date{ float:right; margin:-28px 8px 0px 0px; color:#666666;} 141 | 142 | /* ????? */ 143 | .baobei_info{ font-size:14px;} 144 | .baobei_info h3, .baobei_info h4{ width:98%; margin:20px 0px 15px; padding:5px; font-size:16px; font-weight:bold;} 145 | .baobei_info h3{ color:#660066; border-bottom:2px solid #666;} 146 | .baobei_info h4{ color:#005B5B; border-bottom:2px solid #666;} 147 | .baobei_info p{ line-height:26px;} 148 | .baobei_info ol li{ margin:10px 10px 10px 20px; list-style:square; line-height:22px; color:#666;} 149 | .baobei_info ul li{ margin:10px 10px 10px 20px; list-style:decimal; line-height:22px; color:#666;} 150 | .txtcenter{ text-align:center; font-size:24px !important;} 151 | .descmid{ margin:0px auto 14px; text-align:center; border-bottom:1px solid #EEE; color:#999;} 152 | .descmid label{ padding:0px 10px 0px 20px; line-height:22px;} 153 | .page-date{ background:url(/static/images/icon.gif) no-repeat 1px 1px;} 154 | .page-cats{ background:url(/static/images/icon.gif) no-repeat 1px -23px;} 155 | .page-views{ background:url(/static/images/icon.gif) no-repeat 1px -45px;} 156 | .page-comments{ background:url(/static/images/icon.gif) no-repeat 1px -66px;} 157 | 158 | /* ???? ???? */ 159 | .post_foot_pro_next{float:left; padding:10px 0px;} 160 | .pro_next{float:left; width:500px; margin:5px 10px; overflow:hidden; } 161 | 162 | 163 | /* ??? */ 164 | .page_navi{ float:left; width:100%; height:45px; line-height:45px; text-align:center; background:url(/static/images/bg_pagenavi.jpg) no-repeat left center; } 165 | 166 | /* ?????????? */ 167 | .relran{ width:99%; margin:0px 0px 5px 0px;} 168 | .relran h3{ float:left; width:100%; margin:10px 0px; padding:8px 0px 5px; text-indent:8px; font-size:14px; font-weight:bold; background:#F3F3F3; border-bottom:1px solid #BBC5CC; } 169 | .relran .relran_cont{ float:left; width:99%; margin:5px 5px 10px 5px;} 170 | .relran_cont ul{ margin:0px 0px; } 171 | .relran ul li{ float:left; width:500px; padding:6px 0px 2px 12px; width:500px; height:16px; font-size:14px; background:url(/static/images/spot_cats.gif) no-repeat 0 12px; } 172 | 173 | /* ???? */ 174 | #comments{ width:100%; margin:10px 0px; padding:8px 0px 5px; text-indent:8px; background:#F3F3F3; border-bottom:1px solid #BBC5CC; } 175 | .commentlist{ } 176 | .commentlist p{ text-indent:0px;} 177 | .commentlist a:link, .commentlist a:visited{ background:none; color:#454545;} 178 | .commentlist a:hover{ background:none; color:#CC0000; text-decoration:underline;} 179 | .commentlist li{ float:left; margin:5px 0px; width:96%; padding:15px 10px 5px 10px; background:#FFF; border:1px solid #BBC5CC;} 180 | .commentlist li.alt{ background:#FFFAF4; border:1px solid #BBC5CC;} 181 | .commentlist li .gravatar{ float:left; width:48px; margin:0px 8px 5px 0px; padding:1px 1px; text-align:center; border:1px solid #C7C7C7;} 182 | .commentlist li .gravatar img{ margin:0px !important; padding:0px !important;} 183 | .commentlist li .floor{ float:left; width:48px; margin-top:1px; padding:2px 0px 1px; text-align:center; border-top:1px solid #A7B6BE; background:F8F8F8; color:#999999;} 184 | .commentlist li .authordata{ float:right; width:480px;} 185 | .commentlist li .commentmetadata{ float:right; color:#999999;} 186 | .commentlist li .commentcontent{ float:right; width:480px;} 187 | #editcomment{ float:left; font-size:14px;} 188 | #editcomment p{ padding:10px 10px 5px;} 189 | #author, #email, #url{ margin-left:8px; width:40%; border:1px solid #CCCCCC; color:#906; font-weight:bold; font-size:14px; background:#FCFCFC; padding:5px 3px;} 190 | 191 | #submit{ margin-bottom:15px;margin-top:5px;padding:2px;} 192 | #respond{ float:left; width:100%; margin:10px 0px; padding:8px 0px 5px; text-indent:8px; background:#F3F3F3; border-bottom:1px solid #BBC5CC; } 193 | #comment{ margin:-23px 0px 0px 72px; padding:8px 5px; width:80%; color:#333; font-size:14px; border:1px solid #CCCCCC;} 194 | 195 | #but_submit{ margin-left:72px;} 196 | #submit{ float:left; width:220px; height:32px; font-size:18px; font-weight:bold; letter-spacing:3px;} 197 | #ctrl_enter{ float:left; margin:16px 0px 0px 5px; color:#066283; font-weight:bold;} 198 | .submit_hover{ border:2px solid #FF6600;} 199 | 200 | /* ???????? */ 201 | .flink{ float:left; margin:15px 0px 0px; width:970px; } 202 | .flink h4{ padding:6px 10px 4px; font-size:12px; border:1px solid #E1E1E1; border-bottom:none; color:#444; background-color:#F4F4F4;} 203 | .fsites{ float:left; width:968px; border:1px solid #E1E1E1; padding:8px 0px;} 204 | .sitesPic{ margin:0px 10px;} 205 | .sitesPic li{ float:left; margin:3px 2px 2px; height:32px; white-space:nowrap;} 206 | .sitesPic li img{ width:88px;height:31px; border:1px solid #FFF;} 207 | .sitestxt li{ float:left; margin:3px 5px 2px; height:20px; white-space:nowrap;} 208 | 209 | /* ??? */ 210 | .foot{ margin:10px auto; width:970px; padding:10px 0px; border-top:1px solid #DDD; color:#999;} 211 | .foot p{ padding:3px 0px; text-align:center;} 212 | .foot a:link,.foot a:visited{ color:#666;} 213 | .foot-navi{ margin:0 auto; text-align:center;} 214 | .foot-menu{ text-align:center;} 215 | .foot-menu li{ float:left;} 216 | 217 | #wshare{ 218 | margin: 0 auto; 219 | width: 344px; 220 | height: 27px;} 221 | -------------------------------------------------------------------------------- /app/core/module/static/sitemap_baidu.xml: -------------------------------------------------------------------------------- 1 | http://www.tigang.net2016-02-17T13:02:22+00:00daily1.0http://www.tigang.net/shuxue/gong-shi-kou-jue.html2011-09-02T06:42:26+00:00monthly0.6http://www.tigang.net/wuli/wu-li-ke-ben-mu-lu-2.html2011-06-12T02:35:12+00:00monthly0.6http://www.tigang.net/shuxue/4-1-ji-he-zheng-ming-xuan-jiang.html2011-06-12T02:09:43+00:00monthly0.6http://www.tigang.net/wuli/wu-li-ke-ben-mu-lu-1.html2011-02-08T01:37:03+00:00monthly0.6http://www.tigang.net/huaxue/bi-xiu-2-fang-cheng-shi-1.html2011-01-03T03:17:03+00:00monthly0.6http://www.tigang.net/yuwen/bi-xiu-1-wen-yan-wen-2.html2010-11-20T15:03:21+00:00monthly0.6http://www.tigang.net/yuwen/bi-xiu-1-wen-yan-wen-1.html2010-11-20T14:55:42+00:00monthly0.6http://www.tigang.net/yuwen/bi-xiu-2-wen-yan-wen-1.html2010-11-20T14:34:44+00:00monthly0.6http://www.tigang.net/yuwen/bi-xiu-2-wen-yan-wen-2.html2010-11-20T14:29:35+00:00monthly0.6http://www.tigang.net/huaxue/bi-xiu-yi-fang-cheng-shi-2.html2010-11-16T13:12:50+00:00monthly0.6http://www.tigang.net/huaxue/bi-xiu-yi-fang-cheng-shi-1.html2010-11-14T01:06:49+00:00monthly0.6http://www.tigang.net/lishi/bixiusan-ba.html2010-10-08T01:51:45+00:00monthly0.6http://www.tigang.net/lishi/bixiusan-qi.html2010-10-08T01:48:16+00:00monthly0.6http://www.tigang.net/lishi/bixiusan-liu.html2010-10-08T01:43:00+00:00monthly0.6http://www.tigang.net/lishi/bixiusan-wu.html2010-10-08T01:39:21+00:00monthly0.6http://www.tigang.net/lishi/bixiusan-si.html2010-10-08T01:29:47+00:00monthly0.6http://www.tigang.net/lishi/bixiusan-san.html2010-10-06T17:00:26+00:00monthly0.6http://www.tigang.net/lishi/bixiusan-er.html2010-10-06T11:37:05+00:00monthly0.6http://www.tigang.net/lishi/bixiusan-yi.html2010-10-06T11:29:52+00:00monthly0.6http://www.tigang.net/yingyu/unit5-theme-parks.html2010-09-23T05:34:34+00:00monthly0.6http://www.tigang.net/yingyu/unit4-body-language.html2010-09-23T05:28:04+00:00monthly0.6http://www.tigang.net/yingyu/unit3-a-taste-of-english-humour.html2010-09-23T05:21:29+00:00monthly0.6http://www.tigang.net/yingyu/unit2-working-the-land.html2010-09-02T02:00:17+00:00monthly0.6http://www.tigang.net/yingyu/unit1-women-of-achievement.html2010-09-02T01:56:14+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-san-unit5-canada-the-ture-north.html2010-09-02T01:47:13+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-san-unit3-unit4-astronomy-the-science-of-the-stars.html2010-09-02T01:47:02+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-san-unit3-the-miliion-pound-bank-note.html2010-09-02T01:46:50+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-san-unit2-healthy-eating.html2010-09-02T01:46:33+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-er-unit5-music.html2010-09-01T13:10:25+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-san-unit1-festivals-around-the-world.html2010-09-01T12:18:34+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-er-8.html2010-09-01T10:52:23+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-yi-unit-1-friendship.html2010-08-31T02:05:06+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-er-unit2-the-olympic-games.html2010-08-31T02:04:16+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-er-unit4-wildlife-protection.html2010-08-31T02:04:08+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-er-unit3-computer.html2010-08-31T01:59:16+00:00monthly0.6http://www.tigang.net/shengwu/sheng-wu-xuan-xiu-3-5-sheng-tai-gong-cheng.html2010-08-31T01:53:44+00:00monthly0.6http://www.tigang.net/shengwu/sheng-wu-xuan-xiu-3-4-lun-li-wen-ti.html2010-08-31T01:50:02+00:00monthly0.6http://www.tigang.net/shengwu/sheng-wu-xuan-xiu-3-pei-tai-gong-cheng.html2010-08-31T01:46:26+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-yi-1.html2010-08-30T12:03:16+00:00monthly0.6http://www.tigang.net/shengwu/sheng-wu-bi-xiu-1-2.html2010-08-30T12:03:06+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-yi-2.html2010-08-30T12:02:57+00:00monthly0.6http://www.tigang.net/shengwu/sheng-wu-xuan-xiu-3-2-xi-bao-gong-cheng.html2010-08-30T11:55:23+00:00monthly0.6http://www.tigang.net/shengwu/sheng-wu-xuan-xiu-3-1-ji-yin-gong-cheng.html2010-08-30T11:37:20+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-er-unit1-cultural-relics.html2010-08-30T11:17:22+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-yi-unit5-nelson-mandela-a-modern-hero.html2010-08-30T03:08:53+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-yi-unit4-earthquakes.html2010-08-30T03:08:46+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-yi-unit3-travel-journal.html2010-08-30T03:08:38+00:00monthly0.6http://www.tigang.net/yingyu/ying-yu-bi-xiu-yi-unit2-english-around-the-world.html2010-08-30T03:08:29+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-yi-3.html2010-08-30T03:08:13+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-yi-4.html2010-08-30T03:08:07+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-yi-5.html2010-08-30T03:07:59+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-yi-6.html2010-08-30T03:07:48+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-yi-8.html2010-08-30T03:07:42+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-yi-7.html2010-08-30T03:06:39+00:00monthly0.6http://www.tigang.net/shengwu/sheng-wu-bi-xiu-1-3.html2010-08-30T02:45:16+00:00monthly0.6http://www.tigang.net/shengwu/sheng-wu-bi-xiu-1-4.html2010-08-29T10:40:17+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-er-7.html2010-08-03T03:07:07+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-er-6.html2010-08-03T03:03:57+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-er-4.html2010-08-03T03:00:31+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-er-2.html2010-08-03T03:00:25+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-er-3.html2010-08-03T03:00:17+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-er-5.html2010-08-03T03:00:06+00:00monthly0.6http://www.tigang.net/lishi/li-shi-bi-xiu-er-1.html2010-08-03T02:40:13+00:00monthly0.6http://www.tigang.net/wuli/wu-li-bi-xiu-yi-zhi-shi-dian-3.html2010-07-19T14:28:07+00:00monthly0.6http://www.tigang.net/wuli/wu-li-bi-xiu-yi-zhi-shi-dian-2.html2010-07-19T13:48:42+00:00monthly0.6http://www.tigang.net/wuli/wu-li-bi-xiu-yi-zhi-shi-dian-1.html2010-07-19T11:08:08+00:00monthly0.6http://www.tigang.net/zhengzhi/zheng-zhi-sheng-huo-4.html2010-07-16T03:58:04+00:00monthly0.6http://www.tigang.net/zhengzhi/zheng-zhi-sheng-huo-3.html2010-07-16T03:56:13+00:00monthly0.6http://www.tigang.net/zhengzhi/zheng-zhi-sheng-huo-1.html2010-07-16T03:44:16+00:00monthly0.6http://www.tigang.net/zhengzhi/zheng-zhi-sheng-huo-2.html2010-07-16T03:42:46+00:00monthly0.6http://www.tigang.net/zhengzhi/jing-ji-sheng-huo-4.html2010-07-16T03:36:52+00:00monthly0.6http://www.tigang.net/zhengzhi/jing-ji-sheng-huo-3.html2010-07-16T03:36:44+00:00monthly0.6http://www.tigang.net/zhengzhi/jing-ji-sheng-huo-2.html2010-07-16T03:36:37+00:00monthly0.6http://www.tigang.net/zhengzhi/jing-ji-sheng-huo-1.html2010-07-16T03:36:28+00:00monthly0.6http://www.tigang.net/about2010-11-20T15:41:28+00:00weekly0.3http://www.tigang.net/jiaofushu2010-09-23T04:06:29+00:00weekly0.3http://www.tigang.net/category/%e6%9c%aa%e5%88%86%e7%b1%bb2016-02-17T13:02:22+00:00Weekly0.3http://www.tigang.net/category/huaxue2016-02-17T13:02:22+00:00Weekly0.3http://www.tigang.net/category/lishi2016-02-17T13:02:22+00:00Weekly0.3http://www.tigang.net/category/dili2016-02-17T13:02:22+00:00Weekly0.3http://www.tigang.net/category/zhengzhi2016-02-17T13:02:22+00:00Weekly0.3http://www.tigang.net/category/shuxue2016-02-17T13:02:22+00:00Weekly0.3http://www.tigang.net/category/wuli2016-02-17T13:02:22+00:00Weekly0.3http://www.tigang.net/category/shengwu2016-02-17T13:02:22+00:00Weekly0.3http://www.tigang.net/category/yingyu2016-02-17T13:02:22+00:00Weekly0.3http://www.tigang.net/category/yuwen2016-02-17T13:02:22+00:00Weekly0.3 -------------------------------------------------------------------------------- /app/core/module/static/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | http://www.tigang.net/ 7 | 2011-09-02T06:42:26+00:00 8 | daily 9 | 1.0 10 | 11 | 12 | http://www.tigang.net/shuxue/gong-shi-kou-jue.html 13 | 2011-09-02T06:42:26+00:00 14 | monthly 15 | 0.2 16 | 17 | 18 | http://www.tigang.net/wuli/wu-li-ke-ben-mu-lu-2.html 19 | 2011-06-12T02:35:12+00:00 20 | monthly 21 | 0.2 22 | 23 | 24 | http://www.tigang.net/shuxue/4-1-ji-he-zheng-ming-xuan-jiang.html 25 | 2011-06-12T02:09:43+00:00 26 | monthly 27 | 0.2 28 | 29 | 30 | http://www.tigang.net/wuli/wu-li-ke-ben-mu-lu-1.html 31 | 2011-02-08T01:37:03+00:00 32 | monthly 33 | 0.2 34 | 35 | 36 | http://www.tigang.net/huaxue/bi-xiu-2-fang-cheng-shi-1.html 37 | 2011-01-03T03:17:03+00:00 38 | monthly 39 | 0.2 40 | 41 | 42 | http://www.tigang.net/about 43 | 2010-11-20T15:41:28+00:00 44 | weekly 45 | 0.6 46 | 47 | 48 | http://www.tigang.net/yuwen/bi-xiu-1-wen-yan-wen-2.html 49 | 2010-11-20T15:03:21+00:00 50 | monthly 51 | 0.2 52 | 53 | 54 | http://www.tigang.net/yuwen/bi-xiu-1-wen-yan-wen-1.html 55 | 2010-11-20T14:55:42+00:00 56 | monthly 57 | 0.2 58 | 59 | 60 | http://www.tigang.net/yuwen/bi-xiu-2-wen-yan-wen-1.html 61 | 2010-11-20T14:34:44+00:00 62 | monthly 63 | 0.2 64 | 65 | 66 | http://www.tigang.net/yuwen/bi-xiu-2-wen-yan-wen-2.html 67 | 2010-11-20T14:29:35+00:00 68 | monthly 69 | 0.2 70 | 71 | 72 | http://www.tigang.net/huaxue/bi-xiu-yi-fang-cheng-shi-2.html 73 | 2010-11-16T13:12:50+00:00 74 | monthly 75 | 0.2 76 | 77 | 78 | http://www.tigang.net/huaxue/bi-xiu-yi-fang-cheng-shi-1.html 79 | 2010-11-14T01:06:49+00:00 80 | monthly 81 | 0.2 82 | 83 | 84 | http://www.tigang.net/lishi/bixiusan-ba.html 85 | 2010-10-08T01:51:45+00:00 86 | monthly 87 | 0.2 88 | 89 | 90 | http://www.tigang.net/lishi/bixiusan-qi.html 91 | 2010-10-08T01:48:16+00:00 92 | monthly 93 | 0.2 94 | 95 | 96 | http://www.tigang.net/lishi/bixiusan-liu.html 97 | 2010-10-08T01:43:00+00:00 98 | monthly 99 | 0.2 100 | 101 | 102 | http://www.tigang.net/lishi/bixiusan-wu.html 103 | 2010-10-08T01:39:21+00:00 104 | monthly 105 | 0.2 106 | 107 | 108 | http://www.tigang.net/lishi/bixiusan-si.html 109 | 2010-10-08T01:29:47+00:00 110 | monthly 111 | 0.2 112 | 113 | 114 | http://www.tigang.net/lishi/bixiusan-san.html 115 | 2010-10-06T17:00:26+00:00 116 | monthly 117 | 0.2 118 | 119 | 120 | http://www.tigang.net/lishi/bixiusan-er.html 121 | 2010-10-06T11:37:05+00:00 122 | monthly 123 | 0.2 124 | 125 | 126 | http://www.tigang.net/lishi/bixiusan-yi.html 127 | 2010-10-06T11:29:52+00:00 128 | monthly 129 | 0.2 130 | 131 | 132 | http://www.tigang.net/yingyu/unit5-theme-parks.html 133 | 2010-09-23T05:34:34+00:00 134 | monthly 135 | 0.2 136 | 137 | 138 | http://www.tigang.net/yingyu/unit4-body-language.html 139 | 2010-09-23T05:28:04+00:00 140 | monthly 141 | 0.2 142 | 143 | 144 | http://www.tigang.net/yingyu/unit3-a-taste-of-english-humour.html 145 | 2010-09-23T05:21:29+00:00 146 | monthly 147 | 0.2 148 | 149 | 150 | http://www.tigang.net/jiaofushu 151 | 2010-09-23T04:06:29+00:00 152 | weekly 153 | 0.6 154 | 155 | 156 | http://www.tigang.net/yingyu/unit2-working-the-land.html 157 | 2010-09-02T02:00:17+00:00 158 | monthly 159 | 0.2 160 | 161 | 162 | http://www.tigang.net/yingyu/unit1-women-of-achievement.html 163 | 2010-09-02T01:56:14+00:00 164 | monthly 165 | 0.2 166 | 167 | 168 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-san-unit5-canada-the-ture-north.html 169 | 2010-09-02T01:47:13+00:00 170 | monthly 171 | 0.2 172 | 173 | 174 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-san-unit3-unit4-astronomy-the-science-of-the-stars.html 175 | 2010-09-02T01:47:02+00:00 176 | monthly 177 | 0.2 178 | 179 | 180 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-san-unit3-the-miliion-pound-bank-note.html 181 | 2010-09-02T01:46:50+00:00 182 | monthly 183 | 0.2 184 | 185 | 186 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-san-unit2-healthy-eating.html 187 | 2010-09-02T01:46:33+00:00 188 | monthly 189 | 0.2 190 | 191 | 192 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-er-unit5-music.html 193 | 2010-09-01T13:10:25+00:00 194 | monthly 195 | 0.2 196 | 197 | 198 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-san-unit1-festivals-around-the-world.html 199 | 2010-09-01T12:18:34+00:00 200 | monthly 201 | 0.2 202 | 203 | 204 | http://www.tigang.net/lishi/li-shi-bi-xiu-er-8.html 205 | 2010-09-01T10:52:23+00:00 206 | monthly 207 | 0.2 208 | 209 | 210 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-yi-unit-1-friendship.html 211 | 2010-08-31T02:05:06+00:00 212 | monthly 213 | 0.2 214 | 215 | 216 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-er-unit2-the-olympic-games.html 217 | 2010-08-31T02:04:16+00:00 218 | monthly 219 | 0.2 220 | 221 | 222 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-er-unit4-wildlife-protection.html 223 | 2010-08-31T02:04:08+00:00 224 | monthly 225 | 0.2 226 | 227 | 228 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-er-unit3-computer.html 229 | 2010-08-31T01:59:16+00:00 230 | monthly 231 | 0.2 232 | 233 | 234 | http://www.tigang.net/shengwu/sheng-wu-xuan-xiu-3-5-sheng-tai-gong-cheng.html 235 | 2010-08-31T01:53:44+00:00 236 | monthly 237 | 0.2 238 | 239 | 240 | http://www.tigang.net/shengwu/sheng-wu-xuan-xiu-3-4-lun-li-wen-ti.html 241 | 2010-08-31T01:50:02+00:00 242 | monthly 243 | 0.2 244 | 245 | 246 | http://www.tigang.net/shengwu/sheng-wu-xuan-xiu-3-pei-tai-gong-cheng.html 247 | 2010-08-31T01:46:26+00:00 248 | monthly 249 | 0.2 250 | 251 | 252 | http://www.tigang.net/lishi/li-shi-bi-xiu-yi-1.html 253 | 2010-08-30T12:03:16+00:00 254 | monthly 255 | 0.2 256 | 257 | 258 | http://www.tigang.net/shengwu/sheng-wu-bi-xiu-1-2.html 259 | 2010-08-30T12:03:06+00:00 260 | monthly 261 | 0.2 262 | 263 | 264 | http://www.tigang.net/lishi/li-shi-bi-xiu-yi-2.html 265 | 2010-08-30T12:02:57+00:00 266 | monthly 267 | 0.2 268 | 269 | 270 | http://www.tigang.net/shengwu/sheng-wu-xuan-xiu-3-2-xi-bao-gong-cheng.html 271 | 2010-08-30T11:55:23+00:00 272 | monthly 273 | 0.2 274 | 275 | 276 | http://www.tigang.net/shengwu/sheng-wu-xuan-xiu-3-1-ji-yin-gong-cheng.html 277 | 2010-08-30T11:37:20+00:00 278 | monthly 279 | 0.2 280 | 281 | 282 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-er-unit1-cultural-relics.html 283 | 2010-08-30T11:17:22+00:00 284 | monthly 285 | 0.2 286 | 287 | 288 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-yi-unit5-nelson-mandela-a-modern-hero.html 289 | 2010-08-30T03:08:53+00:00 290 | monthly 291 | 0.2 292 | 293 | 294 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-yi-unit4-earthquakes.html 295 | 2010-08-30T03:08:46+00:00 296 | monthly 297 | 0.2 298 | 299 | 300 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-yi-unit3-travel-journal.html 301 | 2010-08-30T03:08:38+00:00 302 | monthly 303 | 0.2 304 | 305 | 306 | http://www.tigang.net/yingyu/ying-yu-bi-xiu-yi-unit2-english-around-the-world.html 307 | 2010-08-30T03:08:29+00:00 308 | monthly 309 | 0.2 310 | 311 | 312 | http://www.tigang.net/category/huaxue 313 | weekly 314 | 0.3 315 | 316 | 317 | http://www.tigang.net/category/lishi 318 | weekly 319 | 0.3 320 | 321 | 322 | http://www.tigang.net/category/zhengzhi 323 | weekly 324 | 0.3 325 | 326 | 327 | http://www.tigang.net/category/shuxue 328 | weekly 329 | 0.3 330 | 331 | 332 | http://www.tigang.net/category/wuli 333 | weekly 334 | 0.3 335 | 336 | 337 | http://www.tigang.net/category/shengwu 338 | weekly 339 | 0.3 340 | 341 | 342 | http://www.tigang.net/category/yingyu 343 | weekly 344 | 0.3 345 | 346 | 347 | http://www.tigang.net/category/yuwen 348 | weekly 349 | 0.3 350 | 351 | 352 | http://www.tigang.net/2011/09 353 | 2011-09-02T06:42:26+00:00 354 | yearly 355 | 0.3 356 | 357 | 358 | http://www.tigang.net/2011/06 359 | 2011-06-12T02:02:55+00:00 360 | yearly 361 | 0.3 362 | 363 | 364 | http://www.tigang.net/2011/01 365 | 2011-01-03T03:17:03+00:00 366 | yearly 367 | 0.3 368 | 369 | 370 | http://www.tigang.net/2010/11 371 | 2010-11-22T12:33:09+00:00 372 | yearly 373 | 0.3 374 | 375 | 376 | http://www.tigang.net/2010/10 377 | 2010-10-19T02:05:54+00:00 378 | yearly 379 | 0.3 380 | 381 | 382 | http://www.tigang.net/2010/09 383 | 2010-09-28T05:30:08+00:00 384 | yearly 385 | 0.3 386 | 387 | 388 | http://www.tigang.net/2010/08 389 | 2010-08-30T11:37:20+00:00 390 | yearly 391 | 0.3 392 | 393 | 394 | http://www.tigang.net/2010/07 395 | 2010-07-28T16:25:18+00:00 396 | yearly 397 | 0.3 398 | 399 | 400 | http://www.tigang.net/tag/pep 401 | weekly 402 | 0.3 403 | 404 | 405 | http://www.tigang.net/tag/hua-xue-bi-xiu-yi 406 | weekly 407 | 0.3 408 | 409 | 410 | http://www.tigang.net/tag/hua-xue-bi-xiu-er 411 | weekly 412 | 0.3 413 | 414 | 415 | http://www.tigang.net/tag/li-shi-bi-xiu-yi 416 | weekly 417 | 0.3 418 | 419 | 420 | http://www.tigang.net/tag/li-shi-bi-xiu-san 421 | weekly 422 | 0.3 423 | 424 | 425 | http://www.tigang.net/tag/li-shi-bi-xiu-er 426 | weekly 427 | 0.3 428 | 429 | 430 | http://www.tigang.net/tag/li-shi-di-yi-dan-yuan 431 | weekly 432 | 0.3 433 | 434 | 435 | http://www.tigang.net/tag/li-shi-di-7-dan-yuan 436 | weekly 437 | 0.3 438 | 439 | 440 | http://www.tigang.net/tag/li-shi-di-3-dan-yuan 441 | weekly 442 | 0.3 443 | 444 | 445 | http://www.tigang.net/tag/li-shi-di-er-dan-yuan 446 | weekly 447 | 0.3 448 | 449 | 450 | http://www.tigang.net/tag/li-shi-di-5-dan-yuan 451 | weekly 452 | 0.3 453 | 454 | 455 | http://www.tigang.net/tag/li-shi-di-8-dan-yuan 456 | weekly 457 | 0.3 458 | 459 | 460 | http://www.tigang.net/tag/li-shi-di-6-dan-yuan 461 | weekly 462 | 0.3 463 | 464 | 465 | http://www.tigang.net/tag/li-shi-di-4-dan-yuan 466 | weekly 467 | 0.3 468 | 469 | 470 | http://www.tigang.net/tag/kou-jue 471 | weekly 472 | 0.3 473 | 474 | 475 | http://www.tigang.net/tag/zheng-zhi-bi-xiu-yi 476 | weekly 477 | 0.3 478 | 479 | 480 | http://www.tigang.net/tag/zheng-zhi-bi-xiu-er 481 | weekly 482 | 0.3 483 | 484 | 485 | http://www.tigang.net/tag/zheng-zhi-di-1-dan-yuan 486 | weekly 487 | 0.3 488 | 489 | 490 | http://www.tigang.net/tag/zheng-zhi-di-3-dan-yuan 491 | weekly 492 | 0.3 493 | 494 | 495 | http://www.tigang.net/tag/zheng-zhi-di-2-dan-yuan 496 | weekly 497 | 0.3 498 | 499 | 500 | http://www.tigang.net/tag/zheng-zhi-di-4-dan-yuan 501 | weekly 502 | 0.3 503 | 504 | 505 | http://www.tigang.net/tag/ji-he-zheng-ming-xuan-jiang 506 | weekly 507 | 0.3 508 | 509 | 510 | http://www.tigang.net/tag/wenyanwen 511 | weekly 512 | 0.3 513 | 514 | 515 | http://www.tigang.net/tag/wu-li-bi-xiu-yi 516 | weekly 517 | 0.3 518 | 519 | 520 | http://www.tigang.net/tag/wu-li-di-yi-zhang 521 | weekly 522 | 0.3 523 | 524 | 525 | http://www.tigang.net/tag/wu-li-di-san-zhang 526 | weekly 527 | 0.3 528 | 529 | 530 | http://www.tigang.net/tag/wu-li-di-er-zhang 531 | weekly 532 | 0.3 533 | 534 | 535 | http://www.tigang.net/tag/sheng-wu-zhuan-ti-1 536 | weekly 537 | 0.3 538 | 539 | 540 | http://www.tigang.net/tag/sheng-wu-zhuan-ti-2 541 | weekly 542 | 0.3 543 | 544 | 545 | http://www.tigang.net/tag/sheng-wu-zhuan-ti-3 546 | weekly 547 | 0.3 548 | 549 | 550 | http://www.tigang.net/tag/sheng-wu-zhuan-ti-4 551 | weekly 552 | 0.3 553 | 554 | 555 | http://www.tigang.net/tag/sheng-wu-zhuan-ti-5 556 | weekly 557 | 0.3 558 | 559 | 560 | http://www.tigang.net/tag/sheng-wu-bi-xiu-yi 561 | weekly 562 | 0.3 563 | 564 | 565 | http://www.tigang.net/tag/sheng-wu-di-san-zhang 566 | weekly 567 | 0.3 568 | 569 | 570 | http://www.tigang.net/tag/sheng-wu-di-er-zhang 571 | weekly 572 | 0.3 573 | 574 | 575 | http://www.tigang.net/tag/sheng-wu-di-si-zhang 576 | weekly 577 | 0.3 578 | 579 | 580 | http://www.tigang.net/tag/sheng-wu-xuan-xiu-3 581 | weekly 582 | 0.3 583 | 584 | 585 | http://www.tigang.net/tag/mulu 586 | weekly 587 | 0.3 588 | 589 | 590 | http://www.tigang.net/tag/unit-1 591 | weekly 592 | 0.3 593 | 594 | 595 | http://www.tigang.net/tag/unit-2 596 | weekly 597 | 0.3 598 | 599 | 600 | http://www.tigang.net/tag/unit-3 601 | weekly 602 | 0.3 603 | 604 | 605 | http://www.tigang.net/tag/unit-4 606 | weekly 607 | 0.3 608 | 609 | 610 | http://www.tigang.net/tag/unit-5 611 | weekly 612 | 0.3 613 | 614 | 615 | http://www.tigang.net/tag/ying-yu-bi-xiu-yi 616 | weekly 617 | 0.3 618 | 619 | 620 | http://www.tigang.net/tag/ying-yu-bi-xiu-san 621 | weekly 622 | 0.3 623 | 624 | 625 | http://www.tigang.net/tag/ying-yu-bi-xiu-er 626 | weekly 627 | 0.3 628 | 629 | 630 | http://www.tigang.net/tag/ying-yu-bi-xiu-si 631 | weekly 632 | 0.3 633 | 634 | 635 | http://www.tigang.net/tag/yu-wen-bi-xiu-yi 636 | weekly 637 | 0.3 638 | 639 | 640 | http://www.tigang.net/tag/yu-wen-bi-xiu-2 641 | weekly 642 | 0.3 643 | 644 | 645 | http://www.tigang.net/tag/tongyong 646 | weekly 647 | 0.3 648 | 649 | 650 | --------------------------------------------------------------------------------