mwieler/django-registration-1.5 — pull request #1 by bd808 (2013-07-18 16:35:19+00:00)
Title: Fix for IntegrityError when using custom User model

I'm using a fork of your fork in a project and found that new user creation failed due to a subtle bug in the ForeignKey linking RegistrationProfile to the User model.

Without patch #10265cc:

insert or update on table "registration_registrationprofile" violates foreign key constraint
"registration_registrationprofile_user_id_fkey"
DETAIL: Key (user_id)=(3) is not present in table "auth_user".

I'm using `AUTH_USER_MODEL = 'profile.CalUser'` in my settings file, so the foreign key should have connected to my custom table instead of `auth_user`. Changing the FK to use `settings.AUTH_USER_MODEL` instead of `User` fixes the crash.