Skip to content

Commit

Permalink
Update Django database docs
Browse files Browse the repository at this point in the history
Help people not to shoot themselves in the foot by first highlighting the JSONFIELD
setting and only then pointing to migrate, if you first migrate it's much harder to fix 
this setting later.

Also fixed the JSONFIELD setting to the latest recommended since Django 3.1
  • Loading branch information
omercnet committed Oct 1, 2021
1 parent 2f807cf commit 614cee1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/configuration/django.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ Also ensure to define the MongoEngine_ storage setting::
Database
--------

When using PostgreSQL, it's recommended to use the built-in `JSONB`
field to store the extracted ``extra_data``. To enable it define the setting::

SOCIAL_AUTH_JSONFIELD_ENABLED = True

(For Django 1.7 and higher) you need to sync the database to create needed
models once you added ``social_django`` to your installed apps::

./manage.py migrate

When using PostgreSQL, it's recommended to use the built-in `JSONB`
field to store the extracted `extra_data`. To enable it define the setting::

SOCIAL_AUTH_POSTGRES_JSONFIELD = True


Authentication backends
-----------------------
Expand Down

0 comments on commit 614cee1

Please sign in to comment.