Git Product home page Git Product logo

flask-admin-dashboard's Introduction

Flask-Admin Dashboard Example

Basic dashboard app with Admin LTE template and Flask Admin, it has:

  • User Registration
  • Login as general or admin user
  • Roles management
  • Create form in modal window by default
  • Inline editing enabled by default
  • Skins and layout customization
  • Dashboard, charts, chat and calendar examples

Utilities:

  • AdminLTE Bootstrap template
  • Flask-Security
  • Flask-Admin
  • A lot of Charts libraries
  • SQLite

How to use

  • Clone or download the git repository.
    $ git clone https://github.com/jonalxh/Flask-Admin-Dashboard.git
  • Create and activate a virtual environment:
    $ virtualenv venv
    $ source venv/bin/activate
  • Install the requirements inside the app folder
    $ pip install -r requirements.txt
  • Once the process finishes give execution permission to app.py file and run it
    $ chmod +x app.py
    $ ./app.py
  • The first execution will create automatically a sample sqlite database.
  • Open your favorite browser and type
    localhost:5000/admin
    
    then just log in with the default user or register one.

Screenshots

Index Login Register Home User Edit Create Skins and Layout

I hope you enjoy it.

flask-admin-dashboard's People

Contributors

jonalxh avatar s3lcuk 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flask-admin-dashboard's Issues

Issue with SQLAlchemy 1.4.0

There is a issue with SQLAlchemy 1.4.0 which is automatically installed as a dependency of Flask-SQLAlchemy in the requirements.txt.

It leads to the following issue when running the app:

sa_url.database = os.path.join(app.root_path, sa_url.database)
AttributeError: can't set attribute

It can easily be fixed for the moment by manually adding
SQLAlchemy==1.3.23 to requirements.txt.

More Infos:
https://stackoverflow.com/questions/66647787/attributeerror-cant-set-attribute-when-connecting-to-sqlite-database-with-flas

How to run this app.py in windows 10

using python app.py i have this error

(venv) C:\Users\Carlos Gonzalez\Flask-Admin-Dashboard>python app.py
Traceback (most recent call last):
  File "app.py", line 5, in <module>
    from flask_security import Security, SQLAlchemyUserDatastore, \
  File "C:\Users\CARLOS~1\FLASK-~1\venv\lib\site-packages\flask_security\__init__.py", line 13, in <module>
    from .core import Security, RoleMixin, UserMixin, AnonymousUser, current_user
  File "C:\Users\CARLOS~1\FLASK-~1\venv\lib\site-packages\flask_security\core.py", line 24, in <module>
    from passlib.context import CryptContext
  File "C:\Users\CARLOS~1\FLASK-~1\venv\lib\site-packages\passlib\context.py", line 15, in <module>
    from passlib.registry import get_crypt_handler, _validate_handler_name
  File "C:\Users\CARLOS~1\FLASK-~1\venv\lib\site-packages\passlib\registry.py", line 12, in <module>
    from passlib.ifc import PasswordHash
  File "C:\Users\CARLOS~1\FLASK-~1\venv\lib\site-packages\passlib\ifc.py", line 10, in <module>
    from passlib.utils.decor import deprecated_method
  File "C:\Users\CARLOS~1\FLASK-~1\venv\lib\site-packages\passlib\utils\__init__.py", line 845, in <module>
    from time import clock as timer
ImportError: cannot import name 'clock' from 'time' (unknown location)

follow the steps, but i don't know how to run this app in os windows 10

any help?

help me

i want use mssql this project.

but i cant change sqllite -> mssql

Could you tell me where I should change it if I want to change it to mssql?

browsing Flask-Admin-Dashboard in mobile is very slow

hi
i run Flask-Admin-Dashboard in raspberry pi and make a hotspot by hostapd to other mobile can connect to my raspberry. but my big problem is that when i want to browse project in mobile browser that connected to raspberry by wifi, the Dashboard is very slow and every page take avg 40 seconds to load!!

can you help me?

Get data from database

Hello,

How can I put data in the graphs read from a database? I am trying to do it but I could not

Thank you

how to customize admin/index.html ?

Hello.
Thanks for your fancy dash board .
Let me ask you one thing about front page UI.

I'd like to customize the front UI dashboard (graph, chat, todo ..etc) from admin/index.html .
Therefore I need to implement the flask code which get some values from database,
and then
render_template('admin/index.html', some_value='blah blah')

However I cannot find the way to access this template html from flask backend.

Thanks for your support in advance.

Boolean fields shows as a textfield

Screen Shot 2020-04-06 at 4 28 28 PM
I tried for the flask admin dashboard in my DB I have many boolean fields but it not showing as a checkbox it's showing as a simple text box. I don't know how to enter a value in that.

Setting password for Users

I created a user from the admin dashboard as admin but there's no option to set password for the user and hence i can't login with the said user. Any fix for this?

Can't sign-in

Hi , i can't sign-in , can i get some help, please?

sqlalchemy.exc.OperationalError
OperationalError: (sqlite3.OperationalError) attempt to write a readonly database
[SQL: INSERT INTO user (first_name, last_name, email, password, active, confirmed_at) VALUES (?, ?, ?, ?, ?, ?)]
[parameters: (None, None, u'[email protected]', '$pbkdf2-sha512$25000$LmVsba11rjWGMCYkhNBaCw$aCzQtJhP1Vyw4HUzJfsUVt0ZqCTWLNEekGXvMEl9e4y2FqbbThS5KRUjyKNcz2NaPnANyypeL3/62nbvAR83Sw', 1, None)]
(Background on this error at: http://sqlalche.me/e/e3q8)

PDF file Upload

Hello,

I'm learning python the worst way possible (I believe), and upon using your dashboard as a template I'm stuck as many doubt's, such as: How to make direct chat work, connecting data to widget's etc, however, I'd just woul'd like to understand how could I add a new column on the user list so a CV could be imported. Would you be kind enough to explain me or provide me a snippet so I could study it? At this point the flas-admin documentation is a little confusing for me.

Thank you very much.

Edit table cell not working

When clicking on a field in the user's table, the editable box does not open correctly. See image with console error.
image

cannot import name '_request_ctx_stack'

doesnt work

$ ./app.py 
Traceback (most recent call last):
  File "./app.py", line 5, in <module>
    from flask_security import Security, SQLAlchemyUserDatastore, \
  File "/home/z/tmp/Flask-Admin-Dashboard/venv/lib/python3.8/site-packages/flask_security/__init__.py", line 13, in <module>
    from .core import Security, RoleMixin, UserMixin, AnonymousUser, current_user
  File "/home/z/tmp/Flask-Admin-Dashboard/venv/lib/python3.8/site-packages/flask_security/core.py", line 18, in <module>
    from flask_babelex import Domain
  File "/home/z/tmp/Flask-Admin-Dashboard/venv/lib/python3.8/site-packages/flask_babelex/__init__.py", line 20, in <module>
    from flask import _request_ctx_stack
ImportError: cannot import name '_request_ctx_stack' from 'flask' (/home/z/tmp/Flask-Admin-Dashboard/venv/lib/python3.8/site-packages/flask/__init__.py)

License ?

Thanks for open sourcing this. There is so much to learn from this wonderful effort. Would you consider releasing it with some oss compatible license ? mit or apache comes to mind. Thank you.

email_validator error

hi , i'm still beginner i want to test your script on my localhost , i use mac to run this project , i have only one issue, can i get some help , please ?
i try to install email_validator with this command pip install email_validator and nothing has change

Thank u so much.

MacBook-Pro:Flask-Admin-Dashboard med$ ./app.py
Traceback (most recent call last):
File "./app.py", line 5, in
from flask_security import Security, SQLAlchemyUserDatastore,
File "/Users/med/Desktop/sms/Flask-Admin-Dashboard/venv/lib/python2.7/site-packages/flask_security/init.py", line 13, in
from .core import Security, RoleMixin, UserMixin, AnonymousUser, current_user
File "/Users/med/Desktop/sms/Flask-Admin-Dashboard/venv/lib/python2.7/site-packages/flask_security/core.py", line 28, in
from .forms import ChangePasswordForm, ConfirmRegisterForm,
File "/Users/med/Desktop/sms/Flask-Admin-Dashboard/venv/lib/python2.7/site-packages/flask_security/forms.py", line 69, in
email_validator = Email(message='INVALID_EMAIL_ADDRESS')
File "/Users/med/Desktop/sms/Flask-Admin-Dashboard/venv/lib/python2.7/site-packages/wtforms/validators.py", line 332, in init
raise Exception("Install 'email_validator' for email validation support.")
Exception: Install 'email_validator' for email validation support.

how to add standalone view

dear Jonalxh,

i tried to develop app from your boilerplate, this is a great boilerplate. i have a problem , how to add a standalone view, i followed this documentation :

`from flask_admin import BaseView, expose

class AnalyticsView(BaseView):
    @expose('/')
    def index(self):
        return self.render('analytics_index.html')

admin.add_view(AnalyticsView(name='Analytics', endpoint='analytics'))`

and in analytics_index.html i write code below

`{% extends 'admin/master.html' %}
{% block body %}
  <p>Here I'm going to display some data.</p>
{% endblock %}`

i sad, i get error :
Exception: Attempted to instantiate admin view AnalyticsView without default view

may i know, step by step how to add a standalone view

thank you verrymuch

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.