Compare commits
No commits in common. "f0fbd8021f6e8ac33a23e0d5acf72b7df6f6cf17" and "db3dd39696a9f574c3c9a58aba731ff7667a0b56" have entirely different histories.
f0fbd8021f
...
db3dd39696
2 changed files with 2 additions and 28 deletions
|
@ -1,20 +1,5 @@
|
||||||
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
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
import django.forms
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.forms import widgets
|
from django.forms import widgets
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
from ckeditor_uploader.widgets import CKEditorUploadingWidget
|
|
||||||
|
|
||||||
import soustredeni.models as m
|
import soustredeni.models as m
|
||||||
|
|
||||||
|
|
||||||
|
@ -38,17 +35,9 @@ class SoustredeniOrganizatoriInline(admin.TabularInline):
|
||||||
return qs.select_related('organizator', 'soustredeni')
|
return qs.select_related('organizator', 'soustredeni')
|
||||||
|
|
||||||
|
|
||||||
class SoustredeniAdminForm(django.forms.ModelForm):
|
|
||||||
class Meta:
|
|
||||||
model = m.Soustredeni
|
|
||||||
widgets = {
|
|
||||||
'text': CKEditorUploadingWidget,
|
|
||||||
}
|
|
||||||
fields = '__all__'
|
|
||||||
|
|
||||||
@admin.register(m.Soustredeni)
|
@admin.register(m.Soustredeni)
|
||||||
class SoustredeniAdmin(admin.ModelAdmin):
|
class SoustredeniAdmin(admin.ModelAdmin):
|
||||||
form = SoustredeniAdminForm
|
model = m.Soustredeni
|
||||||
inline_type = 'tabular'
|
inline_type = 'tabular'
|
||||||
inlines = [SoustredeniUcastniciInline, SoustredeniOrganizatoriInline]
|
inlines = [SoustredeniUcastniciInline, SoustredeniOrganizatoriInline]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue