question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flask using same styling on different flask projects

See original GitHub issue

Expected Behavior

When running another flask project, the styling should be it’s own, not the project’s that’s been run 1 time before.

# Paste a minimal example that causes the problem.

I run this repo: https://github.com/delivey/xevis using flask run. (repo doesn’t matter, but i’ve only encountered this bug with styling which uses CSS) I go to the website, do something on it, etc. I close the website by pressing CTRL+C in the terminal. I close said terminal window.

I open another terminal window on which I run this project: https://github.com/delivey/schoolvid19 (again, repo doesn’t matter) I get some weird styling which is clearly not of this project, but the one I ran before, although images and text are of the current project.

Actual Behavior

I get styling from the project I ran before, but the text and images from the project I’m currently running.

Paste the full traceback if there was an exception.

Environment

  • Python version: 3.8.3
  • Flask version: 1.1.2
  • Werkzeug version: 0.16.0

How to fix

It is possible to fix this error, simply by hitting CTRL+SHIFT+R, which reloads the browser cache, but getting this bug fixed would be nice

Images

expected_styling old_project_styling weird_styling_got_by_running_the_new_project

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jabcommented, Jul 13, 2020

After further discussion, we’ve opened pallets/werkzeug#1882 to try to reduce confusion stemming from Flask’s current behavior.

1reaction
jabcommented, Jul 12, 2020

@delivey, glad those references were helpful. In general, it is helpful to us to know where new users are having trouble, though in the future, please try asking in other places like StackOverflow before opening up a new bug. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Running server using Flask brings up different project
I am starting a new project called "blogly" and created an app.py and HTML files. The HTML templates folder and app.py file are...
Read more >
Large Applications as Packages — Flask Documentation (2.2.x)
Imagine a simple flask application structure that looks like this: ... The Tutorial is structured to use the package pattern, see the example...
Read more >
How To Use Templates in a Flask Application - DigitalOcean
In Flask, you can use the Jinja templating language to render HTML templates. A template is a file that can contain both fixed...
Read more >
Flask Tutorial #9 - Static Files (Custom CSS ... - YouTube
This flask tutorial focuses on how to use custom CSS, images and javascript in your HTML files from within a flask app.
Read more >
Developing Python Web Applications with Flask
I will show you how to run a Flask app under Apache web server later. 3.2 Multiple Routes for the same Route Handler....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found