progress or shit, don't feel like devlogging
This commit is contained in:
parent
5dafe72895
commit
fe5f1e7ecd
11 changed files with 208 additions and 144 deletions
13
app/views.py
13
app/views.py
|
|
@ -13,14 +13,12 @@ from app.forms import (
|
|||
)
|
||||
from app.models import Wishlist, Item
|
||||
from uuid import UUID, uuid4 as uuid
|
||||
from json import JSONEncoder
|
||||
|
||||
from app.scrapers import scrapeSite
|
||||
|
||||
|
||||
@app.route("/")
|
||||
def index():
|
||||
return "hello"
|
||||
return render_template("index.html")
|
||||
|
||||
|
||||
@app.route("/new", methods=["GET", "POST"])
|
||||
|
|
@ -67,8 +65,13 @@ def edit(id: str):
|
|||
|
||||
return redirect(url_for("index"))
|
||||
elif form_wl_editinfo.validate_on_submit() and form_wl_editinfo.wl_edit_submit.data:
|
||||
wishlist.title = str(form_wl_editinfo.title.data)
|
||||
wishlist.description = str(form_wl_editinfo.description.data)
|
||||
if form_wl_editinfo.title.data != "" and form_wl_editinfo.title.data != None:
|
||||
wishlist.title = str(form_wl_editinfo.title.data)
|
||||
if (
|
||||
form_wl_editinfo.description.data != ""
|
||||
and form_wl_editinfo.description.data != None
|
||||
):
|
||||
wishlist.description = str(form_wl_editinfo.description.data)
|
||||
db.session.commit()
|
||||
|
||||
return redirect(url_for("edit", id=id))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue