Rename coop to blog in app code and config
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m13s

- App name: "coop" → "blog"
- coop_context() → blog_context()
- coop_url → blog_url imports
- app_url("coop") → app_url("blog")
- Config keys: coop_root/coop_title → market_root/market_title
- Sync shared submodule

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-23 08:33:07 +00:00
parent 065147569c
commit 82968a366f
7 changed files with 19 additions and 19 deletions

View File

@@ -26,7 +26,7 @@ from shared.models import User, MagicLink, UserNewsletter
from shared.models.ghost_membership_entities import GhostNewsletter
from shared.config import config
from shared.utils import host_url
from shared.infrastructure.urls import coop_url
from shared.infrastructure.urls import blog_url
from shared.services.widget_registry import widgets
from sqlalchemy.orm import selectinload
@@ -83,7 +83,7 @@ def register(url_prefix="/auth"):
if cross_cart_sid:
qsession["cart_sid"] = cross_cart_sid
if g.get("user"):
return redirect(coop_url("/"))
return redirect(blog_url("/"))
return await render_template("_types/auth/login.html")
@@ -346,6 +346,6 @@ def register(url_prefix="/auth"):
@auth_bp.post("/logout/")
async def logout():
qsession.pop(SESSION_USER_KEY, None)
return redirect(coop_url("/"))
return redirect(blog_url("/"))
return auth_bp

View File

@@ -1,7 +1,7 @@
from urllib.parse import urlparse
from quart import session
from shared.infrastructure.urls import coop_url
from shared.infrastructure.urls import blog_url
LOGIN_REDIRECT_SESSION_KEY = "login_redirect_to"
@@ -32,7 +32,7 @@ def store_login_redirect_target() -> None:
def pop_login_redirect_target() -> str:
path = session.pop(LOGIN_REDIRECT_SESSION_KEY, None)
if not path or not isinstance(path, str):
return coop_url("/auth/")
return blog_url("/auth/")
# Absolute URL: return as-is (cross-app redirect)
if path.startswith("http://") or path.startswith("https://"):
@@ -40,6 +40,6 @@ def pop_login_redirect_target() -> str:
# Relative path: must start with / and not //
if path.startswith("/") and not path.startswith("//"):
return coop_url(path)
return blog_url(path)
return coop_url("/auth/")
return blog_url("/auth/")

View File

@@ -1100,7 +1100,7 @@ async def sync_single_post(sess: AsyncSession, ghost_id: str) -> None:
if not post.is_page and post.user_id:
from shared.services.federation_publish import try_publish
from shared.infrastructure.urls import app_url
post_url = app_url("coop", f"/{post.slug}/")
post_url = app_url("blog", f"/{post.slug}/")
post_tags = [tag_map[t["id"]] for t in (gp.get("tags") or []) if t["id"] in tag_map]
if post.status == "published":
@@ -1165,7 +1165,7 @@ async def sync_single_page(sess: AsyncSession, ghost_id: str) -> None:
if post.user_id:
from shared.services.federation_publish import try_publish
from shared.infrastructure.urls import app_url
post_url = app_url("coop", f"/{post.slug}/")
post_url = app_url("blog", f"/{post.slug}/")
post_tags = [tag_map[t["id"]] for t in (gp.get("tags") or []) if t["id"] in tag_map]
if post.status == "published":