Comments (7)
Do you have any reference to this? Werkzeug master still supports the redirects.
from microblog.
When I did the examples using the cli, it worked.
But when I went to actually put the code in the app:
I am using Pycharm and it didn't find the methods.
I am using Werkzeug V0.13.
I looked at Werkzeug Transition and that's where I read about the re-direct being removed.
Once I changed it, Pycharm recognized it and it worked.
from microblog.
Oh wow, that transition document was written 7 years ago, I wonder how much of that is still planned if nothing changed for so long. In any case, I will switch to the long import form, just in case. Thanks.
from microblog.
Maybe it's a bug in Pycharm?
Later today, I'll try it in another Editor like VSCode and see if the same issue surfaces.
from microblog.
Yes and no. Werkzeug uses a little bit of hackery to get all those imports available as top-level symbols. Pycharm probably does not find them because there aren't really any explicit import
statements, the redirection is done using Python logic, not imports.
from microblog.
I just tried closing Pycharm, opening the code in VSCode with the Python Extension enabled and pylint installed.
If I remove the security, the app still runs correctly but pylint displays an E611 error that those two names cannot be found in werkzeug.
To Summarize:
The import of the two methods works as far as the app running correctly goes but in order make the "error" go away in both Pycharm and VSCode, you have to be more explicit and make it "werkzeug.security".
from microblog.
I'm going to close this issue as it's not really a problem with the application code.
from microblog.
Related Issues (20)
- 2023 update
- Popover does not work in chapter 20 due to bootstrapcdn source issue? HOT 5
- Member redis is unknown HOT 2
- Chapter 14 Translations fail unless the destination language is explicitly specified
- Chapter 22 Export task stuck at 0% HOT 5
- elastic_transport.ConnectionError when post is submitted? HOT 6
- Language inconsistency during poedit translation process? HOT 7
- Using JinJa2 filter function truncate to implement 'Read more'? HOT 21
- Bug in lesson 5 due to werkzeug.urls - url parsing removed HOT 4
- Lesson 6, FLASK_ENV is removed from Flask 2.3.0 HOT 2
- Unable to load celery application. 'str' object has no attribute 'level' when Integrating Celery with Flask? HOT 17
- Unable to import 'url_parse' from 'werkzeug.urls' in flask shell execution HOT 15
- login error was reported during deployment? HOT 7
- Github links in chapters start with wrong tag (one-off) HOT 2
- Dead link to flask-babel docs HOT 1
- flask_moment error when trying to format HOT 4
- Multidict Package Problematic in python:slim HOT 1
- next HOT 3
- Error: Cannot import name 'app' from 'app' HOT 2
- Exporting a huge number of database records HOT 3
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 microblog.