Giter Club home page Giter Club logo

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

View Code? Open in Web Editor NEW
63.0 8.0 45.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 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

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?

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

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.