Git Product home page Git Product logo

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

View Code? Open in Web Editor NEW
62.0 8.0 44.0 29.12 MB

Gradient Able - Open-Source Flask Dashboard | AppSeed

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

License: Other

Shell 0.01% Dockerfile 0.03% Python 1.16% CSS 48.77% JavaScript 3.31% SCSS 27.21% HTML 19.52%
gradient-able flask-bs5 gradient-ui flask-app-boostrap flask-gradient-able flask-gradient-charts flask-gradient-ui gradient-able-charts gradient-able-flask gradient-able-ui

flask-gradient-able's Introduction

Open-source Flask Dashboard generated by AppSeed on top of a modern design. Gradient Able Bootstrap Lite is the most stylized Bootstrap 5 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 โœ… 1 Week Custom Development
โœ“ DB: SQLite, MySql โœ… PRO Support - Email & Discord โœ… Team: PM, Developer, Tester
โœ“ DB Tools: ORM, Flask-Migrate โœ… Private REPO Access โœ… Weekly Sprints
โœ“ Session-Based authentication - โœ… Technical SPECS
โœ“ Docker - โœ… Documentation
โœ“ CI/CD Flow via Render - โœ… 30 days Delivery Warranty
โœ“ Free Support - โœ… CI/CD for AWS, DO (Extra)
--------------------------------- --------------------------------- ---------------------------------
โœ“ LIVE Demo ๐Ÿš€ LIVE Demo PRO ๐Ÿ›’ Order: $999 (GUMROAD)

Gradient Able - Starter generated by AppSeed.


โœ… Start in Docker

๐Ÿ‘‰ Step 1 - Download the code from the GH repository (using GIT)

$ git clone https://github.com/app-generator/flask-gradient-able.git
$ cd flask-gradient-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.


โœ… Manual Build

Download the code

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

๐Ÿ‘‰ Set Up for Unix, MacOS

Install modules via VENV

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

Set Up Flask Environment

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

Start the app

$ flask run

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
$ pip3 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

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


โœ… 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
   |
   |-- ************************************************************************

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, Gradient 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.

Gradient Able PRO - Starter generated by AppSeed.



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

flask-gradient-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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flask-gradient-able's Issues

Template issue with latest SQLAlchemy and flask_sqlalchemy

Hi there,

flask_sqlalchemy 2.4.4
SQLAlchemy 1.4.0 installed by flask_sqlalchemy

The following error pop from console:

2021-03-18T09:51:34.540758+00:00 app[web.1]:   File "/app/app/base/routes.py", line 17, in <module>
2021-03-18T09:51:34.540759+00:00 app[web.1]:     from app.base.models import User
2021-03-18T09:51:34.540759+00:00 app[web.1]:   File "/app/app/base/models.py", line 7, in <module>
2021-03-18T09:51:34.540759+00:00 app[web.1]:     from sqlalchemy import Binary, Column, Integer, String
2021-03-18T09:51:34.540789+00:00 app[web.1]: ImportError: cannot import name 'Binary' from 'sqlalchemy' (/app/.heroku/python/lib/python3.8/site-packages/sqlalchemy/__init__.py)
2021-03-18T09:51:34.540863+00:00 app[web.1]: [2021-03-18 09:51:34 +0000] [9] [INFO] Worker exiting (pid: 9)
2021-03-18T09:51:34.712103+00:00 app[web.1]: [2021-03-18 09:51:34 +0000] [4] [INFO] Shutting down: Master
2021-03-18T09:51:34.712184+00:00 app[web.1]: [2021-03-18 09:51:34 +0000] [4] [INFO] Reason: Worker failed to boot.
2021-03-18T09:51:34.788330+00:00 heroku[web.1]: Process exited with status 3
2021-03-18T09:51:34.852194+00:00 heroku[web.1]: State changed from starting to crashed

This is the same problem for all appseed template. Apparently Binary is not implement anymore in latest version of flask_sqlalchemy.

from sqlalchemy import Binary, Column, Integer, String
...
password = Column(Binary)

If you replace with String or LargeBinary in models.py another error appear as well, related here: pallets-eco/flask-sqlalchemy#932

In order to use the template you should force to an older version in requirements.txt:

flask_sqlalchemy==2.4.1
sqlalchemy==1.3.17

BR, Florent

Can't include the Cropper.js module into my Jinja page

I am using your dashboard and it's working great so far. However, now I ran into an issue;: To add image cropping support to one of my Flask/Jinja pages (based on your dashboard framework) I followed the Cropper.js usage example on GitHub, added the CSS link to the <head> of my HTML page (between the {% block stylesheets %} and the {% endblock stylesheets %} statements) and added the following to the <body> of my page (between the {% block javascripts %} and the {% endblock javascripts %} statements):

<script src="/static/assets/js/plugins/cropper.min.js" type="module"></script>
<script>
	import Cropper from "cropperjs";

	const image = document.getElementById('crop_image');
	const cropper = new Cropper(image, {
		aspectRatio: 1 / 1,
		crop(event) {
			console.log(event.detail.x);
			console.log(event.detail.y);
			console.log(event.detail.width);
			console.log(event.detail.height);
			console.log(event.detail.rotate);
			console.log(event.detail.scaleX);
			console.log(event.detail.scaleY);
		},
	});
</script>

The cropper.min.js file can be found, as I see in the Firefox 77.0.1 browser console.
However, I do get the following error message in the console:

SyntaxError: import declarations may only appear at top level of a module

at the first line of the JS <script>:

import Cropper from "cropperjs";

I found in this StackOverflow thread that this error might come in Firefox from missing type="module", but as you can see I do have this in my code. Any other ideas what could be wrong here?

Gunicorn does not start the Flask app with DEBUG set to False

I deployed our application based on your Gradient Able framework to our server, setting DEBUG=False in the .env file. However, after starting the app via gunicorn the global DEBUG config option in the Flask app is still set to True. It does work, however, when hard-coding the value in run.py, instead of the following line:

DEBUG = config("DEBUG", default=False)

Is this a bug or a feature?

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.