API stability¶
What this package promises not to break, how long a deprecation lasts, and which versions of django CMS, Django and Python it is supported on.
Note
The package is at 0.x. Until 1.0 these rules describe intent rather than
a guarantee — a minor release may still contain a breaking change, and the
changelog says so when it does.
The public API¶
Anything listed here is covered by the deprecation policy below. Everything else — including any name starting with an underscore — is internal and may change in any release.
Model bases
djangocms_custom_content.models.AbstractCustomGrouper, and itsget_content()/get_admin_content()methodsdjangocms_custom_content.models.AbstractCustomContent, and itsget_template(),validate_unique()andfind_slug_conflicts()methods along with theobjectsandadmin_managermanagersdjangocms_custom_content.models.CustomGrouperMixinanddjangocms_custom_content.models.CustomContentMixinfor combining the same behavior with another Django model basedjangocms_custom_content.models.CustomContentManageranddjangocms_custom_content.models.ContentAdminManager, required by content models that use the mixin directly
Relations
djangocms_custom_content.relations.RelationFieldand its arguments (target,related_name,ordered,through_name)the accessor API returned by a relation:
all(),filter(),count(),exists(),add(),remove(),set(),clear()and — for ordered relations —reorder()djangocms_custom_content.relations.iter_relation_fields()
Admin and forms
djangocms_custom_content.forms.RelationModelForm
App hooks
djangocms_custom_content.apphooks.AppHookConfigand its arguments
Declarations read by the framework
the
CMSConfiginner class and its options (see Reference)the special field names
slugandlanguage(see Special field names)
Templates
the bundled template paths, which are how you override the markup (see Overriding a bundled template)
the
{app_label}/{model_name}_detail.htmlnaming convention and the context variable named after the model
Settings
CMS_SETTINGS_SHORTCUT
Explicitly not public¶
djangocms_custom_content.cms_config— the app-registry wiringdjangocms_custom_content.views— the generated detail view and its mixins are an implementation detail of the app hook; subclass at your own riskdjangocms_custom_content.relation_admin— widget and autocomplete plumbingdjangocms_custom_content.helperseverything under
djangocms_custom_content.contrib— see The contrib appsthe shape of generated through models and app hook classes
Deprecation policy¶
From 1.0 onwards:
A public name is never removed without first being deprecated.
A deprecation is announced in the changelog, raises
DeprecationWarningwhen used, and keeps working for two minor releases (deprecate in 1.2, remove no earlier than 1.4).Behaviour changes that cannot be expressed as a rename — a default flipping, say — get a release note in the changelog under Breaking changes and, where it is possible, a transitional setting.
Security fixes and changes forced by an upstream django CMS release are exempt; those are called out in the changelog instead.
The contrib apps¶
djangocms_custom_content.contrib.* ships complete applications, not
sketches. They double as worked examples of the framework, but they are meant to
be installed and relied on:
their models, plugins, templates and admin classes are covered by the deprecation policy above;
migrations are a continuity promise. Every schema change arrives as a migration that upgrades an existing installation, with its data. Migrations are not squashed in a way that strands a database;
their template paths are public, so overrides keep working (see Overriding a bundled template).
Copying an app into your own project remains a perfectly good way to start from one — the framework underneath is what makes that easy — but you do not have to.
Note
The continuity promise starts at 0.9.0. One earlier change does not honour
it: contrib.services was reshaped from a plain model into a grouper/content
pair and re-issued as a single 0001_initial, which a database that
installed the 0.5.0 app silently skips. If that is you, copy the 0.5.0 services
app into your own project rather than upgrading to this one — see the 0.9.0
entry in Changelog. There are no other such breaks.
Supported versions¶
A release supports the combinations it is tested against in CI. Rather than repeat them here, where they would drift out of date, the badges below read the released package’s own metadata:
djangocms-versioning is an optional dependency — the versioning package
enable_versioning integrates with. The extra is named after the package
rather than after the feature, since versioning is a concept and this is one
implementation of it:
pip install djangocms-custom-content[djangocms-versioning]
Dropping a Python, Django or django CMS version is a minor release change and is announced in the changelog. Adding support for a new one is not breaking and may happen in any release.
Note
On the oldest supported django CMS one feature degrades rather than failing.
The toolbar’s settings link cannot name the version being viewed, because
GrouperModelAdmin.content_pk_url_param was added later; the link opens the
latest content instead, which is what that release has always done.
Everything else behaves identically, and the test suite runs against every
supported release.