mirror of
https://github.com/thecyberlearn/netcop-ai.git
synced 2026-08-18 22:53:01 +00:00
Features: - Email-based user authentication with token auth - Stripe Checkout integration for wallet top-ups - n8n workflow triggering with automatic fee deduction ($0.10) - Comprehensive transaction and usage logging - Django Admin interface for monitoring - Rate limiting and security middleware - Production-ready deployment configuration - Modular settings (dev/prod environments) - UUID primary keys for enhanced security - Comprehensive test coverage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
29 lines
944 B
Python
29 lines
944 B
Python
from django.contrib import admin
|
|
from .models import WorkflowUsage
|
|
|
|
|
|
@admin.register(WorkflowUsage)
|
|
class WorkflowUsageAdmin(admin.ModelAdmin):
|
|
list_display = ('user', 'workflow_name', 'fee_charged', 'status', 'created_at')
|
|
list_filter = ('status', 'workflow_name', 'created_at')
|
|
search_fields = ('user__email', 'workflow_name', 'workflow_url')
|
|
ordering = ('-created_at',)
|
|
readonly_fields = ('id', 'created_at', 'updated_at')
|
|
|
|
fieldsets = (
|
|
('Workflow Info', {
|
|
'fields': ('user', 'workflow_name', 'workflow_url', 'fee_charged', 'status')
|
|
}),
|
|
('Request Data', {
|
|
'fields': ('request_data',),
|
|
'classes': ('collapse',)
|
|
}),
|
|
('Response Data', {
|
|
'fields': ('response_data', 'error_message'),
|
|
'classes': ('collapse',)
|
|
}),
|
|
('Timestamps', {
|
|
'fields': ('created_at', 'updated_at')
|
|
}),
|
|
)
|