Hey Guys,
I have a plain Python/Flask site that is fairly simple. I have the default wsgi.py setup. The site has been running great for many months, then - not-so-much. I reloaded the site from the web dashboard, and the main site came back up, but all the other routes (that were working perfectly) - all get a 404.
The only recent errors in the log is:
2024-08-18 19:12:19,540: OSError: write error
There are 6 other of the same errors for August. I have my routes and blueprints setup correctly:
# ROUTES
from app_project.visits.views import core
from app_project.admin.views import admin
from app_project.error_pages.handlers import error_pages
app.register_blueprint(core)
app.register_blueprint(admin)
app.register_blueprint(error_pages)
I also have my routes setup correctly:
@admin.route('/admin')
def admin_redirect():
return redirect("/admin/monthly-report")
@admin.route('/admin/')
def admin_redirect():
return redirect("/admin/monthly-report")
@admin.route('/admin/monthly-report')
def monthly_report():
# Your SQLAlchemy query to aggregate data
result = db.session.query(
extract('year', Visit.date).label('year'),
extract('month', Visit.date).label('month'),
# ... rest of code .... #
)
Like I said - it was working fine - now not-so-much. Any help would be greatly appreciated!
Bob