Code

Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#435 closed defect (worksforme)

Exception thrown out when doing do_html2python

Reported by: Leo Owned by: adrian
Component: Core (Other) Version: 1.0
Severity: normal Keywords: html2python
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by adrian)

I create ad DataTimeField type filed in model file, and show it in a text box on web page. but when I invoke do_html2python before saving the changes to postgresql, a exception was thrown out "There's been an error:

Traceback (most recent call last):

  File "/usr/lib/python2.3/site-packages/django-1.0.0-py2.3.egg/django/core/handlers/base.py", line 64, in get_response
    response = callback(request, **param_dict)

  File "/usr/lib/python2.3/site-packages/liveweb/bo/club.py", line 68, in save
    club_manip.do_html2python(club_changes)

  File "/usr/lib/python2.3/site-packages/django-1.0.0-py2.3.egg/django/core/formfields.py", line 98, in do_html2python
    new_data.setlist(field.field_name, [field.__class__.html2python(None)])

  File "/usr/lib/python2.3/site-packages/django-1.0.0-py2.3.egg/django/core/formfields.py", line 654, in html2python
    time_tuple = time.strptime(data, '%H:%M:%S')

  File "/usr/lib/python2.3/_strptime.py", line 423, in strptime
    found = format_regex.match(data_string)

TypeError: expected string or buffer".

Seems that django look it as time field? And this only happend after updating django today(2005.8.30).

Attachments (0)

Change History (4)

comment:1 Changed 9 years ago by anonymous

  • Component changed from Admin interface to Core framework

comment:2 Changed 9 years ago by adrian

  • Description modified (diff)

Fixed formatting in description.

comment:3 Changed 9 years ago by jacob

  • Resolution set to worksforme
  • Status changed from new to closed

I can't reproduce this one which means it's likely a bug in your model; please post support questions like this to the django-users mailing list.

comment:4 Changed 7 years ago by anonymous

  • milestone Version 1.0 deleted

Milestone Version 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.