Files
smoothschedule/smoothschedule/debug_urls.py
poduck 2e111364a2 Initial commit: SmoothSchedule multi-tenant scheduling platform
This commit includes:
- Django backend with multi-tenancy (django-tenants)
- React + TypeScript frontend with Vite
- Platform administration API with role-based access control
- Authentication system with token-based auth
- Quick login dev tools for testing different user roles
- CORS and CSRF configuration for local development
- Docker development environment setup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 01:43:20 -05:00

36 lines
1.0 KiB
Python

import os
import django
from django.conf import settings
from django_tenants.utils import tenant_context
from core.models import Tenant
# Setup Django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
django.setup()
from django.urls import resolve, reverse
print(f"ROOT_URLCONF: {settings.ROOT_URLCONF}")
try:
tenant = Tenant.objects.get(schema_name='demo')
print(f"Found tenant: {tenant}")
with tenant_context(tenant):
print(f"Active schema: {tenant.schema_name}")
try:
match = resolve('/api/resources/')
print(f"Resolved /api/resources/: {match}")
except Exception as e:
print(f"Failed to resolve /api/resources/: {e}")
try:
match = resolve('/api/schedule/resources/')
print(f"Resolved /api/schedule/resources/: {match}")
except Exception as e:
print(f"Failed to resolve /api/schedule/resources/: {e}")
except Tenant.DoesNotExist:
print("Demo tenant not found")