This commit is contained in:
2026-10-30 14:48:57 -04:00
parent 06cfb9367d
commit 0e342734a6
7 changed files with 118 additions and 29 deletions
+4 -3
View File
@@ -26,7 +26,7 @@ from django.views.decorators.http import require_GET, require_POST, require_http
from . import billing, directory, profiles, shkeeper
from .forms import PasswordForm, RegistrationForm
from .service_groups import configured_groups, service_names
from .service_groups import configured_groups, service_access_catalog
from .profile_forms import CurrentPasswordForm, ProfileEmailForm, ProfileForm, ProfilePasswordForm
from .models import Account, CryptoInvoice, ManagedGroup, ProfileEmailChange, RateWindow, Registration, Subscription, WebhookEvent
@@ -77,8 +77,9 @@ def home(request):
subscriptions = Subscription.objects.filter(account=account) if account else []
invoices = CryptoInvoice.objects.filter(account=account).order_by("-created_at")[:20] if account else []
# Presentation copies only: never mutate authorization/payment settings.
tiers = {key: {**tier, "services": service_names(tier["level"], settings.MEMBERSHIP_SERVICE_GROUPS)} for key, tier in settings.MEMBERSHIP_TIERS.items()}
return page(request, account=account, tiers=tiers, free_services=service_names(0, settings.MEMBERSHIP_SERVICE_GROUPS), subscriptions=subscriptions, crypto_invoices=invoices, shkeeper_enabled=settings.SHKEEPER_ENABLED, now=timezone.now())
tiers = settings.MEMBERSHIP_TIERS
services = service_access_catalog(tiers, settings.MEMBERSHIP_SERVICE_GROUPS)
return page(request, account=account, tiers=tiers, services=services, subscriptions=subscriptions, crypto_invoices=invoices, shkeeper_enabled=settings.SHKEEPER_ENABLED, now=timezone.now())
@require_http_methods(["GET", "POST"])