Git Product home page Git Product logo

flask-statistics's People

Contributors

dependabot[bot] avatar gaareth avatar healyoudown avatar jnguiot avatar

Stargazers

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

Watchers

 avatar  avatar

flask-statistics's Issues

Only works with SQLAlchemy ?

Hey ! I love your extension and I would love to use it but I am using peewee and I was wondering if you were planing to support it in the future

Also can the stats only work on one model at a time?

Cheers, Jules

Postgres Group By Issue

Extension was added based on the instructions.
Request class was added to the model that is already in use.
App runs in docker locally (dev) and in AWS (prod).
psycopg2.errors.GroupingError: column "request.index" must appear in the GROUP BY clause or be used in an aggregate function
LINE 2: FROM (SELECT request.index AS request_index, request.respons...
...
(Background on this error at: https://sqlalche.me/e/14/f405)

Before Request Function

Hi first of all I want to thank you for your work on this simple but yet efficient extension. I added the extension to my project and I have an issue with passing in a check_if_user_is_allowed() function.

This function is not being called before each request but only one when initialized. Am I doing something wrong?

Also if I implement my logic to check the roles in my JWT token I either get: Out of request or application context error - adding a with app.app_context() doesn't help.

def check_user():
print("I am Here")

stats = Statistics(app, db, Request, before_f=check_user())

Output:

INFO:app.lib.logger:Initalizing Blueprints: Done... I am Here [2020-11-12 16:15:44,364] Initalized Flask-Statistics... DEBUG:app.lib.logger:Initalized Flask-Statistics... WARNING:werkzeug: * Debugger is active! INFO:werkzeug: * Debugger PIN: 296-468-812 [2020-11-12 16:15:52,480] Creating default content... DEBUG:app.lib.logger:Creating default content... INFO:werkzeug:127.0.0.1 - - [12/Nov/2020 16:15:52] "GET /statistics/ HTTP/1.1" 200 -

Ability to define our own frontend

Support for adding our own frontend would be really nice.
This could for example be implemented by adding a fifth optional parameter which then would be the path to our template

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.