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…

VIEW QUESTION

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 =…

VIEW QUESTION

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, Shape.name, User.id, extract('day', Shape.timestamp).label('day'), extract('hour', Shape.timestamp).label('hour'), func.count(Shape.id).label("total"), ) .join(User, User.id==Shape.user_id) .filter(Shape.timestamp.between(from_datetime, to_datetime)) .group_by(Shape.user_id) .group_by('hour') .all()…

VIEW QUESTION
Back To Top
Search