Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions forum/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flask import Flask
from forum.routes import rt
from .routes import rt

def create_app():
"""Construct the core application."""
Expand All @@ -11,7 +11,7 @@ def create_app():
# etc
app.register_blueprint(rt)
# Set globals
from forum.models import db
from .models import db
db.init_app(app)

with app.app_context():
Expand Down
2 changes: 1 addition & 1 deletion forum/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

from flask import render_template
from flask_login import LoginManager
from forum.models import Subforum, db, User
from .models import Subforum, db, User

from . import create_app
app = create_app()
Expand Down
4 changes: 2 additions & 2 deletions forum/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from flask_login.utils import login_required
import datetime
from flask import Blueprint, render_template, request, redirect, url_for
from forum.models import User, Post, Comment, Subforum, valid_content, valid_title, db, generateLinkPath, error
from forum.user import username_taken, email_taken, valid_username
from .models import User, Post, Comment, Subforum, valid_content, valid_title, db, generateLinkPath, error
from .user import username_taken, email_taken, valid_username
Comment on lines 5 to +7
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two from flask import ... imports at the top of this file (line 1 and line 5), which duplicates render_template/request/redirect/url_for. Consolidating these into a single import keeps the module header easier to maintain and avoids accidental divergence.

Copilot uses AI. Check for mistakes.

##
# This file needs to be broken up into several, to make the project easier to work on.
Expand Down
3 changes: 2 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export SECRET_KEY="kristofer"
# honcho start

# you can ALSO or RATHER use the following command to run the app
cd ./forum; flask run
export FLASK_APP=forum.app
flask run --port 8000
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run.sh hard-codes the Flask port to 8000, but the README currently documents that ./run.sh serves on port 5000. Consider either switching back to the default/5000 for local dev, or making the script respect $PORT (with a sensible default) so it works consistently across environments.

Suggested change
flask run --port 8000
flask run --port "${PORT:-5000}"

Copilot uses AI. Check for mistakes.
Loading