Skip to content

Switch to custom user model (bug 558514)#63

Merged
washort merged 1 commit intomozilla:masterfrom
washort:custom-user-model
May 5, 2014
Merged

Switch to custom user model (bug 558514)#63
washort merged 1 commit intomozilla:masterfrom
washort:custom-user-model

Conversation

@washort
Copy link
Copy Markdown
Contributor

@washort washort commented Apr 28, 2014

No description provided.

Comment thread apps/users/models.py Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@davidbgk can you please confirm? If so, maybe we won't need it anymore in the near future?

@magopian
Copy link
Copy Markdown
Contributor

Wow, thanks @washort this is huge, and greatly simplifies the code, thanks!

A few side notes:

  • I believe the fixture modifications aren't complete, as the information previously stored on the User are now lost, instead of stored on the user profile (is_active, is_superuser, last_login...)
  • I know it'll ask for numerous other code changes, but I'm wondering if we should take this opportunity to rename UserProfile to be simply User?
  • in apps/users/views.py line 509 there's a comment that isn't relevant anymore (talking about not using get_profile)
  • a few greps yielded some files that might need a second look:
    • apps/addons/tests/test_commands.py seems to have tests that are always skipped (with references to user.user. Maybe we could just get rid of those (in a future PR?)
    • apps/pages/templates/pages/credits.html has things like user.user__username and user.user__display_name, are those correct?
    • apps/users/management/commands/deduplicate_users.py: I believe this command should be rewritten as it uses the auth_user table
    • apps/users/urls.py had auth_views.User = UserProfile which we might not need anymore now that we're using the custom user?

FYI, there's quite a lot of test failures at the moment on this PR: https://ci-addons.allizom.org/job/olympia-build-branch/51/testReport/

@washort
Copy link
Copy Markdown
Contributor Author

washort commented Apr 29, 2014

Thanks for finding those, I'll update with fixes.

washort pushed a commit that referenced this pull request May 5, 2014
Switch to custom user model (bug 558514)
@washort washort merged commit 3df883d into mozilla:master May 5, 2014
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.

3 participants