mirror of
https://github.com/thecyberlearn/quantum-ai.git
synced 2026-08-18 07:52:59 +00:00
🌐 Update domain configurations for www.quantumtaskai.com
- Add www.quantumtaskai.com to ALLOWED_HOSTS - Update CSRF_TRUSTED_ORIGINS for both www and non-www domains - Change SITE_URL to use production domain for emails - Update Stripe fallback URLs to use www subdomain - Change admin emails from netcop.ai to quantumtaskai.com - Update management command URLs to production domain - Add Email Writer agent to populate_agents script 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
8b23437a6e
commit
402324c03e
@ -23,7 +23,7 @@ class Command(BaseCommand):
|
||||
|
||||
if should_create_admin:
|
||||
# Check if admin email already exists
|
||||
admin_email = 'admin@netcop.ai'
|
||||
admin_email = 'admin@quantumtaskai.com'
|
||||
if User.objects.filter(email=admin_email).exists():
|
||||
self.stdout.write(f"Admin user with email {admin_email} already exists - skipping creation")
|
||||
else:
|
||||
@ -34,7 +34,7 @@ class Command(BaseCommand):
|
||||
first_name='Admin',
|
||||
last_name='User'
|
||||
)
|
||||
self.stdout.write("Created superuser: admin@netcop.ai / admin123")
|
||||
self.stdout.write("Created superuser: admin@quantumtaskai.com / admin123")
|
||||
else:
|
||||
superuser_count = User.objects.filter(is_superuser=True).count()
|
||||
self.stdout.write(f"Superuser(s) already exist ({superuser_count} found) - skipping admin creation")
|
||||
@ -87,6 +87,15 @@ class Command(BaseCommand):
|
||||
'icon': '🔍',
|
||||
'agent_type': 'webhook',
|
||||
},
|
||||
{
|
||||
'name': 'Email Writer',
|
||||
'slug': 'email-writer',
|
||||
'description': 'Generate professional emails for any purpose. Perfect for business communications, customer outreach, and personal correspondence.',
|
||||
'category': 'content',
|
||||
'price': 3.0,
|
||||
'icon': '✉️',
|
||||
'agent_type': 'api',
|
||||
},
|
||||
]
|
||||
|
||||
created_count = 0
|
||||
|
||||
@ -8,8 +8,8 @@ class Command(BaseCommand):
|
||||
help = 'Check and fix admin user status'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
# Check both possible admin emails
|
||||
possible_emails = ['admin@netcop.ai', 'admin@quantumtaskai.com']
|
||||
# Check both possible admin emails (preferred email first)
|
||||
possible_emails = ['admin@quantumtaskai.com', 'admin@netcop.ai']
|
||||
username = 'admin'
|
||||
password = 'QuantumAI2024!'
|
||||
|
||||
@ -49,7 +49,7 @@ class Command(BaseCommand):
|
||||
|
||||
# Show login instructions
|
||||
self.stdout.write("\n📝 Login Instructions:")
|
||||
self.stdout.write(f"URL: https://quantum-ai.up.railway.app/admin/")
|
||||
self.stdout.write(f"URL: https://www.quantumtaskai.com/admin/")
|
||||
self.stdout.write(f"Email: {found_email}")
|
||||
self.stdout.write(f"Username: {username}")
|
||||
self.stdout.write(f"Password: {password}")
|
||||
|
||||
@ -65,7 +65,7 @@ class Command(BaseCommand):
|
||||
self.stdout.write(f"💰 Balance: {user.wallet_balance} AED")
|
||||
|
||||
self.stdout.write("\n🎯 Login Instructions:")
|
||||
self.stdout.write("URL: https://quantum-ai.up.railway.app/admin/")
|
||||
self.stdout.write("URL: https://www.quantumtaskai.com/admin/")
|
||||
self.stdout.write(f"Email: {email}")
|
||||
self.stdout.write(f"Username: {username}")
|
||||
self.stdout.write(f"Password: {password}")
|
||||
|
||||
@ -52,12 +52,12 @@ if missing_vars:
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = config('DEBUG', default=True, cast=bool)
|
||||
|
||||
ALLOWED_HOSTS = config('ALLOWED_HOSTS', default='localhost,127.0.0.1,testserver,quantumtaskai.com').split(',')
|
||||
ALLOWED_HOSTS = config('ALLOWED_HOSTS', default='localhost,127.0.0.1,testserver,quantumtaskai.com,www.quantumtaskai.com').split(',')
|
||||
|
||||
# Site URL configuration for emails
|
||||
if config('RAILWAY_ENVIRONMENT', default=''):
|
||||
# Use actual Railway domain for email verification links
|
||||
SITE_URL = 'https://quantum-ai.up.railway.app'
|
||||
# Use production domain for email verification links
|
||||
SITE_URL = 'https://www.quantumtaskai.com'
|
||||
else:
|
||||
SITE_URL = config('SITE_URL', default='http://localhost:8000')
|
||||
|
||||
@ -315,8 +315,8 @@ if config('RAILWAY_ENVIRONMENT', default=''):
|
||||
if railway_url and f'https://{railway_url}' not in CSRF_TRUSTED_ORIGINS:
|
||||
CSRF_TRUSTED_ORIGINS.append(f'https://{railway_url}')
|
||||
|
||||
# Also add production domain
|
||||
CSRF_TRUSTED_ORIGINS.append('https://quantumtaskai.com')
|
||||
# Also add production domains (both www and non-www)
|
||||
CSRF_TRUSTED_ORIGINS.extend(['https://quantumtaskai.com', 'https://www.quantumtaskai.com'])
|
||||
|
||||
# Railway-specific optimizations
|
||||
USE_X_FORWARDED_HOST = True
|
||||
|
||||
@ -31,8 +31,8 @@ class StripePaymentHandler:
|
||||
cancel_url = request.build_absolute_uri('/wallet/top-up/cancel/')
|
||||
else:
|
||||
# Fallback URLs
|
||||
success_url = 'https://quantumtaskai.com/wallet/top-up/success/?session_id={CHECKOUT_SESSION_ID}'
|
||||
cancel_url = 'https://quantumtaskai.com/wallet/top-up/cancel/'
|
||||
success_url = 'https://www.quantumtaskai.com/wallet/top-up/success/?session_id={CHECKOUT_SESSION_ID}'
|
||||
cancel_url = 'https://www.quantumtaskai.com/wallet/top-up/cancel/'
|
||||
|
||||
try:
|
||||
logger.info(f"Creating checkout session for user {user.id}, amount: {amount} AED")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user