Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 3m10s
CI/CD Pipeline / Run Tests (push) Successful in 3m35s
CI/CD Pipeline / Telegram Notify Success (push) Has been skipped
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 2m26s
CI/CD Pipeline / Run Tests (pull_request) Successful in 2m46s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped
26 lines
760 B
Python
26 lines
760 B
Python
"""Admin configuration for exchange app."""
|
|
|
|
from apps.exchange.models import ExchangeConnection
|
|
from django.contrib import admin
|
|
|
|
|
|
@admin.register(ExchangeConnection)
|
|
class ExchangeConnectionAdmin(admin.ModelAdmin):
|
|
"""Admin для подключений обмена."""
|
|
|
|
list_display = [
|
|
"id",
|
|
"server",
|
|
"port",
|
|
"username",
|
|
"database_name",
|
|
"schema_name",
|
|
"is_active",
|
|
"last_checked_at",
|
|
"created_at",
|
|
]
|
|
list_filter = ["is_active", "created_at", "last_checked_at"]
|
|
search_fields = ["server", "username", "database_name", "schema_name"]
|
|
readonly_fields = ["created_at", "updated_at", "last_checked_at", "last_error"]
|
|
ordering = ["-is_active", "-created_at"]
|