-
Notifications
You must be signed in to change notification settings - Fork 141
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
Update the package for Django 3.1+ #246
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importing FieldDoesNotExist
from django.core.exceptions
should work on all supported versions of Django back to 1.8, so doing a conditional import with try
/except
should be unnecessary?
Co-authored-by: Pi Delport <[email protected]>
Co-authored-by: Pi Delport <[email protected]>
Co-authored-by: Pi Delport <[email protected]>
datatableview/columns.py
Outdated
@@ -11,7 +11,7 @@ | |||
import django | |||
from django.db import models | |||
from django.db.models import Model, Manager, Q | |||
from django.db.models.fields import FieldDoesNotExist | |||
from django.core.exceptions import FieldDoesNotExist | |||
from django.core.exceptions import ObjectDoesNotExist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be one the same line
from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find, will update 👍
Totally done! I didn't even see this before I did it - Thanks for the help |
Why this was closed? |
This PR aims to solve the
ImportError
on Django 3.1 and above, as shown in the issue #244.There is a previous PR with similar changes (#245) but it's not backward compatible with the older Django versions.
Comments and change requests are welcome. I did myself the license of bumping the patch number in the version.