Opened 9 years ago

Closed 9 years ago

#11669 closed (invalid)

Hand in HandField

Reported by: joebrown Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I *think* this is an error, tho I'm not sure, it's caused me confusion either way... isinstance supposed to be Hand or HandField?

class HandField(models.Field):

# ...

def to_python(self, value):

if isinstance(value, Hand):

return value

# The string case.
p1 = re.compile('.{26}')
p2 = re.compile('..')
args = [p2.findall(x) for x in p1.findall(value)]
return Hand(*args)

Thanks for the work eitherway.

Change History (1)

comment:1 Changed 9 years ago by Alex Gaynor

Resolution: invalid
Status: newclosed

The current text is correct, please use the django-users mailing list and #django channel on freenode for asking support questions, not the ticket tracker.

Note: See TracTickets for help on using tickets.
Back to Top