fix(admin,ui): disable extra inline form to fix validation and stretch CKEditor images

This commit is contained in:
Dmitry Belan
2026-09-19 18:38:01 +03:00
parent 8cf8e0d869
commit 2cf38ef27e
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ class SubjectAdmin(ModelAdmin):
class QuestionInline(StackedInline): class QuestionInline(StackedInline):
model = Question model = Question
extra = 1 extra = 0
class Media: class Media:
js = ('js/admin_assignment.js',) js = ('js/admin_assignment.js',)
+7
View File
@@ -8,6 +8,13 @@
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<style> <style>
body { font-family: 'Inter', sans-serif; background-color: #f8fafc; } body { font-family: 'Inter', sans-serif; background-color: #f8fafc; }
/* Исправление для картинок из CKEditor: растягиваем по ширине и сохраняем пропорции */
.prose img {
width: 100% !important;
height: auto !important;
border-radius: 0.5rem;
}
</style> </style>
</head> </head>
<body class="text-gray-800 antialiased h-screen flex flex-col"> <body class="text-gray-800 antialiased h-screen flex flex-col">