Add organizations v2 API and registry enrichment
All checks were successful
CI/CD Pipeline / Quality Gate (push) Successful in 26s
CI/CD Pipeline / Build and Push Images (push) Successful in 6s
CI/CD Pipeline / Internal Notify (push) Successful in 0s
CI/CD Pipeline / Deploy Dev in Dokploy (push) Successful in 1s

This commit is contained in:
2026-05-06 19:04:46 +02:00
parent f54aa4cb0b
commit 0f17ff6773
62 changed files with 10311 additions and 430 deletions

View File

@@ -0,0 +1,22 @@
"""Admin configuration for organizations app."""
from django.contrib import admin
from organizations.models import Organization
@admin.register(Organization)
class OrganizationAdmin(admin.ModelAdmin):
"""Admin for canonical organizations."""
list_display = ["name_short", "inn", "kpp", "ogrn", "ogrip"]
search_fields = ["name", "inn", "kpp", "ogrn", "ogrip"]
ordering = ["name"]
readonly_fields = ["uid"]
def name_short(self, obj: Organization) -> str:
name = obj.name or ""
return name[:80] + "..." if len(name) > 80 else name
name_short.short_description = "Организация"
name_short.admin_order_field = "name"