honmaple 8 лет назад
Родитель
Сommit
1b3a4846b4

+ 0 - 19
README.org

@@ -47,16 +47,6 @@
     pip install -r requirements.txt
     #+END_SRC
 
-    Beacause newest *flask_maple* isn't uploaded to pypi
-    you should 
-    #+BEGIN_SRC shell
-      git clone https://github.com/honmaple/flask-maple
-      cd flask-maple
-      pip uninstall flask-maple
-      python setup.py install
-    #+END_SRC
-    to install *flask-maple*
-
 *** Config
     #+BEGIN_SRC shell
     mv config.example config.py
@@ -124,15 +114,6 @@
     pip install -r requirements.txt
     #+END_SRC
 
-    因为最新的*flask-maple*还未上传到pypi,所以
-    #+BEGIN_SRC shell
-      git clone https://github.com/honmaple/flask-maple
-      cd flask-maple
-      pip uninstall flask-maple
-      python setup.py install
-    #+END_SRC
-    来安装*flask-maple*
-    
 *** 配置
     #+BEGIN_SRC shell
     mv config.example config.py

+ 3 - 3
forums/api/auth/views.py

@@ -6,7 +6,7 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2016-10-28 10:26:10 (CST)
-# Last Update:星期六 2017-4-8 12:40:29 (CST)
+# Last Update:星期三 2017-5-10 16:34:50 (CST)
 #          By:
 # Description:
 # **************************************************************************
@@ -19,8 +19,8 @@ from flask_babelex import gettext as _
 from flask_login import current_user, login_required, login_user, logout_user
 from flask_principal import Identity, identity_changed, AnonymousIdentity
 
-from flask_maple.auth.forms import (ForgetForm, LoginForm, RegisterForm,
-                                    form_validate)
+from flask_maple.auth.forms import (ForgetForm, LoginForm, RegisterForm)
+from flask_maple.form import form_validate
 from forums.api.user.models import User
 from forums.common.response import HTTPResponse
 from forums.common.serializer import Serializer

+ 2 - 2
forums/api/collect/views.py

@@ -6,7 +6,7 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2017-03-28 16:15:08 (CST)
-# Last Update:星期六 2017-4-1 20:38:59 (CST)
+# Last Update:星期三 2017-5-10 16:35:10 (CST)
 #          By:
 # Description:
 # **************************************************************************
@@ -14,7 +14,7 @@ from flask import redirect, render_template, request, url_for
 from flask_babelex import gettext as _
 from flask_login import current_user
 
-from flask_maple.auth.forms import form_validate
+from flask_maple.form import form_validate
 from flask_maple.response import HTTPResponse
 from forums.api.forms import (CollectForm, ReplyForm, TopicForm,
                               collect_error_callback, error_callback,

+ 2 - 2
forums/api/search/views.py

@@ -6,7 +6,7 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2017-03-31 17:26:28 (CST)
-# Last Update:星期四 2017-4-20 17:19:6 (CST)
+# Last Update:星期六 2017-5-6 13:59:14 (CST)
 #          By:
 # Description:
 # **************************************************************************
@@ -30,7 +30,7 @@ class SearchView(MethodView):
                 fields = ['title']
             elif include == '2':
                 fields = ['content']
-            results = Topic.query.whoosh_search(
+            results = Topic.query.msearch(
                 keyword, fields=fields).paginate(page, number, True)
             data = {'title': 'Search', 'results': results, 'keyword': keyword}
             return render_template('search/result.html', **data)

+ 2 - 2
forums/api/setting/views.py

@@ -6,7 +6,7 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2016-12-20 22:16:04 (CST)
-# Last Update:星期三 2017-3-29 18:17:0 (CST)
+# Last Update:星期三 2017-5-10 16:35:45 (CST)
 #          By:
 # Description:
 # **************************************************************************
@@ -15,7 +15,7 @@ from flask_login import current_user, logout_user
 from forums.api.forms import (ProfileForm, PasswordForm, PrivacyForm,
                               AvatarForm, BabelForm)
 from forums.common.views import IsConfirmedMethodView as MethodView
-from flask_maple.auth.forms import form_validate
+from flask_maple.form import form_validate
 
 
 def error_callback(url):

+ 2 - 2
forums/api/topic/views.py

@@ -6,7 +6,7 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2016-12-15 22:07:39 (CST)
-# Last Update:星期日 2017-4-9 12:48:18 (CST)
+# Last Update:星期三 2017-5-10 16:35:37 (CST)
 #          By:
 # Description:
 # **************************************************************************
@@ -14,7 +14,7 @@ from flask import Markup, redirect, render_template, request, url_for
 from flask_babelex import gettext as _
 from flask_login import current_user, login_required
 
-from flask_maple.auth.forms import form_validate
+from flask_maple.form import form_validate
 from flask_maple.response import HTTPResponse
 from forums.api.forms import (CollectForm, ReplyForm, TopicForm,
                               collect_error_callback, error_callback,

+ 2 - 2
forums/api/upload/views.py

@@ -6,7 +6,7 @@
 # Author: jianglin
 # Email: xiyang0807@gmail.com
 # Created: 2016-12-21 21:56:41 (CST)
-# Last Update:星期五 2017-4-21 17:48:26 (CST)
+# Last Update:星期三 2017-5-10 16:35:21 (CST)
 #          By:
 # Description:
 # **************************************************************************
@@ -14,7 +14,7 @@ from flask import (url_for, redirect, send_from_directory, current_app,
                    request)
 from flask.views import MethodView
 from flask_login import login_required, current_user
-from flask_maple.auth.forms import form_validate
+from flask_maple.form import form_validate
 from forums.api.forms import AvatarForm
 from werkzeug import secure_filename
 from time import time

+ 1 - 0
requirements.txt

@@ -14,6 +14,7 @@ Flask-Script==2.0.5
 Flask-SQLAlchemy==2.2
 Flask-WTF==0.14.2
 flask-msearch==0.1.2
+flask-maple==0.4.7
 Whoosh==2.7.4
 gevent==1.1.1
 gunicorn==19.4.5