Missing docs about new django.contrib.postgres system check from #32770

Hi!

I came across the system check introduced in #32770 because we were using ArrayField and did not have ‘django.contrib.postgres’ in INSTALLED_APPS.

I checked the docs and this detail is a bit scattered. I wasn’t able to find a centralised place that asked to add ‘django.contrib.postgres’ to INSTALLED_APPS. Instead, there are some PostgreSQL related docs that mention it while others don’t.

From the features affected by the ticket, mentioned in this commit:

PostgreSQL-specific fields:

  • (no) ArrayField
  • (yes) HStoreField
  • (no) Range fields
  • (no) SearchVectorField

(no) PostgreSQL indexes

(no) ExclusionConstraint

NB: I couldn’t link the docs of each of the features above because, as a new user, I’m only allowed to add 2 links per post.

Am I missing the place where this is mentioned? Is it considered a given that users should know they have to add ‘django.contrib.postgres’ to INSTALLED_APPS if they want to use these features?

If not, I’d like to contribute and update the documentation myself, should I add a comment similar to the one in HStoreField like ‘To use it, add 'django.contrib.postgres' in your :setting:INSTALLED_APPS’ in each place or would it be better to add it in a centralised place?

Also, should I open a ticket or a PR directly?

Thanks!

This is something covered in the parent topic - See contrib packages | Django documentation | Django

This requirement holds true for all contrib projects - including auth, admin, and sessions.

Right, ok! Thank you!