Commit 59a29fbca9ec1dee58aac1af76bdff0a6b85586b
1 parent
fa0a37d7
naprawione filtrowanie historii wg daty
--HG-- branch : beta
Showing
1 changed file
with
2 additions
and
1 deletions
history/pagination_types.py
1 | 1 | # -*- coding: utf-8 -*- |
2 | +from django.utils.encoding import force_unicode | |
2 | 3 | |
3 | 4 | from datetime import datetime |
4 | 5 | from django.contrib.auth.models import User |
... | ... | @@ -23,7 +24,7 @@ def lexeme_history_list(params, user): |
23 | 24 | objects = objects.exclude(user__username=value) |
24 | 25 | if field == 'time': |
25 | 26 | try: |
26 | - date = datetime.strptime(value, _('%Y/%m/%d')) | |
27 | + date = datetime.strptime(value, force_unicode(_('%Y/%m/%d'))) | |
27 | 28 | if lookup == 'from': |
28 | 29 | objects = objects.filter(transaction_began__gte=date) |
29 | 30 | elif lookup == 'to': |
... | ... |