| ... | ... | @@ -21,6 +21,16 @@ It's recommended that you use or extend DjangoLDP-Account, as out of the box it |
|
|
|
|
|
|
|
If you want to use DjangoLDP-Account, but you don't need to understand its internal workings, please refer to the [DjangoLDP-Account Readme](https://git.startinblox.com/djangoldp-packages/djangoldp-account) which has a step-by-step on installation and usage
|
|
|
|
|
|
|
|
## Migrating From an existing user model
|
|
|
|
|
|
|
|
In Django, migrating the user model can be a delicate task. From the [Django documentation](https://docs.djangoproject.com/en/1.11/topics/auth/customizing/#changing-to-a-custom-user-model-mid-project):
|
|
|
|
|
|
|
|
> Changing AUTH_USER_MODEL after you’ve created database tables is significantly more difficult since it affects foreign keys and many-to-many relationships, for example. Due to limitations of Django’s dynamic dependency feature for swappable models, the model referenced by AUTH_USER_MODEL must be created in the first migration of its app (usually called 0001_initial); otherwise, you’ll have dependency issues.
|
|
|
|
|
|
|
|
You have to be **very** careful when migrating this without losing users or breaking foreign keys
|
|
|
|
|
|
|
|
If you have issues with the migration, for example when running `sib install` you have an `InconsistentMigrationHistory` exception, please refer to [this helper](helpers/migrating user model)
|
|
|
|
|
|
|
|
# How It Works
|
|
|
|
|
|
|
|
This part of the guide is intended for developers who may need to understand DjangoLDP-Account's internal workings, as opposed to those who simply need to use it
|
| ... | ... | |
| ... | ... | |