🚫 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:
Claude 2025-08-03 15:54:04 +05:30
parent 40574db8b0
commit 962d58d37e
2 changed files with 3 additions and 27 deletions

View File

@ -39,30 +39,9 @@ def homepage_view(request):
return render(request, 'core/homepage.html', {'featured_agents': [], 'user_balance': 0}) return render(request, 'core/homepage.html', {'featured_agents': [], 'user_balance': 0})
@ratelimit(key='ip', rate='60/m', method='GET', block=False) @ratelimit(key='ip', rate='60/m', method='GET', block=False)
def pricing_view(request): def pricing_view(request):
"""Pricing page for non-logged-in users with rate limiting""" """Pricing page - redirect to marketplace"""
# Check if rate limited # Redirect all pricing page access to the AI marketplace
if getattr(request, 'limited', False): return redirect('agents:marketplace')
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': []})
@ratelimit(key='ip', rate='60/m', method='GET', block=False) @ratelimit(key='ip', rate='60/m', method='GET', block=False)

View File

@ -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: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 '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> <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> </nav>
<button class="mobile-nav-toggle" onclick="toggleMobileNav()" aria-label="Toggle navigation"> <button class="mobile-nav-toggle" onclick="toggleMobileNav()" aria-label="Toggle navigation">