zmiany w produktach i sugestoach / panel
This commit is contained in:
5
app.py
5
app.py
@@ -945,8 +945,8 @@ def list_products():
|
||||
users = User.query.all()
|
||||
users_dict = {user.id: user.username for user in users}
|
||||
|
||||
# Wszystkie sugestie do słownika
|
||||
suggestions = SuggestedProduct.query.all()
|
||||
# Stabilne sortowanie sugestii
|
||||
suggestions = SuggestedProduct.query.order_by(SuggestedProduct.name.asc()).all()
|
||||
suggestions_dict = {s.name.lower(): s for s in suggestions}
|
||||
|
||||
return render_template(
|
||||
@@ -956,6 +956,7 @@ def list_products():
|
||||
suggestions_dict=suggestions_dict
|
||||
)
|
||||
|
||||
|
||||
@app.route('/admin/sync_suggestion/<int:item_id>', methods=['POST'])
|
||||
@login_required
|
||||
def sync_suggestion_ajax(item_id):
|
||||
|
Reference in New Issue
Block a user