fix(admin,ui): disable extra inline form to fix validation and stretch CKEditor images
This commit is contained in:
+1
-1
@@ -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',)
|
||||||
|
|||||||
@@ -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">
|
||||||
|
|||||||
Reference in New Issue
Block a user