Okay so i'm playing with sqlalchemy and got a problem. here is the code

........def Create(cur_date, trans_status):
    new_trans = 'Transaction(date=cur_date, status=[Status(%s = 0)])' 
%(trans_status)

    session.add(new_trans)
    session.commit()Create('1/12/14', 'processed')

NOTE: class Status has processed, rejected and forwarded as keys/parameters 

GOAL: create new transaction where Status key would be dependent on the 
input(trans_status) 

EX: if user selects status as processed, the Status(processed = 1) should 
be created 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to