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

deprecation warning #62

Closed
jdavid opened this issue Mar 27, 2019 · 1 comment
Closed

deprecation warning #62

jdavid opened this issue Mar 27, 2019 · 1 comment

Comments

@jdavid
Copy link
Contributor

jdavid commented Mar 27, 2019

https://github.com/Rhumbix/django-request-logging/blob/master/request_logging/middleware.py#L5

The import should be reversed to avoid a deprecation warning with Django 1.11, it should read:

try:
    # Django 2.x
    from django.urls import Resolver404
except ImportError:
    # Django 1.x
    from django.core.urlresolvers import Resolver404

Probably both try/except blocks could be merged.

@tclancy
Copy link
Contributor

tclancy commented Mar 27, 2019

Awesome, do you mind combining the two import checks?

jdavid added a commit to jdavid/django-request-logging that referenced this issue Mar 28, 2019
jdavid added a commit to jdavid/django-request-logging that referenced this issue Mar 28, 2019
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

No branches or pull requests

2 participants