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

Fix #36 - Refactor model mixins into module #46

Merged
merged 14 commits into from
Oct 8, 2017

Conversation

jambonrose
Copy link
Owner

This change pulls all of the mix-in classes used to build the User model and places them in a separate module within the package. Instead of accessing them in improved_user.models, they are now accessed in improved_user.mixins. Similarly, the UserManager is moved to improved_user.managers. All other changes are made to reflect this refactor.

To properly test the refactor, a second example project is created. This project uses the mixins to create a custom User model without putting improved_user in INSTALLED_APPS. We provide basic tests to check that the new User model is created, that migrations apply, and that the UserManager works.

The original example project is updated along the way, based on code from the new example project, which is generated using Django 2.0a1.

Finally, documentation is changed to reflect these changes, and a tutorial is provided to rapidly explain how the new example project can be mimicked.

@codecov
Copy link

codecov bot commented Oct 8, 2017

Codecov Report

Merging #46 into development will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           development    #46   +/-   ##
==========================================
  Coverage          100%   100%           
==========================================
  Files                7      9    +2     
  Lines              170    173    +3     
  Branches            11     11           
==========================================
+ Hits               170    173    +3
Impacted Files Coverage Δ
src/improved_user/mixins.py 100% <100%> (ø)
src/improved_user/managers.py 100% <100%> (ø)
src/improved_user/models.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbb7b59...603e836. Read the comment docs.

@jambonrose jambonrose merged commit 5f2eee1 into development Oct 8, 2017
@jambonrose jambonrose deleted the fix_issue_36_move_model_mixins branch October 8, 2017 20:50
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.

1 participant