Python Forum

Full Version: Automated Git add/commit/push
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey!

I have a personal ERP I wrote for my small business in python/flask and I was wondering if it would be wise, (security-wise) to automatically push changes that my sqlite.db file have in my python code?

something like so:
@app.route("/create/inventory", methods=["POST"])
def create_inventory():
    # Get form stuff and commit to db
    os.system("git add ./sqlite.db")
    os.system("git commit -m "change db {}".format(datetime.datetime())
    os.system("git push")