Most voted "flask" questions
Flask is an MVC microframework written in Python based on Werkzeug and Jinja 2 (and good intentions, according to the official website).
Learn more…176 questions
Sort by count of
-
1
votes1
answer47
viewsSearch and insert do not work together - Flask
Hello, I am doing a job that needs to insert values in the database, return them in a table and be able to delete them through Flask. I am knowing the tool and I could not find solutions. Be able to…
-
1
votes1
answer87
viewsDoes the Flask micro-framework use the Action Based or Component Based architecture?
Was reading about the frameworks Action Based and Component Based. I have already used the Slim micro-framework and know that it is an Action Based framework, IE, more focused on actions, and the…
-
1
votes3
answers155
viewsHow do I catch a backend error and not log into the application?
Guys, good night, I researched several topics and tried several solutions and unfortunately I could not adjust the error. I am developing an application with Angular and my Python backend, at the…
-
1
votes0
answers81
viewsImplementing Web Push Notification using Flask
I’m trying to create a way to implement a web push notification in my project. Using some tutorials I managed to generate an alert with the message I want. #!/usr/bin/env python from flask import…
-
1
votes2
answers136
viewsPython flask Static status 304
The flask is returning me the following error: 127.0.0.1 - - [13/Jun/2019 22:55:07] "GET /destino/17 HTTP/1.1" 200 - 127.0.0.1 - - [13/Jun/2019 22:55:07] "GET /static/css/bootstrap/bootstrap.min.css…
-
1
votes1
answer55
viewsPost with jquery
My python endpoint is working perfectly, I’ve done tests using Postman. The problem is when Javascript will call the method Follow my Javascript code: $("#Submit").click(function() { var info =…
-
1
votes1
answer260
viewsList Python-flask logged-in user post
I’m a beginner in flask and I’m doing an Appweb where the user can register and register and post, is a Virtual Arline system. I built the user with SESSION and can display only his data. In my…
-
1
votes0
answers78
viewsManaging flask error by looping and not redirecting
I set up a server that can send and receive files, with a size limit of 50mb using ['MAX_CONTENT_LENGTH'] = 50 * 1024 * 1024, I also made a Errohandler for Error 413, which is what I get when I send…
-
1
votes1
answer175
viewsFlask only updates after clear browsing history
I am developing a site for study purposes with flask, only I need to clear the browser history whenever I make any changes to my css, I am doing this because the browsers (Chrome, edge and Mozilla…
-
1
votes2
answers765
viewsRead file in previous python folder
so I’m wanting to save a python file in a folder previous to the one running the script ex:my script is in the /app/controllers/script.py directory i want to put the file I will create in the…
-
1
votes1
answer222
viewsHow to return a JSON with special characters in Flask?
When a JSON returns through the methods make_response(jsonify()), my browser can not understand the special characters, how to return JSON in UTF-8 encoding? Follows the code: @app.route('/',…
-
1
votes1
answer637
viewsHow to access data in json and save to a variable in python? flask-api
I am making a very simple Flask Api, I will receive a title and a body in json.. { "title":"Test", "body":"test" } My app.py class is like this from flask import Flask, request, jsonify, json app =…
-
1
votes0
answers90
viewsSeparate related models in Sqlalchemy
I have a model of relational tables: models/Base.py from collections import OrderedDict from src.config.database import db class Base(db.Model): __abstract__ = True models/Model.py from .Base import…
-
1
votes1
answer61
viewsHow to iterate a list in Flask
I have this code in Flask (which uses the Jinja2) {%block content%} {% for i in posts %} {% set x = x + 1 -%} <p style="border: 1px solid black; padding: 5px 5px; border-radius: 5px;">{{ i[x]…
-
1
votes1
answer42
viewsFlask-Migrate in Factory Standard - App error not found
Hello, I’m trying to run the remote: flask db init, but the traceback returns: main/app/Extensions/migrate.py: from flask_migrate import Migrate from main.extensions.sqlalchemy import db migrate =…
-
1
votes0
answers16
viewsError installing Pip install mod-wsgi-httpd
I am trying to install the mod-wsgi-httpd package via the Pip command, but am getting the following error: ... File "c:\python39\lib\urllib\request.py", line 641, in http_error_default raise…
-
1
votes0
answers49
viewsAPI access control using Flask JWT Extended
Hello. I am working on an API (Flask/Python) that should receive requests from an application (React-Native) and a Webapp (Flask/Python). For some requests you will need the login control. I am…
-
0
votes0
answers514
viewsProblems with ajax/json and cross-origin redirect
I have an application, in flask + javascript, that needs to query a url (on a server I don’t have access to), however I get cross-origin redirect error Xmlhttprequest cannot load…
-
0
votes0
answers182
viewsBootstrap not initiating
I’m starting with Flask and I’m using Bootstrap 3.3.7, so I took the example navbar code on their website, but when I start the index Nav bar does not work: and the button looks like bootstrap 4,…
css twitter-bootstrap bootstrap-3 flaskasked 7 years, 8 months ago Vinicius Barbosa de Medeiros 331 -
0
votes1
answer229
viewsFriendly Urls with flask
Good afternoon, I am developing a system using the Flask python framework and would like to know how I can create system-friendly urls? I have to use some other framework or something?
-
0
votes1
answer558
viewsPython: How are Flask dynamic routes implemented?
I started to study a little bit about web development with Flask. The framework treats dynamic components of the URL as follows: @app.route('/<comp_dinamico>') def page(comp_dinamico): #…
-
0
votes1
answer1443
viewsFlask connection between two machines
I have a Client-Server application in Flask, running the two files on the same machine the connection works perfectly, but when I try to run the client on a different machine, the connection is not…
-
0
votes0
answers427
views(Flask) Ajax JSON with Jquery-Datatable
Good tarrde. I am trying to show my data (JSON) in a Datatable via Ajax. The HTML is: <div class="x_content"> <table id="exemplo" name="exemplo" class="table table-striped…
-
0
votes1
answer75
viewsInformation from an API in your web application - Flask Python
I’m a beginner in python and I’m venturing into flask because I thought learning better than Django. So excuse my ignorance of what I’m going to ask or if my code is wrong, more like I do to take…
-
0
votes1
answer89
viewsExtract data from a website and play in your Flask web application
Which module could I use in flask to get data from an API and play in my web application in the HTML part
-
0
votes2
answers218
viewsfor in range no flask template
I’m in doubt, the API I’m getting returns me two data types "ID" and "Title" are several id and title and I wanted to play this on my table in a "for" template. I wanted to know if what I did was…
-
0
votes1
answer137
viewsVertical table Flask template
I’m a beginner in flask and on the front end I have a table that it returns me information from an API, only instead of it throwing information on the table vertically it’s going horizontal, as I do…
-
0
votes1
answer254
viewsGet dynamically created Checkbox values
Developing a python application using the Flask framework for simple registration I have the following problem, I have a register of bids and these bids can have several categories, the categories…
-
0
votes1
answer136
views -
0
votes1
answer43
viewsHow to change form fields depending on the user
I’m using Flask Admin and Flask Security to log in. I can easily define depending on a user’s role whether or not they can create an object, but I would also like to be able to add or remove fields…
-
0
votes0
answers91
viewsCache Storage with Python
I’m trying to use WPA in a Flask app. I wonder if it is possible with Flask or Python to store my pages in the browser’s Cache Storage? From what I’ve seen so far I’ll have to use javascript, but…
-
0
votes1
answer112
viewsIs there a list of objects when sending requests in html?
I’m developing a small web project in python(flask) for my own learning and came across something that I had never faced before. I have a registration form where the fields of an information are…
-
0
votes1
answer105
viewsAPI WEB error with flask
I started my WEB API study trying to create a Pokedex API, When I tried to create the function of searching for Pokemon by number the following error appeared: "json.decoder.Jsondecodeerror:…
-
0
votes2
answers37
viewsTable does not want to be vertical
I wanted to know what I’m doing wrong, because I created a table in the template taking information from an api. Wanted to order themselves vertically and not in the orizontal. <!Doctepy html>…
-
0
votes1
answer363
viewsPython error In Flask framework import
after installing python and declaring environment variables, creating a page and trying to run by Command Prompt sends the following error : Traceback (most recent call last): File "app.py", line 1,…
-
0
votes1
answer119
viewsError every time I make a Flask Requests
When I make requests from an Api to show the number of players in my template where "For in range (200)" returns the data and not the error. <table class="cor"> <tr class="fundo">…
-
0
votes0
answers48
viewsGenerate web pages using Flask or Django from the tables
I have a schema in a Mysql database. I want to generate the web pages from the tables of this schema. Is there any generator of this in python? A few years ago I was generating a "system" like this…
-
0
votes2
answers242
viewsPicking up request attribute with Python Json gives error
I have the following code in my application in Flask: from flask import request, json cpf = request.json['cpf'] It works normally, but when there is no attribute in the json request it displays the…
-
0
votes1
answer73
viewsSet the site favicon (Flask)
I want to know how that puts the icon of the site, I have the icon saved on static / favicon.ico, but in the template when I try to reference, n comes to nothing, it’s as if the code n existed, I’ve…
-
0
votes2
answers858
viewsFlask - sending form back to another function
Below is my default.py where I set the end-point; What I’m trying to do is get the information from FORM that’s on "/" send to the return_request() and append the result of Request in "/output" def…
-
0
votes1
answer258
viewsForm in Flask does not work
When I click the Send button nothing happens, if I leave a blank field, idem. File Routes.py from flask import * from forms import * app=Flask(__name__) @app.route('/') @app.route('/home') def…
-
0
votes1
answer62
viewsFlask Restful - get sub element with reqparse
I’m setting up an API in Flask and the request is as follows: Request: http://127.0.0.1:5000/integra json = {"recev": {"doc":"123456"} } I’m trying to get the key value "doc", but to no avail: from…
-
0
votes0
answers24
viewsAsync Live API
Can an API in Flask that fetches the live games from a website and returns them. However, this search takes about 40 seconds to be done (getDados() function), but I would like the user to receive…
-
0
votes2
answers724
viewsFlask MVC - doubts
I have doubts about making my application as organized as possible, I’m having trouble implementing MVC ... This is the file that starts the application from flask import Flask app =…
-
0
votes1
answer60
viewsGitlab CI passes the test even with error
I’m working with python/flask in an application. I want to test the Gitlab CI, so I ran a test that generates an error, just to see how it works. But, it turns out that the IC passes the Job even…
-
0
votes1
answer20
viewsHow to use two API in Developer in Appweb Flask
I’m new in the world of programming and I’m wanting to delve into web application I would take a doubt. I made a resquests of a json dictionary of two different api. I want to put this data scraping…
-
0
votes0
answers12
viewsHow do I convert angular ng-repeat to Flask?
How can I do the same Angular ng-repeat function in Flask? <tbody ng-repeat="x in oCtrl.ListaProdutosAno | filter:{codigoProduto: produto_estatistica.codigoProduto} track by x.codigoProduto +…
-
0
votes0
answers15
viewsFlash Admin - How to fix or delete a truncated calendar (datepicker)
On the Create New Record page two calendars (datepickers) appear for a date field. One of them is truncated, I believe it is flask_admin. The other was created by form_widget_args, as below.…
-
0
votes2
answers228
viewsAllow a list as argument
I have a Python REST API that takes 2 arguments, a Url list and a word. I am a beginner in Python and would like to know if it is possible to split the string of the URL to accept more than one URL…
-
0
votes1
answer285
viewsMask using flask does not load
This is the header: <script src="{{ url_for('static', filename='jquery-2.1.4.min.js') }}"></script> <script src="{{ url_for('static', filename='main.js')…