karanlyons / django-save-the-change

Your DB Got It the First Time.
http://django-save-the-change.readthedocs.io
Other
114 stars 29 forks source link

Change RelatedObject to ForeignObjectRel as it is removed from django 1.8 #15

Closed DheerendraRathor closed 7 years ago

DheerendraRathor commented 9 years ago

With reference to the ticket https://code.djangoproject.com/ticket/21414, it seems that django.db.models.related.RelatedObject is removed/moved to django.db.models.fields.related.ForeignObjectRel. Also my code is failing due to same issue

File "/home/dheerendra/Desktop/Project/iitbapp/notice/models.py", line 4, in <module>
    from save_the_change.mixins import SaveTheChange
  File "/home/dheerendra/.Envs/iitbapp/local/lib/python2.7/site-packages/save_the_change/mixins.py", line 11, in <module>
    from django.db.models.related import RelatedObject
ImportError: No module named related
techscientist commented 8 years ago

I'm getting the same issue. Any updates on this, @karanlyons?

karanlyons commented 8 years ago

This seems to be a very simple change in imports between Django versions, and whenever I’ve got everything else working again in STC (I’m close but far too busy right now to properly finish things up) it’ll be in that next release. In the meantime feel free to patch it in yourself: I know it’s not ideal, but at least it’ll get you working again.

karanlyons commented 7 years ago

Fixed in 2.0. Helps that I only support >=1.8 now 😄