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

Handle reverse move and models.permalink removal #331

Closed
wants to merge 1 commit into from

Conversation

jmbowman
Copy link

@jmbowman jmbowman commented Dec 6, 2017

This should handle two of the changes in recent Django versions mentioned in #291 -

  • The move of reverse() from django.core.urlresovers to django.urls
  • The removal of models.permalink

Compatibility with all currently supported Django versions should be maintained. I realize that #320 also has a fix for the first point, but it seems to have gotten bogged down in figuring out how to handle some of the other changes; it might make sense to just merge these simple fixes first.

@codecov-io
Copy link

codecov-io commented Dec 6, 2017

Codecov Report

Merging #331 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #331      +/-   ##
==========================================
+ Coverage   97.63%   97.67%   +0.03%     
==========================================
  Files          15       15              
  Lines         593      601       +8     
  Branches       73       73              
==========================================
+ Hits          579      587       +8     
  Misses          7        7              
  Partials        7        7
Impacted Files Coverage Δ
simple_history/models.py 96.98% <100%> (+0.07%) ⬆️
simple_history/admin.py 98.09% <100%> (+0.05%) ⬆️

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 35febc3...d335b29. Read the comment docs.

@@ -204,14 +208,12 @@ def get_extra_fields(self, model, fields):

user_model = getattr(settings, 'AUTH_USER_MODEL', 'auth.User')

@models.permalink
def revert_url(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are there any tests in the test suite that are testing this function? Couldn't find any. Want to add one and include it with the PR?

Copy link
Author

Choose a reason for hiding this comment

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

@rossmechanic I added a simple test of the reverse_url() output; there was an existing test that called it, but this looks like the first one to sanity check the output.

@jmbowman jmbowman force-pushed the reverse_and_permalink branch from e4751e0 to d335b29 Compare December 8, 2017 23:16
@rossmechanic
Copy link
Collaborator

Fixed in #363

@jmbowman jmbowman deleted the reverse_and_permalink branch April 4, 2018 17:36
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