mirror of
https://github.com/thecyberlearn/netcop-ai.git
synced 2026-08-18 12:12:59 +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
996 B
Python
29 lines
996 B
Python
from django.contrib import admin
|
|
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
|
|
from .models import User
|
|
|
|
|
|
@admin.register(User)
|
|
class UserAdmin(BaseUserAdmin):
|
|
list_display = ('email', 'wallet_balance', 'is_active', 'created_at')
|
|
list_filter = ('is_active', 'is_staff', 'created_at')
|
|
search_fields = ('email',)
|
|
ordering = ('-created_at',)
|
|
|
|
fieldsets = (
|
|
(None, {'fields': ('email', 'password')}),
|
|
('Personal info', {'fields': ('first_name', 'last_name')}),
|
|
('Wallet', {'fields': ('wallet_balance',)}),
|
|
('Permissions', {'fields': ('is_active', 'is_staff', 'is_superuser', 'groups', 'user_permissions')}),
|
|
('Important dates', {'fields': ('last_login', 'date_joined', 'created_at', 'updated_at')}),
|
|
)
|
|
|
|
add_fieldsets = (
|
|
(None, {
|
|
'classes': ('wide',),
|
|
'fields': ('email', 'password1', 'password2'),
|
|
}),
|
|
)
|
|
|
|
readonly_fields = ('created_at', 'updated_at')
|