Changes between Initial Version and Version 1 of Ticket #31221, comment 1


Ignore:
Timestamp:
Jan 31, 2020, 3:20:08 PM (5 years ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31221, comment 1

    initial v1  
    11Did you make sure to add `django.contrib.postgres` to your `INSTALLED_APPS` [https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#hstorefield as documented]?
    22
    3 The latter is in charge of [https://github.com/django/django/blob/b9cf764be62e77b4777b3a75ec256f6209a57671/django/contrib/postgres/apps.py#L11-L28 connecting a signal receiver] that [https://github.com/django/django/blob/b9cf764be62e77b4777b3a75ec256f6209a57671/django/contrib/postgres/signals.py#L37-L43 registers] the necessary `psycopg2` adapters on connection creation.
     3The latter is in charge of [https://github.com/django/django/blob/b9cf764be62e77b4777b3a75ec256f6209a57671/django/contrib/postgres/apps.py#L11-L28 connecting a signal receiver] that [https://github.com/django/django/blob/b9cf764be62e77b4777b3a75ec256f6209a57671/django/contrib/postgres/signals.py#L37-L43 registers] the necessary `psycopg2` adapters on connection creation that [https://www.psycopg.org/docs/extras.html#hstore-data-type turns the string provided by PostgreSQL into a Python dict].
    44
    55If that's the origin of your issue I suggest we re-purpose this ticket to add system checks to all `django.contrib.postgres.fields` that errors when a field is used but `self.model._meta.apps.get('postgres')` is missing.
Back to Top