Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic auth user model pk name in initial migration. #1160

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aivins
Copy link

@aivins aivins commented Apr 15, 2014

The id column can be something else if AbstractUser is in use. In our case it was person_ptr_id. This fixes it for me. Provided the same fix to django-reversion yesterday: etianen/django-reversion#301

except ImportError: # django < 1.5
from django.contrib.auth.models import User
else:
User = get_user_model()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use tastypie.compat.get_user_model() instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure you can, as long as you've got a reference to User.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants