mirror of
https://github.com/django/django.git
synced 2025-11-01 04:17:59 +00:00
More removal of poorly legible constructs to workaround Python 2.4 shortcomings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
0e03a504bf
commit
c43d15b3b3
5 changed files with 12 additions and 17 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import datetime
|
||||
import time
|
||||
|
||||
from django.conf import settings
|
||||
from django.forms import *
|
||||
from django.forms.extras import SelectDateWidget
|
||||
|
|
@ -379,7 +379,7 @@ class FormsExtraTestCase(unittest.TestCase, AssertFormErrorsMixin):
|
|||
def decompress(self, value):
|
||||
if value:
|
||||
data = value.split(',')
|
||||
return [data[0], data[1], datetime.datetime(*time.strptime(data[2], "%Y-%m-%d %H:%M:%S")[0:6])]
|
||||
return [data[0], data[1], datetime.datetime.strptime(data[2], "%Y-%m-%d %H:%M:%S")]
|
||||
return [None, None, None]
|
||||
|
||||
def format_output(self, rendered_widgets):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue