v1k45 / django-notify-x

Notification system for Django
MIT License
187 stars 40 forks source link

Fix RemovedInDjango110Warning on using unofficial API get_field_by_name #27

Closed fgmacedo closed 8 years ago

fgmacedo commented 8 years ago

When using django-notify-x on Django 1.9, it raises an warning of deprecated API:

django-notify-x/notify/utils.py:91: RemovedInDjango110Warning: 'get_field_by_name is an unofficial API that has been deprecated. You may be able to replace it with 'get_field()'
  gfk_field.model._meta.get_field_by_name(gfk_field.ct_field)[0].get_attname())

This pull request replaces the deprecated API with the new one.