I want to implement the function of , which returns all questions under all tags that the user follows and sorts them in chronological order. Tag and Question are many-to-many, User and Question are one-to-many, and user and tag are many-to-many I ...
< H1 > user table < H1 > class User (db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(40), unique=True) password = db.Column(db.String(128)) < H1 > order form < H1 > class User (db.Model): id = db.Column(...
question I want to query the data of the user signin=0 within a time range in the CarJob_User table. Syntax error: the positional parameter follows the keyword argument. What is wrong with the following code? 2. Code today = datetime.date.tod...
The code in view.py is as follows: . c_location = request.form.getlist ( centering location ) connection = db.engine.connect() mysql = text( "INSERT INTO livingexpenses_coal (c_location) values (:m);" ) result = co...
problem description relationship, with flask sqlalehemy cannot be called. An error message appears TypeError: InstrumentedAttribute object is not callable the environmental background of the problems and what methods you have tried python 3.7...
the problem encountered at present is that when there are multiple conditions in filter Filter, if some conditions are null, it will cause many other conditions to have values but cannot be queried. ...
excuse me, after flask query mysql, plus limit offset, how to determine whether the return value is found or not? r = Lines.query.filter(Lines.jp.like( %% )).limit(10).offset(10) print (r) returns sql string print (r is None) is always False print...
-sharp models class User(db.Model): __tablename__ = users id = db.Column(db.BigInteger, primary_key=True) name = db.Column(db.VARCHAR(50), nullable=False) email = db.Column(db.VARCHAR(200), nullable=False) -sharp NULL mobile ...
want to query the data in the existing data table through flask_sqlalchemy, and find that all the previously written items are created through flask_sqlalchemy and then read and write data. do you have a boss to give me an idea? ...
I generate database tables in the @ manager.shell command line of flask-script. for example, before a model is User , when the table is generated for the first time: db.create_all() at this point, a user table is generated. then add a new tab...
from flask import Flask, session from flask import render_template from flask_script import Manager from flask import url_for from flask import request, jsonify, json from flask_cors import CORS from flask_sqlalchemy import SQLAlchemy import os from fl...
from flask import Flask, session from flask import render_template from flask_script import Manager from flask import url_for from flask import request, jsonify, json from flask_cors import CORS from flask_sqlalchemy import SQLAlchemy import os from f...
after specifying the db.session.add, it is not actually sent to the database for execution. If you need to get the inserted id during session, you need to execute db.session.flush manually is there any way to turn off this "feature " without manually...
problem description when inserting data, username I pass 11 digits, such as 12345678901, the database only stores 1234567890, the first ten digits are intercepted by default, my String (10) is set to 10 the environmental background of the problems ...
problem description for example, I want to create a Wallet object after the User object is successfully session.commit (), and I may need to create another object after the Wallet object is successfully created. I don t want to use functions to encap...
problem description I want to execute the SQL script directly to initialize the database when initializing the flask application. the database is Postgresql. the environmental background of the problems and what methods you have tried flask tutor...
see examples that define the model directly at the start of the program, such as _ _ init__.py, server.py. my idea is to define the model in the corresponding .py file and create it directly when needed. I don t know how to organize the project file a...
A model has data A1 B model has data b1 b1.key1 is a foreign key, associated with the primary key of a1.id is there a problem for me to delete A1 data directly now? db.session.delete (A1) db.session.commit () ...
suddenly there is an idea that if the field changes are complicated when making a query, you can t write the query statement, just like A.query.filter (name== ds ) is written dead. If I need to dynamically switch query fields, especially when there ...
I recently learned Flask s SQLAlchemy,. Suppose I have such a map information table. Map has fields a, b is shaping. I want to query the data of an and b in a specific range, such as result_query = Map.query.filter (1 ...
<template> <div v-if="type == xxx" >< div> type < template> computed:{ type(){ return (ajax) } }...
There is an one-to-one relationship between the data elements in the linear structure, but there are two pointers stored in the nodes of the two-way linked list, pointing to the address of the previous node and the address of the latter node, respective...
if you want to know the advantages and disadvantages and application scenarios of SplQueue in php, usually your own implementation queue is usually implemented with redis s list, and you want to know the difference. Thank you ...
logging in correctly pops up layer login for the first time, but after logging out on my project page, click facebook to log in again to show that the url domain name does not contain an application domain name error what is the cause of the error? Th...
var token = localStorage.getItem( userToken ); if(!token){ alert( ); return false; } var ws = new WebSocket("ws: 127.0.0.1:8081"); when ws.onopen, I intend to send token to the server for verification, but it...