#πŸ”’ How to update an sqlalchemy database?

17 messages Β· Page 1 of 1 (latest)

shrewd cairn
#

I've done a to do list flask app that also has room for documenting what the project is about and what I've learnt while working on it. Currently everything works fine except I can't seem to figure out how to add a button where I can edit my project documentation and chatgpt is just confusing me. Could someone tell me if there's like a specific function in flask for editing an entry?? I don't think I should share the code here since it's quite long but if you want to see it I will add it.

misty lilyBOT
#

@shrewd cairn

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

odd bridge
#

!paste

misty lilyBOT
#
Pasting large amounts of code

So that everyone can easily read your code, you can paste it in this website:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

odd bridge
#

also, it's quite unclear what you even mean, i think you need to describe it a bit better

odd bridge
odd bridge
shrewd cairn
odd bridge
#

or did you want to update the project name?

shrewd cairn
#

yeah, project_desc

odd bridge
# shrewd cairn yeah, project_desc

you will need to create a new route that takes an id (just like you are already doing with the delete and the taskdetail endpoints) and get the data for that entry and then update that field and then update the database by committing that change to the database

shrewd cairn
#

ok. I'm going to try and do it on my own. i'll let you know how it goes. no need to wait for it though since i'm working on some other tasks now. thanks for your help

misty lilyBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.