Questions tagged [flask-assets]

Flask-Assets is an extension for Flask, it helps with easy integration of webassets into a Flask app. Use this tag for related questions.

Flask-Assets is an extension for the framework. It allows one to easily integrate functionality into a Flask app. For more information visit its homepage.

48 questions
0
votes
2 answers

Tailwind with Flask-assets - build error with postcss

I installed POSTCSS and Flask assets into my build and want to use tailwind. My environment is the WSL Unbuntu on windows 11 so all is in a Unbuntu Shell I installed Flask-assets # CSS Build assets = Environment(app) css = Bundle("src/style.css",…
Graham Morby
  • 123
  • 2
  • 11
0
votes
1 answer

flask_asset seems to not find sass file but directory is ok

I m trying for the first time to use flask_asset. this is my init.py code: from application import assets def create_app(config_name): app = Flask(__name__, instance_relative_config=True) # security …
0
votes
1 answer

Any modification of a .less file breaks Flask app, resulting in Program file not found: lessc

I am having an issue where a Flask app using flask_assets can't find lessc after a modify a certain .less file, and even changing it back to the original does not help. I have been trying to use this tutorial to learn about using Blueprints to…
Stonecraft
  • 860
  • 1
  • 12
  • 30
0
votes
1 answer

Flask_Assets not export css from sass

I'm using Flask_Assets to load sass into Flask. My code is that: from flask_assets import Environment, Bundle assets = Environment(app) scss = Bundle( 'scss/modal.scss', 'scss/buttons.scss' filters='pyscss', …
laurajaime
  • 379
  • 1
  • 3
  • 14
0
votes
1 answer

flask-assets - How to keep an specific app's static js files from being used by another app

I've done this in the past but I'm completely forgetting how I did it. I'm developing a flask server that contains multiple apps with the static files bundled together but I want the js/css files in each app's static folder to be used only by the…
huitlacoche
  • 173
  • 1
  • 2
  • 15
0
votes
1 answer

flask-assets append_path() catch-22

I have a package which contains static files I want to reuse among applications. Based on https://webassets.readthedocs.io/en/latest/environment.html#webassets.env.Environment.load_path I came up with the following code snippet, to be used in each…
Lou K
  • 1,128
  • 2
  • 12
  • 31
0
votes
1 answer

AngularJS - Unexpected token {

I am trying to import a service to use it inside my controller, but inside console it is showing this error: Uncaught SyntaxError: Unexpected token { I am using Flask-Assets to minify javascript files. This is my service and controller files…
swordfish
  • 959
  • 16
  • 39
0
votes
1 answer

Timeout due to flask-assets pipeline when debug is turned off

I have a Flask based app that uses flask-assets to bundle, compile and minify css and Javascript. A timeout occurs when I start the app with gunicorn using gunicorn --bind=0.0.0.0:8000 --workers=3 --log-level=INFO manage:app The timeout message…
Moritz
  • 2,987
  • 3
  • 21
  • 34
0
votes
0 answers

in Flask, dealing with growing assets in __init__.py file

# New to flask! I'm working on adding features to a Flask project and it has its assets bundled using the code below in __init__.py file. js = Bundle('javascripts/leaflet-src.js', 'javascripts/leaflet.markercluster-src.js', …
aBadAssCowboy
  • 2,440
  • 2
  • 23
  • 38
0
votes
1 answer

Installing bower components with Flask-assets

I'm working to modify a cookiecutter Flask app. I'm currently trying to add a datepicker to a page. I've found https://eonasdan.github.io/bootstrap-datetimepicker/. This cookiecutter uses flask-assets to manage the project assets. In this app…
user1592380
  • 34,265
  • 92
  • 284
  • 515
0
votes
1 answer

flask-assets- FilterError: stylus: subprocess returned a non-success result code: 1, stdout=, stderr=

I'm attempting to compile stylus files using flask-assets and webassets. This "just works" on the iMac in my office, but stylus is returning and exit code of 1 when I try to run the server on my desktop running Ubuntu 14.04. I've tried installing…
0
votes
1 answer

How to collect and install bower managed package images and fonts in Elastic Beanstalk

So, I have a Flask application (based on the great starter application at https://github.com/sloria/cookiecutter-flask) that I am trying to setup for deployment to elastic beanstalk. The application uses the bower package manager to install…
0
votes
2 answers

Example of configuring Flask + AngularJS + PyJade (or other alternative to Jinja)

I am new to Flask and building a web app that uses Flask and AngularJS. My understanding is that the static directory is the place to store AngularJS files like javascript and templates. I wonder if there is a stable alternative to Html/Jinja that…
kpax
  • 621
  • 1
  • 8
  • 18
0
votes
1 answer

Flask app slow if used by a small number of users in parallel

I have a Flask app with a few simple Jinja2 templates. In addition I use Flask-Assets/pyScss for CSS. If a single users works with the app then everything works great. If a small number of people (less than 20) access the app in parallel then the…
Lars Schneider
  • 5,530
  • 4
  • 33
  • 58
0
votes
1 answer

Multiples assets into one bundle using Flask-Assets

I have couples of CSS files in static directory of my Flask project and couple of SCSS fiels. Now I am compiling SCSS files manualy but I want Flask-Assets do it for me. I know how to prepare bundle of CSS only but is there way to mix into this…
Alex G.P.
  • 9,609
  • 6
  • 46
  • 81