Closed uruz closed 12 years ago
I've also filed a ticket against django: https://code.djangoproject.com/ticket/18794
Yes, using default time zone (one that is defined by settings.TIME_ZONE
) is another option... It would be easy to change from UTC to that. Should I do that?
Thank you for the patch. I tried running your tests but it already failed on the first test. I wasn't able to find the method '_make_date_lookup_arg' either in the class based views, or where this method is called.
The failure was on line 40: Got a 404 instead of a 200 response.
Could you please explain how it is supposed to work?
I run test suite with the python manage.py test --settings=elephantblog.tests.testapp.settings elephantblog
on django trunk. Tests may fail at other conditions, what is yours?
I ran it as application content with Django 1.4 and FeinCMS 1.6.
That's weird, i've tried to run tests with Django 1.4 and FeinCMS 1.6 and they passed (but Django 1.4 does not have _make_date_lookup_arg
method)
I changed your code a bit, using make_naive for the permalink, and now the tests pass. I also added support for django 1.4.
https://github.com/sbaechler/feincms-elephantblog/commit/91a4fb856a28753c4ff3f1991f8ce30b83540194
Thank you for your help on this. I noticed that Django changed the class based views a lot in Trunk and timezone support will be easier there. The current fix is quite ugly.
I decided to go for UTC with the permalinks. The only reason for this instead of settings.TIME_ZONE is, that the URLs stay the same even if the server changes the default time zone.
I've added a test application and two tests. Without changes in models.py one of two fail.