Search code examples
pythonflaskflask-mysql

How to wipe flask clean?


I've been working on a website for the past year and used python and flask to built it. Recently I encountered a lot of errors and problems and decided to start a new project (pyCharm). I figured I could copy pieces of code into the new project until I encountered a problem and then I'll know what the problem is.

I created three new files as follows:

init.py

from flask import Flask

app = Flask(__name__)
app.config.from_object('config')

config.py

SECRET_KEY = 'you-will-never-guess'

run.py

from app import app
app.run()

If I run this however, the old website shows up (I expected it to be an empty page). How do I start a clean new flask project?


Solution

  • Build your venv from scratch;

    You can clean up your cache as well, include it to your config file:

    app.config["CACHE_TYPE"] = "null"