Froud
This commit is contained in:
@@ -6,7 +6,8 @@ from .models import (
|
||||
APIConfiguration,
|
||||
APIRequestLog,
|
||||
Reservation,
|
||||
Guest
|
||||
Guest,
|
||||
FraudLog
|
||||
)
|
||||
from django.urls import path
|
||||
from django.shortcuts import redirect
|
||||
@@ -53,7 +54,13 @@ class HotelAdmin(admin.ModelAdmin):
|
||||
self.message_user(request, f"Ошибка: {str(e)}", level="error")
|
||||
return redirect("..")
|
||||
|
||||
|
||||
@admin.register(FraudLog)
|
||||
class FroudAdmin(admin.ModelAdmin):
|
||||
list_display = ('hotel', 'reservation_id', 'guest_name', 'check_in_date', 'detected_at', 'message')
|
||||
search_fields = ('hotel__name', 'reservation_id', 'guest_name', 'check_in_date', 'message')
|
||||
list_filter = ('hotel', 'check_in_date', 'detected_at')
|
||||
ordering = ('-detected_at',)
|
||||
|
||||
@admin.register(UserHotel)
|
||||
class UserHotelAdmin(admin.ModelAdmin):
|
||||
list_display = ('user', 'hotel')
|
||||
|
||||
Reference in New Issue
Block a user