mamweb/novinky/admin.py

21 lines
375 B
Python
Raw Normal View History

import django.forms
from django.contrib import admin
2024-11-19 22:05:12 +01:00
from django_ckeditor_5.widgets import CKEditor5Widget
2024-05-13 23:13:51 +02:00
from .models import Novinky
class NovinkyAdminForm(django.forms.ModelForm):
class Meta:
model = Novinky
widgets = {
2024-11-19 22:05:12 +01:00
'text': CKEditor5Widget,
}
fields = '__all__'
@admin.register(Novinky)
class NovinkyAdmin(admin.ModelAdmin):
form = NovinkyAdminForm