diff --git a/APPS/Account/__pycache__/api.cpython-36.pyc b/APPS/Account/__pycache__/api.cpython-36.pyc index 326250c7498d6f131fcd33d42d8c1c1b898eb216..604c17ac133fb0b8161fe426ace5e5cf0ee16779 100644 Binary files a/APPS/Account/__pycache__/api.cpython-36.pyc and b/APPS/Account/__pycache__/api.cpython-36.pyc differ diff --git a/APPS/Account/__pycache__/models.cpython-36.pyc b/APPS/Account/__pycache__/models.cpython-36.pyc index a69f7d5cbdaad5b3bea004bccc84dd81e387194d..9c30bf1f0c5650e447e687fbde713a04c36d85d7 100644 Binary files a/APPS/Account/__pycache__/models.cpython-36.pyc and b/APPS/Account/__pycache__/models.cpython-36.pyc differ diff --git a/APPS/Account/__pycache__/views.cpython-36.pyc b/APPS/Account/__pycache__/views.cpython-36.pyc index 63dcc5bcbd0c0a644a54c76015f6e726be29d798..40fd1509289b3cf8926d4a498baa382496b42d39 100644 Binary files a/APPS/Account/__pycache__/views.cpython-36.pyc and b/APPS/Account/__pycache__/views.cpython-36.pyc differ diff --git a/APPS/Account/api.py b/APPS/Account/api.py index 030aa11c8f392ee48749a2c8f47ebc312eb8e7ee..687edc93c0375c3fe39f17b1514532f1b38b184e 100644 --- a/APPS/Account/api.py +++ b/APPS/Account/api.py @@ -2,11 +2,9 @@ from operator import or_ from flask import render_template, session from flask_mail import Message from flask_restful import Resource, reqparse -<<<<<<< HEAD -from APPS.Account.models import User, user_to_user, UserNext -======= + from APPS.Account.models import * ->>>>>>> e202e7ccbbd97e8cf71abe322444e419554d3cc8 + from APPS.ext import db, mail from APPS.result import Result from setting import Config @@ -94,13 +92,11 @@ class LoginApi(Resource): return Result.get_error_result(msg='密码输入错误') # 记住登录状态 session['username'] = username -<<<<<<< HEAD + session['u_id']=u_id session['user_count']=user_count session['user_is_count']=user_is_count -======= - session['u_id'] = user.u_id ->>>>>>> e202e7ccbbd97e8cf71abe322444e419554d3cc8 + return Result.get_sucess_result_obj(msg='登录成功') diff --git a/APPS/Account/views.py b/APPS/Account/views.py index 44593e25175c349845eb33c67f9419db9059b656..5d7c0f75a1b381d68af92b9c3270cae32a8bd866 100644 --- a/APPS/Account/views.py +++ b/APPS/Account/views.py @@ -18,7 +18,7 @@ def cla(): return render_template('classify.html', classifys=classifys, posts=posts) except Exception as e: try: -<<<<<<< HEAD + u_id=request.args['u_id'] posts = Posts.query.filter(Posts.poster == u_id).all() return render_template('MyPost.html', posts=posts) @@ -36,18 +36,6 @@ def cla(): except Exception as e: print(e) return render_template('index.html',classifys=classifys) -======= - classifys = Classify.query.all() - for i in classifys: - a = i.classify_id - articles = Posts.query.filter(Posts.post_classify_id == a).all() - articles = articles[0:6] - i.art_name = articles - except Exception as e: - print(e) - return render_template('index.html', classifys=classifys) - ->>>>>>> e202e7ccbbd97e8cf71abe322444e419554d3cc8 @classify.route('/login/') def login(): diff --git a/APPS/Detail/__pycache__/views.cpython-36.pyc b/APPS/Detail/__pycache__/views.cpython-36.pyc index e8106010f48493ed554a0492d8007d6cf419e040..37e0827f93495b1852b7abc8a9d892f5f9d97e8e 100644 Binary files a/APPS/Detail/__pycache__/views.cpython-36.pyc and b/APPS/Detail/__pycache__/views.cpython-36.pyc differ diff --git a/APPS/__init__.py b/APPS/__init__.py index d837d67469017c0a9f097c91d5aee1c2c721c556..bf423f3e937a47cd743f348b0e6297d9c61dd1cb 100644 --- a/APPS/__init__.py +++ b/APPS/__init__.py @@ -12,7 +12,7 @@ from setting import Config def create_app(): - app = Flask(__name__, template_folder='templates', root_path='F:\\Flask_project\\bbs',static_folder='static') + app = Flask(__name__, template_folder='templates', root_path=r'D:\project_slj\flask_project\bbs',static_folder='static') diff --git a/APPS/__pycache__/__init__.cpython-36.pyc b/APPS/__pycache__/__init__.cpython-36.pyc index 28e702667c91f117dc8757dac5f618dbc741fcc3..9d516ba7953d8894c9a2b656e4ff2ca196a654a8 100644 Binary files a/APPS/__pycache__/__init__.cpython-36.pyc and b/APPS/__pycache__/__init__.cpython-36.pyc differ diff --git a/APPS/__pycache__/ext.cpython-36.pyc b/APPS/__pycache__/ext.cpython-36.pyc index eda0b5266ffb5d284b51b98968049e92ee341750..a2878280eb88d48e382e4a70648031e58883e22f 100644 Binary files a/APPS/__pycache__/ext.cpython-36.pyc and b/APPS/__pycache__/ext.cpython-36.pyc differ diff --git a/APPS/__pycache__/result.cpython-36.pyc b/APPS/__pycache__/result.cpython-36.pyc index 5983371746a96ad30d9e52fbe53f7a67c1ec67e1..5cd71933f48b22fb8dee17634969cac30a560acb 100644 Binary files a/APPS/__pycache__/result.cpython-36.pyc and b/APPS/__pycache__/result.cpython-36.pyc differ diff --git a/APPS/__pycache__/urls.cpython-36.pyc b/APPS/__pycache__/urls.cpython-36.pyc index ba252e5ca15e23514ab57169a5ea55d69cd2f55f..f2d9cdc3e8a42e496a4b21989f583c51da9729e7 100644 Binary files a/APPS/__pycache__/urls.cpython-36.pyc and b/APPS/__pycache__/urls.cpython-36.pyc differ diff --git a/APPS/comments/__pycache__/api.cpython-36.pyc b/APPS/comments/__pycache__/api.cpython-36.pyc index 885f70fc36246a466c4759012f2c5e878d75fcc0..bef02776bc235c089bdd0244f5a74dfa531b8711 100644 Binary files a/APPS/comments/__pycache__/api.cpython-36.pyc and b/APPS/comments/__pycache__/api.cpython-36.pyc differ diff --git a/APPS/posts/__pycache__/api.cpython-36.pyc b/APPS/posts/__pycache__/api.cpython-36.pyc index 98ac93cd5973a55e638a62e3e63e6cc8b25f73b9..fea4bd17b091a9ecf88e28f508a586597a458106 100644 Binary files a/APPS/posts/__pycache__/api.cpython-36.pyc and b/APPS/posts/__pycache__/api.cpython-36.pyc differ diff --git a/__pycache__/setting.cpython-36.pyc b/__pycache__/setting.cpython-36.pyc index 45cdb25f1f4824677853cec8e2952d587389d6e4..4521a4dfd8659f70b63a20a360637815ed85c622 100644 Binary files a/__pycache__/setting.cpython-36.pyc and b/__pycache__/setting.cpython-36.pyc differ diff --git a/templates/include/Top.html b/templates/include/Top.html index 289fa572e4bfd43043170514b3ba7d361f92ed62..68b534476d2d6a1693af3d4242926b69cf3f85ff 100644 --- a/templates/include/Top.html +++ b/templates/include/Top.html @@ -6,7 +6,7 @@