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

Use User.get_username() for article cache instead of User.__str__ #931

Merged
merged 1 commit into from Nov 16, 2018

Conversation

Projects
None yet
2 participants
@oleast
Contributor

oleast commented Nov 15, 2018

Detailed description in #930

Base the caching key on the username of a User instead of the __str__, to increase compatibility with Django projects using Memcached as their caching service.

The default behavior of __str__ is to use get_username(), but many projects choose to overwrite the method for their custom users to show the users full name.

@codecov

This comment has been minimized.

codecov bot commented Nov 15, 2018

Codecov Report

Merging #931 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #931   +/-   ##
=======================================
  Coverage   75.19%   75.19%           
=======================================
  Files         106      106           
  Lines        4322     4322           
=======================================
  Hits         3250     3250           
  Misses       1072     1072
Impacted Files Coverage Δ
src/wiki/models/article.py 86.93% <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 b37e0ad...e7533c5. Read the comment docs.

@benjaoming

Agreeing with this change. Thanks!

@benjaoming benjaoming merged commit 040d10a into django-wiki:master Nov 16, 2018

3 checks passed

codecov/patch 100% of diff hit (target 75.19%)
Details
codecov/project 75.19% (+0%) compared to b37e0ad
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment