netcop-ai/wallet/admin.py
thecyberlearn 060c3a9c78 Initial commit: Django web app with user auth, Stripe payments, and n8n workflow integration
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>
2025-07-30 13:34:19 +05:30

24 lines
810 B
Python

from django.contrib import admin
from .models import WalletTransaction
@admin.register(WalletTransaction)
class WalletTransactionAdmin(admin.ModelAdmin):
list_display = ('user', 'transaction_type', 'amount', 'status', 'created_at')
list_filter = ('transaction_type', 'status', 'created_at')
search_fields = ('user__email', 'stripe_payment_intent_id', 'description')
ordering = ('-created_at',)
readonly_fields = ('id', 'created_at', 'updated_at')
fieldsets = (
('Transaction Info', {
'fields': ('user', 'transaction_type', 'amount', 'status')
}),
('Stripe Info', {
'fields': ('stripe_payment_intent_id',)
}),
('Additional Info', {
'fields': ('description', 'created_at', 'updated_at')
}),
)