I have a little python and java (school) experience under my belt, but nothing professional or complete. I am trying to create a small database using MySQL, which I think I already figured out. I am using Python to build functions that let me edit the database and pull information from it. That too I have already figured out how to do. The last problem is creating something for users to interface with so that they too can edit the database.

The db will be on my own server, I think I can run a full python app from the server. But I was thinking of a web browser interface so users can just go to a web page rather than having to run a .exe or whatever.

From reading, I see suggestions of using Flask. Is that generally correct? I'll have my SQL db, python app(s) going back and forth with each other. And then Flask going back and forth between python and HTML/CSS? Really I just need to have access to html forms that send data to a python function that modifies the db. Or is using just a plain python GUI okay? It would certainly cut down on trying to brush up on my html, css, and javascript.

My brain is just kind of overloaded right now and any help would be appreciated.

  • mr_world [they/them]
    hexagon
    ·
    3 years ago

    I'm not sure how to classify it tbh. I mainly need to generate reports from the db, display images, and then have a sign-in/sign-out system for items. But I would also like to have different users other than myself be able to edit the db as well. Ideally the pages wouldn't be static in terms of the information they display. If one person changes the db, I want that change to show up without the user manually refreshing.

    • reddit [any,they/them]
      ·
      3 years ago

      Gotcha. Depends how you want to architect it then, which in turn probably depends on what you know. Either way, you'll need some JS on the front end checking for updates, but if you do it right you can wait to add that till later. If you want to get a little fancy, you can do that with websockets, but you could also just poll the server every X seconds and update the data. If you don't want the page to actually refresh out from under the user you'll probably want an actual dynamic web page, but if you don't care about that then you can just do static templates served by flask -> put some js in the templates to poll for updates -> have that js refresh the page when there's an update.

      If you want to get really fancy - I've heard rethinkdb is a really interesting project for refreshing display data based on a db query. But very overkill for something like this.