Questions tagged as 'flask'

0
answers

Save json every X time in mongodb python flask

The problem I think occurs when you try to do db = mongo.bd.openweathermap, what appears to me by console No handlers could be found for logger "apscheduler.executors.default" from flask import Flask, render_template, request, jsonify, redi...
asked by 05.04.2017 / 16:03
1
answer

TypeError: 'NoneType' object is not iterable in python with sqlalchemy

I write because I can not solve a problem with a query made by my API that is made in Python. This same error does not affect the functioning of the API but I want to remove it anyway because it looks sloppy or clearly not programmed with SQLAlc...
asked by 07.12.2016 / 14:35
0
answers

Post file and data. AJAX - FLASK

My doubt arises as a result of wanting to send a file with data (everything from a form ) to flask to be stored in a directory. This, I could achieve it in a "separate" way. I wanted to know if there was any way to nest these solution...
asked by 22.10.2016 / 17:48
1
answer

How to get values of a model in flask?

I'm trying to get the values of a model in flask, I want to access the values of my model, not a " render_template " record = MyModel.query.filter_by(id=222) But with this I get an SQL query back. The idea is to access as i...
asked by 12.12.2017 / 01:02
1
answer

builtins.KeyError KeyError: 'SQLALCHEMY_TRACK_MODIFICATIONS' (Flask-python)

I am a student. I've been trying to solve this error for hours and I can not find a way to do it: This is the complete error: builtins.KeyError KeyError: 'SQLALCHEMY_TRACK_MODIFICATIONS' Traceback (most recent call last) File "C:\Users\Mar...
asked by 24.03.2017 / 19:15
1
answer

I do a query in a sqlite database with Flask Python and it returns none when there are rows to read

I leave the code @app.route("/") def getInicio(): conn=sqlite3.connect('datala.db') c = conn.cursor() row=c.execute('''SELECT * FROM servicio''') resultado =c.fetchone() print(resultado) conn.close() return "...
asked by 30.11.2018 / 12:59
1
answer

How should you define a regular expression to get the month and year numbers of a date in MySQL?

I would like to obtain the two numbers that correspond to the month of a date in dd-mm-yyyy format using MySQL. So far this: ^\w{2}-("+month+")-+("+year+")$ Using Python, exchange month and year for the corresponding variables, leaving f...
asked by 01.11.2018 / 19:02
0
answers

how to call style file from javascript

I'm doing the integration of the rich text editor SCeditor, and when I have to give the styles I have to enter the path of these, the problem is that I am working with flask, and it does not implement them. I tried the standard way    '../...
asked by 29.10.2018 / 14:59
1
answer

error AttributeError: 'str' object has no attribute 'value' when i use methods in other class Python

I'm doing a project in flask in which I already have about 50 classes with different functionalities, and when I try to return the value of a method in another class I get the error like the following:    AttributeError: 'str' object has no a...
asked by 17.10.2018 / 20:25
0
answers

Flask and html, redirect to another html

I am working with flask and HTML , one of those HTML has to direct me to another HTML when I press a button, how do I have to do it with flask ? I have my index.html , and the login button that should open inis...
asked by 11.10.2018 / 17:09