<gh_stars>0
from django.contrib import admin
from django.contrib.flatpages.models import FlatPage

# Note: we are renaming the original Admin and Form as we import them!
from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld
from django.contrib.flatpages.admin import FlatpageForm as FlatpageFormOld

from django import forms
from ckeditor.widgets import CKEditorWidget


class FlatpageForm(FlatpageFormOld):
    content = forms.CharField(widget=CKEditorWidget())

    class Meta:
        # this is not automatically inherited from FlatpageFormOld
        model = FlatPage


class FlatPageAdmin(FlatPageAdminOld):
    form = FlatpageForm
    filter_horizontal = ['sites']

from django.contrib import admin
from django.contrib.flatpages.models import FlatPage

# Note: we are renaming the original Admin and Form as we import them!
from django.contrib.flatpages.admin import FlatPageAdmin as FlatPageAdminOld
from django.contrib.flatpages.admin import FlatpageForm as FlatpageFormOld

from django import forms
from ckeditor.widgets import CKEditorWidget


class FlatpageForm(FlatpageFormOld):
    content = forms.CharField(widget=CKEditorWidget())

    class Meta:
        # this is not automatically inherited from FlatpageFormOld
        model = FlatPage


class FlatPageAdmin(FlatPageAdminOld):
    form = FlatpageForm
    filter_horizontal = ['sites']
# Note: we are renaming the original Admin and Form as we import them! # this is not automatically inherited from FlatpageFormOld