fix GPCFieldRenderer

This commit is contained in:
Lance Edgar 2012-09-06 13:22:02 -05:00
parent cf10fe19e8
commit 0a85bc2ba6

View file

@ -33,17 +33,18 @@ import formalchemy
from edbob.pyramid.forms import pretty_datetime from edbob.pyramid.forms import pretty_datetime
import rattail import rattail
from rattail.gpc import GPC
class GPCFieldRenderer(formalchemy.TextFieldRenderer): class GPCFieldRenderer(formalchemy.TextFieldRenderer):
""" """
Renderer for :class:`rattail.barcodes.GPC` fields. Renderer for :class:`rattail.gpc.GPC` fields.
""" """
@property @property
def length(self): def length(self):
# Hm, should maybe consider hard-coding this...? # Hm, should maybe consider hard-coding this...?
return len(str(rattail.GPC(0))) return len(str(GPC(0)))
class PriceFieldRenderer(formalchemy.FieldRenderer): class PriceFieldRenderer(formalchemy.FieldRenderer):