silentsokolov/django-admin-rangefilter

Error when i search it

joelalves opened this issue · 12 comments

python 3.5
django 1.11.6
django-admin-rangefilter 0.3.0

Url examplpe = '/voucher/?&date_order__gte=2018-01-01&date_order__lte=2018-01-10'

Problem:

'LocalTimezone' object has no attribute 'localize'

View more details here

@joelalves Tell me what timezone settings (in django) you use

I could not reproduce the error.

  1. What version pytz you using?
  2. You using default method get_timezone (code)?

I am using pytz (2017.3)
2. Where?
The field that use for filter (see here)

Hm ... you sure?

You say that use django 1.11.6, but django.utils.timezone.LocalTimezone remove in 1.11.

pip_list

Yes, i am sure...You see in image

This is not the environment in which the error occurred. On screen MacOS

it´s true, but the same environment

Okay, reproduce the error and send the complete log

ok, tonight i will send the complete log

It's working after de commit.
Thanks You

Of course, this change makes pytz is optional. You do not have pytz, because up to the version django 1.11.X, it is not necessary.
Thx for issues.