Jonas Havelka
5 days ago
2 changed files with 28 additions and 2 deletions
@ -1,5 +1,20 @@ |
|||||
|
import django.forms |
||||
from django.contrib import admin |
from django.contrib import admin |
||||
|
|
||||
|
from ckeditor_uploader.widgets import CKEditorUploadingWidget |
||||
|
|
||||
from .models import Novinky |
from .models import Novinky |
||||
|
|
||||
admin.site.register(Novinky) |
|
||||
|
class NovinkyAdminForm(django.forms.ModelForm): |
||||
|
class Meta: |
||||
|
model = Novinky |
||||
|
widgets = { |
||||
|
'text': CKEditorUploadingWidget, |
||||
|
} |
||||
|
fields = '__all__' |
||||
|
|
||||
|
@admin.register(Novinky) |
||||
|
class NovinkyAdmin(admin.ModelAdmin): |
||||
|
form = NovinkyAdminForm |
||||
|
|
||||
|
Loading…
Reference in new issue