Comments (4)
Hi,
Thanks for the report.
Are you running Windows in production? Just asking because under normal circumstances you wouldn't be running the digest command in development.
from flask-static-digest.
No, it's in development. And I mean, In windows, the function static_url_for doesn't work. The example you provided doesn't seem to work in Windows.
In the sample program:
127.0.0.1 - - [14/Nov/2019 23:10:35] "GET / HTTP/1.1" 500 -
Traceback (most recent call last):
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask\app.py", line 2309, in call
return self.wsgi_app(environ, start_response)
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask\app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask\app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask_compat.py", line 35, in reraise
raise value
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask\app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask\app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask_compat.py", line 35, in reraise
raise value
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask\app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "F:\PycharmProjects\flask-static-digest\tests\example_app\example\app.py", line 16, in index
return render_template("index.html")
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask\templating.py", line 135, in render_template
context, ctx.app)
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask\templating.py", line 117, in render
rv = template.render(context)
File "f:\redrock\py\pycharmprojects\lib\site-packages\jinja2\asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "f:\redrock\py\pycharmprojects\lib\site-packages\jinja2\environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "f:\redrock\py\pycharmprojects\lib\site-packages\jinja2\environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "f:\redrock\py\pycharmprojects\lib\site-packages\jinja2_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "F:\PycharmProjects\flask-static-digest\tests\example_app\example\templates\index.html", line 1, in top-level template code
{% extends 'layout.html' %}
File "F:\PycharmProjects\flask-static-digest\tests\example_app\example\templates\layout.html", line 5, in top-level template code
href="{{ static_url_for('static', filename='css/app.css') }}">
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask_static_digest_init.py", line 74, in static_url_for
return flask_url_for(endpoint, **merged_values)
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask\helpers.py", line 356, in url_for
return appctx.app.handle_url_build_error(error, endpoint, values)
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask\app.py", line 2061, in handle_url_build_error
reraise(exc_type, exc_value, tb)
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask_compat.py", line 35, in reraise
raise value
File "f:\redrock\py\pycharmprojects\lib\site-packages\flask\helpers.py", line 345, in url_for
force_external=external)
File "f:\redrock\py\pycharmprojects\lib\site-packages\werkzeug\routing.py", line 1776, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.BuildError: Could not build url for endpoint 'static'. Did you forget to specify values ['filename']?
from flask-static-digest.
Hey, could you check my PR? I want to use this plugin in my project.
from flask-static-digest.
Windows support is available now in v0.1.3
.
from flask-static-digest.
Related Issues (20)
- Update python_requires to >=3.6 HOT 1
- Faster hashing with SHA1 or xxhash HOT 1
- Getting Permission Error on flask digest compile (Ubuntu 20.4) HOT 5
- static_url_for returning 500 HOT 17
- Blacklist Filter Array - Default Setting HOT 1
- README suggestion: how to use in Heroku HOT 8
- I think hash is long, can i go i short hash HOT 1
- a idea: dev envirienment with webpack HOT 5
- Option allows to minify static files HOT 1
- Working with Blueprints HOT 9
- Statics no in FLASK_STATIC_DIGEST_HOST_URL root HOT 4
- has not working HOT 2
- Option to allow specify output folder for digested files? HOT 2
- Update references in .css and .js files to other files so they refer to the cache-busting filenames HOT 3
- Pretty print manifest file HOT 4
- There is no possibility to customize path to static_folder. HOT 2
- use a unique string in digested filenames to make the .gitignore line simpler HOT 1
- FLASK_STATIC_DIGEST_WHITELIST_FILTER HOT 3
- Adding a collect command to copy static assets (including from nested blueprints) to a target dir
- Flask Static Digest + Create React App HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-static-digest.