mirror of
https://github.com/thecyberlearn/quantum-ai-v3.git
synced 2026-08-18 09:52:58 +00:00
🚫 Hide pricing page completely from all users
• Remove pricing link from navigation for all users • Redirect pricing page access to AI marketplace • Clean navigation with only essential pages: - Home - AI Digital Branding - AI Marketplace • Graceful handling if anyone tries to access pricing directly 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
40574db8b0
commit
962d58d37e
@ -39,30 +39,9 @@ def homepage_view(request):
|
||||
return render(request, 'core/homepage.html', {'featured_agents': [], 'user_balance': 0})
|
||||
@ratelimit(key='ip', rate='60/m', method='GET', block=False)
|
||||
def pricing_view(request):
|
||||
"""Pricing page for non-logged-in users with rate limiting"""
|
||||
# Check if rate limited
|
||||
if getattr(request, 'limited', False):
|
||||
logger.warning(f"Pricing page rate limit exceeded for IP {request.META.get('REMOTE_ADDR')}")
|
||||
messages.warning(request, 'Too many requests. Please wait a moment before refreshing.')
|
||||
|
||||
# If user is already logged in, redirect to wallet top-up
|
||||
if request.user.is_authenticated:
|
||||
return redirect('wallet:wallet_topup')
|
||||
|
||||
try:
|
||||
# Get sample agents to show pricing context from database
|
||||
sample_agents = Agent.objects.filter(is_active=True).select_related('category')[:4]
|
||||
|
||||
context = {
|
||||
'sample_agents': sample_agents,
|
||||
}
|
||||
|
||||
return render(request, 'core/pricing.html', context)
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Pricing view error: {e}")
|
||||
messages.error(request, 'Unable to load pricing page. Please try again.')
|
||||
return render(request, 'core/pricing.html', {'sample_agents': []})
|
||||
"""Pricing page - redirect to marketplace"""
|
||||
# Redirect all pricing page access to the AI marketplace
|
||||
return redirect('agents:marketplace')
|
||||
|
||||
|
||||
@ratelimit(key='ip', rate='60/m', method='GET', block=False)
|
||||
|
||||
@ -32,9 +32,6 @@
|
||||
<a href="{% url 'core:homepage' %}" class="nav-link {% if request.resolver_match.url_name == 'homepage' %}active{% endif %}">Home</a>
|
||||
<a href="{% url 'core:digital_branding' %}" class="nav-link {% if request.resolver_match.url_name == 'digital_branding' %}active{% endif %}">AI Digital Branding</a>
|
||||
<a href="{% url 'agents:marketplace' %}" class="nav-link {% if request.resolver_match.url_name == 'marketplace' %}active{% endif %}">AI Marketplace</a>
|
||||
{% if not user.is_authenticated %}
|
||||
<a href="{% url 'core:pricing' %}" class="nav-link {% if request.resolver_match.url_name == 'pricing' %}active{% endif %}">Pricing</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
<button class="mobile-nav-toggle" onclick="toggleMobileNav()" aria-label="Toggle navigation">
|
||||
☰
|
||||
|
||||
Loading…
Reference in New Issue
Block a user