Skip to content
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

Closed
wants to merge 9 commits into from

Conversation

heidi-jakub
Copy link

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.

Copy link

@PiDelport PiDelport left a 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?

datatableview/columns.py Outdated Show resolved Hide resolved
datatableview/datatables.py Outdated Show resolved Hide resolved
datatableview/utils.py Outdated Show resolved Hide resolved
@@ -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

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find, will update 👍

@rh0dium
Copy link
Member

rh0dium commented Dec 21, 2020

Totally done! I didn't even see this before I did it - Thanks for the help

@rh0dium rh0dium closed this Dec 21, 2020
@rubimpassos
Copy link

Why this was closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants