indeedeng / django-ptrack

Tracking pixel library for Django
Apache License 2.0
40 stars 17 forks source link

DJANGO-1511: Update urls to remove RemovedInDjango40Warning: django.c… #21

Closed dentedghost closed 2 years ago

dentedghost commented 2 years ago

Update to prevent depreciation warning: RemovedInDjango40Warning: django.conf.urls.url() is deprecated in favor of django.urls.re_path().

jiyu-indeed commented 2 years ago

I think you need to update the required Django version

dentedghost commented 2 years ago

@jiyu-indeed Great catch, re_path needs Django 2.0.0+. https://docs.djangoproject.com/en/2.0/ref/urls/.

Given the required bump in Django version, I'm recommending a major bump to version 3.0.0

Since Django 2.0.0 requires Python3, I've also updated the classifiers to remove reference of Django 1. and Python2.

dentedghost commented 2 years ago

Updated Django requirements and fixed a flake8 warning

All Test passed

---------- coverage: platform darwin, python 3.6.8-final-0 -----------
Name                              Stmts   Miss Branch BrPart  Cover   Missing
-----------------------------------------------------------------------------
ptrack/__init__.py                   18      3      6      2    79%   13, 15, 33
ptrack/apps.py                        9      0      4      0   100%
ptrack/encoder.py                    31      0      4      1    97%   27->30
ptrack/exceptions.py                  2      0      4      0   100%
ptrack/templatetags/__init__.py       0      0      0      0   100%
ptrack/templatetags/ptrack.py        17      1      2      1    89%   25
ptrack/trackers.py                   22      0     10      0   100%
ptrack/urls.py                        3      0      0      0   100%
ptrack/views.py                      17      0      4      0   100%
-----------------------------------------------------------------------------
TOTAL                               119      4     34      4    95%

Required test coverage of 85.0% reached. Total coverage: 94.77%
russelljk commented 2 years ago

@dentedghost @jiyu-indeed I've merged the changes. One of us should publish it to pypi

jiyu-indeed commented 2 years ago

I've published it to pypi.