diff --git a/docs/howto/contrib-apps.rst b/docs/howto/contrib-apps.rst index 7f4a0a01b..c899b0673 100644 --- a/docs/howto/contrib-apps.rst +++ b/docs/howto/contrib-apps.rst @@ -2,9 +2,23 @@ Configuring Django's contrib apps ================================= -Generally, Django's contribs app work out of the box, but here are some +Generally, Django's contrib apps work out of the box, but here are some required adjustments. +Apps with models +================ + +Each contrib app that has models that use :class:`~django.db.models.AutoField` +(:mod:`~django.contrib.admin`, :mod:`~django.contrib.auth`, +:mod:`~django.contrib.contenttypes`, :mod:`~django.contrib.flatpages`, +:mod:`~django.contrib.redirects`, and :mod:`~django.contrib.sites`) must: + +#. Be configured with an ``AppConfig`` that specifies + ``default_auto_field = "django_mongodb_backend.fields.ObjectIdAutoField"``. + See :ref:`specifying the-default-pk-field`. +#. Have migrations that use :class:`.ObjectIdAutoField`. See + :ref:`configuring-migrations`. + ``contrib.sites`` ================= diff --git a/docs/intro/configure.rst b/docs/intro/configure.rst index 9aebcc030..d915547da 100644 --- a/docs/intro/configure.rst +++ b/docs/intro/configure.rst @@ -53,6 +53,8 @@ Each app reference in the :setting:`INSTALLED_APPS` setting must point to the corresponding ``AppConfig``. For example, instead of ``'django.contrib.admin'``, the template uses ``'.apps.MongoAdminConfig'``. +.. _configuring-migrations: + Configuring migrations ======================