mirror of
https://github.com/thecyberlearn/quantumtaskai-caprover.git
synced 2026-08-18 13:12:55 +00:00
Complete Django AI agent marketplace with security optimizations and clean deployment documentation without any API keys or secrets. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
from django.shortcuts import render
|
|
from django.http import HttpResponseNotFound, HttpResponseServerError, HttpResponseForbidden, HttpResponseBadRequest
|
|
|
|
|
|
def custom_404_view(request, exception):
|
|
"""Custom 404 error page with agent theme"""
|
|
return HttpResponseNotFound(
|
|
render(request, '404.html', {
|
|
'timestamp': '1.0' # Cache busting for CSS
|
|
}).content
|
|
)
|
|
|
|
|
|
def custom_500_view(request):
|
|
"""Custom 500 error page with agent theme"""
|
|
return HttpResponseServerError(
|
|
render(request, '500.html', {
|
|
'timestamp': '1.0' # Cache busting for CSS
|
|
}).content
|
|
)
|
|
|
|
|
|
def custom_403_view(request, exception):
|
|
"""Custom 403 error page with agent theme"""
|
|
return HttpResponseForbidden(
|
|
render(request, '403.html', {
|
|
'timestamp': '1.0' # Cache busting for CSS
|
|
}).content
|
|
)
|
|
|
|
|
|
def custom_400_view(request, exception):
|
|
"""Custom 400 error page with agent theme"""
|
|
return HttpResponseBadRequest(
|
|
render(request, '400.html', {
|
|
'timestamp': '1.0' # Cache busting for CSS
|
|
}).content
|
|
) |