def _create_content_base(cls):
            """
            This is purely an internal method. Here, we create a base class for
            the concrete content types, which are built in
            ``create_content_type``.

            The three fields added to build a concrete content type class/model
            are ``parent``, ``region`` and ``ordering``.
            """

            # We need a template, because of the possibility of restricting
            # content types to a subset of all available regions. Each region
            # object carries a list of all allowed content types around.
            # Content types created before a region is initialized would not be
            # available in the respective region; we avoid this problem by
            # raising an ImproperlyConfigured exception early.
            cls._needs_templates()

            class Meta:
                abstract = True
                app_label = cls._meta.app_label
                ordering = ["ordering"]

            def __str__(self):
                return (
                    "%s<pk=%s, parent=%s<pk=%s, %s>, region=%s," " ordering=%d>"
                ) % (
                    self.__class__.__name__,
                    self.pk,
                    self.parent.__class__.__name__,
                    self.parent.pk,
                    self.parent,
                    self.region,
                    self.ordering,
                )

            def render(self, **kwargs):
                """
                Default render implementation, tries to call a method named
                after the region key before giving up.

                You'll probably override the render method itself most of the
                time instead of adding region-specific render methods.
                """

                render_fn = getattr(self, "render_%s" % self.region, None)

                if render_fn:
                    return render_fn(**kwargs)

                raise NotImplementedError

            def get_queryset(cls, filter_args=None):
                qs = cls.objects.select_related()
                if filter_args is not None:
                    return qs.filter(filter_args)
                return qs

            attrs = {
                # The basic content type is put into
                # the same module as the CMS base type.
                # If an app_label is not given, Django
                # needs to know where a model comes
                # from, therefore we ensure that the
                # module is always known.
                "__module__": cls.__module__,
                "__str__": __str__,
                "render": render,
                "get_queryset": classmethod(get_queryset),
                "Meta": Meta,
                "parent": models.ForeignKey(
                    cls, related_name="%(class)s_set", on_delete=models.CASCADE
                ),
                "region": models.CharField(max_length=255),
                "ordering": models.IntegerField(_("ordering"), default=0),
            }

            # create content base type and save reference on CMS class

            name = "_Internal%sContentTypeBase" % cls.__name__
            if hasattr(sys.modules[cls.__module__], name):
                warnings.warn(
                    "The class %s.%s has the same name as the class that "
                    "FeinCMS auto-generates based on %s.%s. To avoid database"
                    "errors and import clashes, rename one of these classes."
                    % (cls.__module__, name, cls.__module__, cls.__name__),
                    RuntimeWarning,
                )

            cls._feincms_content_model = type(str(name), (models.Model,), attrs)

            # list of concrete content types
            cls._feincms_content_types = []

            # list of concrete content types having methods which may be called
            # before or after rendering the content:
            #
            # def process(self, request, **kwargs):
            #     May return a response early to short-circuit the
            #     request-response cycle
            #
            # def finalize(self, request, response)
            #     May modify the response or replace it entirely by returning
            #     a new one
            #
            cls._feincms_content_types_with_process = []
            cls._feincms_content_types_with_finalize = []

            # list of item editor context processors, will be extended by
            # content types
            if hasattr(cls, "feincms_item_editor_context_processors"):
                cls.feincms_item_editor_context_processors = list(
                    cls.feincms_item_editor_context_processors
                )
            else:
                cls.feincms_item_editor_context_processors = []

            # list of templates which should be included in the item editor,
            # will be extended by content types
            if hasattr(cls, "feincms_item_editor_includes"):
                cls.feincms_item_editor_includes = dict(
                    cls.feincms_item_editor_includes
                )
            else:
                cls.feincms_item_editor_includes = {}

            This is purely an internal method. Here, we create a base class for
            the concrete content types, which are built in
            ``create_content_type``.

            The three fields added to build a concrete content type class/model
            are ``parent``, ``region`` and ``ordering``.
            
feincms/models.py