skip to Main Content

Html – I keep getting the same error when making an onclick function passing through jinja variables

I keep getting the error: Uncaught SyntaxError: missing ) after argument list (at bestellen:60:105) this is my html: <div class="gerechten"> {% for gerecht in gerechten %} <div class="Gerechtdiv"> <img src={{gerecht.url}} class="gerechtimg"> <h3 class="GerechtTitel">{{gerecht.gerecht}}</h3> <p class ="GerechtBeschrijving">{{gerecht.beschrijving}}</p> <div class ="BottomGerechtDiv"> <p…


Can Flask return a JSON array of objects?

I am working on a simple CRUD application and I can't return an array of objects in Flask. My db Model is like this: class QrRecord(db.Model): id = db.Column(db.String(256), primary_key=True) name = db.Column(db.String(128), nullable=False) date = db.Column(db.Date, nullable=False) qrType =…


Postgresql – SQLAlchemy – column must appear in the GROUP BY clause or be used in an aggregate function

I am using sqlalchemy with postgresql, Tables Shape[id, name, timestamp, user_id]#user_id referring id column in user table User[id, name] this query - query1 = self.session.query(Shape.timestamp,,, extract('day', Shape.timestamp).label('day'), extract('hour', Shape.timestamp).label('hour'), func.count("total"), ) .join(User, .filter(Shape.timestamp.between(from_datetime, to_datetime)) .group_by(Shape.user_id) .group_by('hour') .all()…

Back To Top