Relative Content

Tag Archive for pythonflasksqlalchemy

Filter at SQLAlchemy

The use_start_date column in the T_reserve_room table in the database is 2024-06-12 16:18:00 and the use_end_date column is 2024-06-14 19:48:00.

Filter at Python

The use_start_date column in the T_reserve_room table in the database is 2024-06-12 16:18:00
and the use_end_date column is 2024-06-14 19:48:00

Python Flask Sqlalchemy file transfer

from flask import Flask, render_template, request, redirect, url_for, flash from flask_sqlalchemy import SQLAlchemy from user import db, Hasta # user.py’den ilgili sınıfları ve veritabanını içe aktarın app = Flask(__name__) app.config[‘SQLALCHEMY_DATABASE_URI’] = ‘sqlite:///app.db’ app.config[‘SECRET_KEY’] = ‘your_secret_key_here’ db.init_app(app) @app.route(‘/’) def index(): return render_template(“index.html”) @app.route(‘/login’, methods=[‘POST’]) def login(): username = request.form[‘username’] password = request.form[‘password’] # Burada Hasta sınıfını […]