Questions tagged [Flask] (530)

3
answers

How to change the name of the downloaded file is located on another server?

Good day! I have a link to another website where you can download the file: hb.hb/123123121.mp3 I wish when you download it change the name to what you want to me. Is there a way to do this? I'm ready to do a redirect from your site, but do not know how to do it. Because if you just write: <a href="hb.hb/123123121.mp3" ...
devan30 asked April 4th 20 at 14:20
1
answer

To get the data transferred?

Hello, as using flask to send the data? For example, there is a link: mysite.com/test?user=152&pass=111 How do I output to the console the values of user and pass?
Emmanuel.Donnel asked April 4th 20 at 13:40
1
answer

How to pass a variable from Flask to JavaScript?

Good afternoon. I have a class: class Test(db.Model): __tablename__ = 'test' __table_args__ = {'schema': 'test_temp'} a = db.Column(db.String, primary_key=True) b = db.Column(db.Integer, nullable=False) def __init__(self, a, b): self.a = a self.b = b def __repr__(self): return '[\'a\': \'{}\', \'b\': {}]'.form...
sidney.Muller asked April 4th 20 at 13:07
0
answer

Why disappear session in Flask?

Master module session in Flask. And immediately stumbled upon a problem - information from the session is not saved as a cookie. Here's a snippet:@app.route('/sign-in', methods=["GET", "POST"]) def sign_in(): if request.method == 'POST': req = request.form username = req.get('username') password = req.get('password') ...
Elias_Zieme11 asked April 4th 20 at 12:31
0
answer

What to use instead of ViewSets (DRF) for Flask?

There is a project on Flask, with the following dependencies:Flask-SQLAlchemymarshmallow-sqlalchemyflask-restplus In Django + Django REST Framework, is usually used the ViewSets to quickly create endpoint - trying to pull the same trick and for Flask:To specify the modelTo define the list of fieldsTo set the default CRUD op...
Orville18 asked April 4th 20 at 01:56
0
answer

How to configure BrowserSync in Gulp, which procset Flask?

var browserSync = require("browser-sync").create(); var paths = { styles: { src: "static/sass/style.scss", dest: "static/css" } } function reload() { browserSync.reload(); } function style() { return ( gulp .src(paths.styles.src) // Initialize sourcemaps before compilation starts .pipe(sourcemaps.init()) .pipe(sass(...
Bart_Kloc asked April 4th 20 at 01:32
1
answer

How to adapt a Ruby script validation signatures Github webhooks under Python3?

Wrote a small application Flaske to pull from the repository, the main application when it comes webhook that the master made the commit. On Github there is a manual on ruby, but it is impossible to adapt it to Python3. I tried to do the following:from flask import Flask, request from hmac import HMAC, compare_digest from h...
Rhea.Wiegand46 asked April 4th 20 at 01:28
1
answer

Why duplicated URL?

Problem: receive "https://example.com,example.com/some-uri/" instead of "https://example.com/some-uri/". In error.log there are no errors in access.log nothing, because the request does not reach. On localhost without, respectively, nginx everything works fine. So apparently, the problem occurs somewhere between flashcom an...
lonie30 asked April 4th 20 at 01:28
1
answer

How to configure 2 separate queues to process tasks, starting the service on the same port?

How to distinguish between the queue configure and run workarou so short tasks are not standing in line for long tasks?General description Restful backend written on flaska. 3 endpoint. Working asynchronously through a single port. 2 of them handle the task fast, 1 - long. You need to separate them so that for short proble...
jessy.Schuste asked April 4th 20 at 01:24
0
answer

As for Flask-Admin to double filter?

import os import subprocess from flask_admin.contrib.sqla import a model-view from app.admin.helpers.files_validation_helper import ImageRequired from app.admin.mixins.models_views import BaseModelView from app.admin.helpers.widgets_helper import CustomTimeField from app.admin.helpers.widgets_helper import MultipleSelect2F...
Kailey_Torphy asked April 4th 20 at 01:01