Questions tagged as 'sqlalchemy'

1
answer

Python Connect Sql With user and "token"

I have an application in Flask and I'm using SQLAlchemy to get access to SQL Server. I would like the connection to the database to be made by a generic user and the password is a "token", I thought it would only replace the parameters but no...
asked by 29.08.2018 / 19:56
1
answer

Flask SQLAlchemy: KeyError

I'm trying to create a relationship in the database between the Article, Author and Category class, when I try to create an object from the Article class I get the error "KeyError:" article "referring to the line containing the code (author = db...
asked by 28.06.2018 / 20:12
1
answer

Inheritance in flask models

How do I make a class inherit another class in flask models? I'm creating the following User class in my models lass User(db.Model): __tablename__ = "users" id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String, uniqu...
asked by 03.05.2018 / 14:45
0
answers

Slugfy in query FLASK

I'm trying to slug a dice, I tried to use the lower and replace to change some characters, my query looks like this: return Person.query.get(person_id).name.filter(func.lower(func.replace(Person.name, "ç", "c")) It works, but if I get some...
asked by 29.06.2017 / 00:33
1
answer

Python Error SQLACHEMY

It is giving an error when I try to connect to the SQL SERVER database with SQLALCHEMY from sqlalchemy import create_engine, engine import pandas as pd engine = create_engine('mssql+pyodbc://User:password@server:1433/Bases_testes?drive=SQL+Ser...
asked by 28.10.2018 / 16:22
0
answers

Q: SQL login verification ALCHEMY Pending

I am creating a login to give access to the tool that I am beginning to create, the database is SQL Server The project structure is this: ├── Project │ ├── Controllers │ │ ├── __init__.py │ │ └── Mapping_Login │ │ ├── __in...
asked by 30.11.2018 / 10:31
0
answers

Problems with form Flask-Admin with additive fields in the relationship N-N

I have the models below class ProdutosIngredientes(db.Model): __tablename__ = 'produtos_ingredientes' id = db.Column(db.Integer(), primary_key=True) produtos_id = db.Column('produtos_id', db.Integer, db.ForeignKey('produtos.id'))...
asked by 03.10.2018 / 02:37
1
answer

Application deploy flask in heroku with flask-sqlalchemy

Good afternoon. I have a small application written in flask and I'm having problems with the database when trying to deploy in heroku and after searching for two days I did not find any solution that would meet me. In summary, this is the...
asked by 22.08.2018 / 20:34
2
answers

Flask SqlAlcheny TypeError: 'Fermentables' object is not iterable

In model FermentableTypes : class FermentableTypes(db.Model): __tablename__ = "fermentable_types" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(50)) desc = db.Column(db.String(255)) def __s...
asked by 25.06.2018 / 15:36
0
answers

Python - CTR class does not register in DB

Good evening. Application developed in Python 3.x Database: sqlalchemy. I'm trying to develop a simple product registration system in a SQL database. For that, I am trying to develop from the MVC Standard (Model, View and Controller). In...
asked by 01.02.2018 / 23:27