Giter Club home page Giter Club logo

app-generator / flask-datta-able Goto Github PK

View Code? Open in Web Editor NEW
227.0 7.0 120.0 4.18 MB

Datta Able - Open-Source Flask Dashboard | AppSeed

Home Page: https://appseed.us/product/datta-able/flask/

License: Other

Dockerfile 0.07% Python 2.81% HTML 40.11% CSS 54.10% JavaScript 2.29% SCSS 0.59% Shell 0.02%
datta-able flask-app flask-dashboard flask-template flask-sample-application flask-admin-template flask-bootstrap flask-bootstrap4 flask-bs4

flask-datta-able's Introduction

Open-source Flask Dashboard generated by AppSeed on top of a modern design. Datta Able Bootstrap Lite is the most stylized Bootstrap 4 Lite Admin Template, around all other Lite/Free admin templates in the market. It comes with highly feature-rich pages and components with fully developer-centric code.


Features

Have questions? Contact Support (Email & Discord) provided by AppSeed

Free Version PRO Version Custom Development
โœ“ Up-to-date dependencies Everything in Free, plus: Everything in PRO, plus:
โœ“ Best Practices โœ… Premium Bootstrap 5 Design โœ… 1mo Custom Development
โœ“ DB: SQLite, MySql โœ… OAuth for Github โœ… Team: PM, Developer, Tester
โœ“ DB Tools: ORM, Flask-Migrate โœ… Extended User Model โœ… Weekly Sprints
โœ“ Session-Based authentication โœ… Users Roles โœ… Technical SPECS
โœ“ Docker โœ… Private REPO Access โœ… Documentation
โœ“ CI/CD Flow via Render โœ… PRO Support - Email & Discord โœ… 30 days Delivery Warranty
โœ“ Free Support โœ… Deployment Assistance -
--------------------------------- --------------------------------- ---------------------------------
โœ“ LIVE Demo ๐Ÿš€ LIVE Demo PRO ๐Ÿ›’ Order: $4,999 (GUMROAD)

Datta Able (enhaced with dark mode) - Open-Source Seed project generated by AppSeed.


โœ… Start in Docker

๐Ÿ‘‰ Step 1 - Download the code

$ git clone https://github.com/app-generator/flask-datta-able.git
$ cd flask-datta-able

๐Ÿ‘‰ Step 2 - Start the APP in Docker

$ docker-compose up --build 

Visit http://localhost:5085 in your browser. The app should be up & running.


โœ… Create .env file

The meaning of each variable can be found below:

  • DEBUG: if True the app runs in develoment mode
    • For production value False should be used
  • ASSETS_ROOT: used in assets management
    • default value: /static/assets
  • OAuth via Github
    • GITHUB_ID=<GITHUB_ID_HERE>
    • GITHUB_SECRET=<GITHUB_SECRET_HERE>

โœ… Manual Build

Download the code

$ git clone https://github.com/app-generator/flask-datta-able.git
$ cd flask-datta-able

๐Ÿ‘‰ Set Up for Unix, MacOS

Install modules via VENV

$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt

Set Up Flask Environment

$ export FLASK_APP=run.py
$ export FLASK_ENV=development

Start the app

$ flask run
// OR
$ flask run --cert=adhoc # For HTTPS server

At this point, the app runs at http://127.0.0.1:5000/.


๐Ÿ‘‰ Set Up for Windows

Install modules via VENV (windows)

$ virtualenv env
$ .\env\Scripts\activate
$ pip install -r requirements.txt

Set Up Flask Environment

$ # CMD 
$ set FLASK_APP=run.py
$ set FLASK_ENV=development
$
$ # Powershell
$ $env:FLASK_APP = ".\run.py"
$ $env:FLASK_ENV = "development"

Start the app

$ flask run
// OR
$ flask run --cert=adhoc # For HTTPS server

At this point, the app runs at http://127.0.0.1:5000/.


๐Ÿ‘‰ Create Users

By default, the app redirects guest users to authenticate. In order to access the private pages, follow this set up:

  • Start the app via flask run
  • Access the registration page and create a new user:
    • http://127.0.0.1:5000/register
  • Access the sign in page and authenticate
    • http://127.0.0.1:5000/login

โœ… Codebase

The project is coded using blueprints, app factory pattern, dual configuration profile (development and production) and an intuitive structure presented bellow:

< PROJECT ROOT >
   |
   |-- apps/
   |    |
   |    |-- home/                           # A simple app that serve HTML files
   |    |    |-- routes.py                  # Define app routes
   |    |
   |    |-- authentication/                 # Handles auth routes (login and register)
   |    |    |-- routes.py                  # Define authentication routes  
   |    |    |-- models.py                  # Defines models  
   |    |    |-- forms.py                   # Define auth forms (login and register) 
   |    |
   |    |-- static/
   |    |    |-- <css, JS, images>          # CSS files, Javascripts files
   |    |
   |    |-- templates/                      # Templates used to render pages
   |    |    |-- includes/                  # HTML chunks and components
   |    |    |    |-- navigation.html       # Top menu component
   |    |    |    |-- sidebar.html          # Sidebar component
   |    |    |    |-- footer.html           # App Footer
   |    |    |    |-- scripts.html          # Scripts common to all pages
   |    |    |
   |    |    |-- layouts/                   # Master pages
   |    |    |    |-- base-fullscreen.html  # Used by Authentication pages
   |    |    |    |-- base.html             # Used by common pages
   |    |    |
   |    |    |-- accounts/                  # Authentication pages
   |    |    |    |-- login.html            # Login page
   |    |    |    |-- register.html         # Register page
   |    |    |
   |    |    |-- home/                      # UI Kit Pages
   |    |         |-- index.html            # Index page
   |    |         |-- 404-page.html         # 404 page
   |    |         |-- *.html                # All other pages
   |    |    
   |  config.py                             # Set up the app
   |    __init__.py                         # Initialize the app
   |
   |-- requirements.txt                     # App Dependencies
   |
   |-- .env                                 # Inject Configuration via Environment
   |-- run.py                               # Start the app - WSGI gateway
   |
   |-- ************************************************************************

โœ… PRO Version

For more components, pages and priority on support, feel free to take a look at this amazing starter:

Designed for those who like bold elements and beautiful websites, Datta Able is the most stylish Bootstrap 5 Admin Template compare to all other Bootstrap admin templates. It comes with high feature-rich pages and components with fully developer-centric code.

  • Enhanced UI - more pages and components
  • Improved Authentication, Password Strength Checker
  • Automatic User Suspension on multiple failed logins
  • Extended User profile
  • Users Management (restricted to admins)

Datta Able PRO - Full-Stack Starter generated by AppSeed.



Datta Able Flask - Open-source starter generated by App Generator.

flask-datta-able's People

Contributors

app-generator 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

flask-datta-able's Issues

Possible to host flask-datta-able website at different APPLICATION_ROOT

Hi, I'm experimenting with using your great flask-datta-able project as wsgi server behind an nginx reverse proxy that hosts multiple sites. I'm trying to figure out how to configure this and I'm wondering if it is currently possible? Normally with a flask app, I think you would include (in apps/init.py):

app.config['APPLICATION_ROOT'] = '/somesubfolder'

but it appears that there are a number of hardcoded urls throughout flask-datta-able that would prevent this from working, for example in: apps/templates/includes/scripts.html

Is it possible to configure flask-datta-able to run at some subdirectory of a website?

Thanks for any guidance.

sqlalchemy dependency failing

Hi I wasnt able to get the app to run unfortunately.
It has to do something with sqlalchemy dependencys. Here my error log

PS C:\Users\PavelH\Documents\GitHub\hegler-tech-dashboard> flask run
 * Tip: There are .env or .flaskenv files present. Do "pip install python-dotenv" to use them.
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\flask_sqlalchemy\__init__.py:851: UserWarning: Neither SQLALCHEMY_DATABASE_URI nor SQLALCHEMY_BINDS is set. Defaulting SQLALCHEMY_DATABASE_URI to "sqlite:///:memory:".
  warnings.warn(
c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\flask_sqlalchemy\__init__.py:872: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
  warnings.warn(FSADeprecationWarning(
Traceback (most recent call last):
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\PavelH\AppData\Local\Programs\Python\Python39\Scripts\flask.exe\__main__.py", line 7, in <module>
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\flask\cli.py", line 967, in main
    cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\flask\cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\click\decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\flask\cli.py", line 848, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\flask\cli.py", line 305, in __init__
    self._load_unlocked()
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\flask\cli.py", line 330, in _load_unlocked
    self._app = rv = self.loader()
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\flask\cli.py", line 392, in load_app
    app = locate_app(self, import_name, None, raise_if_not_found=False)
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\flask\cli.py", line 257, in locate_app
    return find_best_app(script_info, module)
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\flask\cli.py", line 83, in find_best_app
    app = call_factory(script_info, app_factory)
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\flask\cli.py", line 117, in call_factory
    return app_factory(script_info)
  File "C:\Users\PavelH\Documents\GitHub\hegler-tech-dashboard\app\__init__.py", line 39, in create_app
    register_blueprints(app)
  File "C:\Users\PavelH\Documents\GitHub\hegler-tech-dashboard\app\__init__.py", line 22, in register_blueprints
    module = import_module('app.{}.routes'.format(module_name))
  File "c:\users\pavelh\appdata\local\programs\python\python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\Users\PavelH\Documents\GitHub\hegler-tech-dashboard\app\base\routes.py", line 17, in <module>
    from app.base.models import User
  File "C:\Users\PavelH\Documents\GitHub\hegler-tech-dashboard\app\base\models.py", line 7, in <module>
    from sqlalchemy import Binary, Column, Integer, String
ImportError: cannot import name 'Binary' from 'sqlalchemy' (c:\users\pavelh\appdata\local\programs\python\python39\lib\site-packages\sqlalchemy\__init__.py)

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.