Fix _meta warnings on django1.8 #299

Merged
merged 1 commit into from Apr 26, 2015

Projects

None yet

3 participants

@collinanderson
Contributor

No description provided.

@collinanderson collinanderson referenced this pull request Mar 16, 2015
Merged

Django 1.8 support #297

@kaedroho
Contributor

Shall I merge this commit into #297?

@frewsxcv
Collaborator

What's the status of this PR? How does it relate to #297?

@collinanderson
Contributor

The last commit here fixes a few deprecation warnings in 1.8. We could either merge my commit into #297, or I could rebase it once #297 is merged.

@frewsxcv
Collaborator
frewsxcv commented Apr 3, 2015

@collinanderson Can you rebase off the current develop branch since #297 has merged?

@collinanderson
Contributor

done

@frewsxcv frewsxcv and 1 other commented on an outdated diff Apr 3, 2015
taggit/managers.py
@@ -49,6 +49,13 @@ def _model_name(model):
return model._meta.model_name
+def _get_field(model, name):
@frewsxcv
frewsxcv Apr 3, 2015 Collaborator

Can you move this to taggit/utils.py?

@frewsxcv frewsxcv and 1 other commented on an outdated diff Apr 3, 2015
taggit/models.py
@@ -101,11 +102,15 @@ class Meta:
@classmethod
def tag_model(cls):
- return cls._meta.get_field_by_name("tag")[0].rel.to
+ if VERSION < (1, 8):
+ return cls._meta.get_field_by_name('tag')[0].rel.to
+ return cls._meta.get_field('tag').rel.to
@frewsxcv
frewsxcv Apr 3, 2015 Collaborator

Once the other function gets moved to utils.py, can you utilize it here so we can reduce the number of places we do version checking

@frewsxcv frewsxcv merged commit e62fbc8 into alex:develop Apr 26, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@frewsxcv
Collaborator

Thanks for this @collinanderson!

@frewsxcv
Collaborator

I just released 0.14.0 that includes this change

https://pypi.python.org/pypi/django-taggit/0.14.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment