Compare commits
2 Commits
db3dd39696
...
f0fbd8021f
Author | SHA1 | Date |
---|---|---|
Jonas Havelka | f0fbd8021f | 1 week ago |
Jonas Havelka | 3d035b994a | 1 week 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