Přidání CKEditoru do Soustředění a Novinek (#1294) #75
Merged
zelvuska
merged 1 commits from ckeditor-dalsi-veci
into master
1 month ago
2 changed files with 28 additions and 2 deletions
@ -1,5 +1,20 @@ |
|||
import django.forms |
|||
from django.contrib import admin |
|||
|
|||
from ckeditor_uploader.widgets import CKEditorUploadingWidget |
|||
|
|||
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