Giter Club home page Giter Club logo

003-arquitetura-flask's People

Contributors

gacheiro avatar imakecodes avatar rochacbruno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

003-arquitetura-flask's Issues

Adicionar celery ao projeto

Teria uma forma de adicionar o celery ao projeto e carregar dinamicamente assim como as outras extensões?

Adicionar suporte a container Docker

Seria muito interessante criar um docker-compose.yml para poder rodar a app pois quem não tem Python instalado poderiar executar a App em poucos segundos.

ImportError do Flask-admin

É necessário atualizar a dependência do Flask-admin para a versão 1.5.6, pois a versão que está definida atualmente contém problemas de imports, causados por uma mudança no werkzeug

AttributeError AttributeError: 'Ligas' object has no attribute 'to_dict'

Olá, estou iniciando o aprendizado com python e flask, e estou tendo dificuldades para fazer a chamada da api devido este erro, poderiam ajudar?
Abaixo o trecho do código com o erro, as variáveis tem nomes diferentes, mas fazem a mesma coisa.

from flask import abort, jsonify
from flask_restful import Resource
from ext.database import Ligas

class LigasResource(Resource):
    def get(self):
        ligas = Ligas.query.all() or abort(204)
        return jsonify(
            {'liga': [dic_liga.to_dict() for dic_liga in ligas]}
        )


class LigasItemResource(Resource):
    def get(self, liga_id):
        liga = Ligas.query.filter_by(id=liga_id).first() or abort(404)
        return jsonify(liga.to_dict())

database.py:

from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()

class Ligas(db.Model):
    id = db.Column(db.Integer,primary_key=True)
    name = db.Column(db.String(140))
    description = db.Column(db.Text)

def init_app(app):
    db.init_app(app)

obs: já vi o video umas 50 vezes e o conteúdo é fantastico, parabens!!!
Se este não for o canal correto para isto, me desculpe rsrsrs.. Obrigado

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.