Opened 6 years ago

Closed 6 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: UI/UX:

Description

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 6 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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