pagespeed on;
pagespeed EnableFilters collapse_whitespace;
class PageAdminForm(forms.ModelForm):
class Meta:
model = Page
def clean(self):
if not list(filter(None, self.data.values())):
msg = 'Не заполнено ни одно поле'
self.add_error(None, msg)
class PageAdmin(admin.ModelAdmin):
form = PageAdminForm
fields = []
inlines = [PageInline_Text, PageInline_Audio, PageInline_Video]