I have a class
class vw_invoice_header(db.Model):
__tablename__ = "vw_invoice_header"
tax_amount = db.column(db.Numeric)
total_price = db.column(db.Numeric)
invc_number = db.Column(db.String(40))
term_code = db.Column(db.String(20))
order_date = db.Column(db.Date)
airway_bill = db.Column(db.String(40))
inh_auto_key = db.Column(db.Integer,primary_key=True)
Now I get a result from an oracle db as below
invc = vw_invoice_header.query.filter_by(inh_auto_key=20643519).first()
I'm trying to use the value below to get a nicely formatted price in my jinja2 template
"{:8,.2f}".format(invc.total_price)
This throws an error, AttributeError: type object 'Numeric' has no attribute 'lower' I have no idea how to just print out this numeric :/ Im a newb to python been using it for a week.
Thanks Cameron
db.column's in your code not supposed to bedb.Column?