20 lines
375 B

import django.forms
from django.contrib import admin
from django_ckeditor_5.widgets import CKEditor5Widget
from .models import Novinky
class NovinkyAdminForm(django.forms.ModelForm):
class Meta:
model = Novinky
widgets = {
'text': CKEditor5Widget,
}
fields = '__all__'
@admin.register(Novinky)
class NovinkyAdmin(admin.ModelAdmin):
form = NovinkyAdminForm