Procházet zdrojové kódy

bug fix: searchform errors from auth routes

control před 3 roky
rodič
revize
10737d9d75

+ 9 - 4
app/accounts.py

@@ -6,7 +6,7 @@ from werkzeug.security import generate_password_hash, check_password_hash
 from .models import User
 from . import db
 
-from .forms import LoginForm, RegForm, MFAForm
+from .forms import LoginForm, RegForm, MFAForm, SearchForm
 
 # MFA
 import pyotp
@@ -17,6 +17,8 @@ accounts = Blueprint('accounts', __name__)
 def login():
     form = LoginForm()
 
+    seform = SearchForm()
+
     if form.validate_on_submit():
         email = form.email.data
         challenge_passwd = form.passwd.data
@@ -33,7 +35,7 @@ def login():
         else:
             flash('Unsucessful Login!', category='error')
     
-    return render_template('login.html', user = current_user, form = form)
+    return render_template('login.html', user = current_user, form = form, seform = SearchForm())
     
 @accounts.route('/logout')
 @login_required
@@ -46,6 +48,7 @@ def register():
     pass_list = list()
 
     form = RegForm()
+    seform = SearchForm()
     
     if form.validate_on_submit():
         email = form.email.data
@@ -84,7 +87,7 @@ def register():
                     return redirect(url_for('dashboards.market'))
                 else:
                     flash('Registration Failed', category='error')
-    return render_template("register.html", user = current_user, form = form)
+    return render_template("register.html", user = current_user, form = form, seform = seform)
 
 
 @accounts.route('/mfa', methods=['GET', 'POST'])
@@ -93,6 +96,8 @@ def mfa():
     user_chal = request.args['user_chal']
     user = User.query.filter_by(id = user_chal).first()
 
+    seform = SearchForm()
+
     # check for existing totphash
     if not user.totphash:
         # generate random secret key for auth
@@ -119,4 +124,4 @@ def mfa():
             return redirect(url_for('accounts.mfa'))
 
 
-    return render_template('mfa.html', secret = secret, form = form, user = user)
+    return render_template('mfa.html', secret = secret, form = form, user = user, seform = seform)

+ 1 - 0
app/dashboards.py

@@ -125,6 +125,7 @@ def profile():
 def create():
     form = CAForm()
 
+    # checks for available art to list
     available_art = collector.check_listing()
 
     seform = SearchForm()

binární
app/database.db


+ 0 - 1
app/lib/collector.py

@@ -50,7 +50,6 @@ def check_listing():
         if not any(la.filehash == art.filehash for la in listed_art):
             available_art.append(art)
 
-
     return available_art
 
 def check_art_listing(filehash):

binární
app/static/repository/AnJxUhcoPIBghcy9.jpeg


binární
app/static/repository/LB0Ix379Cfp5Oa1H.jpg


binární
app/static/repository/aBUEwIIePGtUAn0R.jpeg


binární
app/static/repository/ivfkWrh26doh3Fyd.jpeg


binární
app/static/repository/kTLGDhxQ1XhmL8BD.jpg


binární
app/static/repository/oJvqmOoRefw2aYBl.jpeg