Fix RelationCounterField on Django 1.7+.
Review Request #7422 — Created June 13, 2015 and submitted
Django 1.7+ changed some variables around for relation fields, turning
parent_model
intomodel
andmodel
intorelated_model
. Especially
in the case ofmodel
, the meaning has changed significantly. We now
have some compatibility functions that check for the right thing when
attempting to access the proper variable. This restores test
functionality, bringing compatibility to Django 1.6 and 1.7/1.8.
These unit tests pass on Django 1.6 and 1.8.
- Description:
-
Django 1.7+ changed some variables around for relation fields, turning
~ `parent_model
intomodel
andmodel
intorelated_model
. Especially~ parent_model
intomodel
andmodel
intorelated_model
. Especiallyin the case of model
, the meaning has changed significantly. We nowhave some compatibility functions that check for the right thing when attempting to access the proper variable. This restores test functionality, bringing compatibility to Django 1.6 and 1.7/1.8.