def upgrade_bill(bill, valide_days):
 bill.account_type = bill.upgrade_type
 start_date = datetime.datetime.now()
 expire_date = (start_date + datetime.timedelta(days=valide_days))
 bill.start_date = start_date
 bill.expire_date = expire_date
 bill.save()

def upgrade_bill ( bill , valide_days ) : bill . account_type = bill . upgrade_type start_date = datetime . datetime . now ( ) expire_date = ( start_date + datetime . timedelta ( days = valide_days ) ) bill . start_date = start_date bill . expire_date = expire_date bill . save ( )
upgrade bill bill valide for valide_days from today .