title: Cannot convert datetime.timedelta() to Decimal django
body: <p>i am substracting one date from another and from the result again substracting the 8 hours. After that i am converting the result in to decimal. But at the time of saving the object i am getting error</p>
  
  <pre><code>Cannot convert datetime.timedelta(0, 21600) to Decimal
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>            fm.extra_hours = (fm.trip_closing_date - fm.trip_starting_date) - timedelta(hours=8)
              #fm.extra_hours = time - timedelta(hours=8)
              st = fm.extra_hours
              print type(st)
              print st.days
              seconds = st.total_seconds()
              hours = int(seconds // 3600)
              print hours
              print type(hours)
              ext_hrs = float (hours)
  
              print ext_hrs
              print type(ext_hrs)
              if st.days &lt; 0:
                  st = 0
              else:
                  y="xyz"
  
              if Ek&gt;=1:
                  fm.extra_kilometers = Ek
                  fm.extra_charge = ((((fm.vehical_type.per_extra_km_charge))*((fm.extra_kilometers)))+(((fm.vehical_type.per_extra_hour_charge))*(Decimal(ext_hrs))))
                  fm.pure_amount = ((((fm.total_kilometer))*((fm.vehical_type.per_extra_km_charge)))+(((fm.vehical_type.per_extra_hour_charge))*(Decimal(ext_hrs))))
                  fm.service_tax = (((fm.pure_amount)+(fm.driver_allownce_charge))*Decimal(4.944))/Decimal(100)
                  fm.grand_total = ((fm.pure_amount)+(fm.driver_allownce_charge)+(fm.service_tax))
                  fm.amount_payeble_now = (fm.grand_total)-(fm.less_adavance)
                  fm.save()
  </code></pre>
  
  <p>i dont know what wrong i am doing? please help me for this.</p>
  
  <p>full trace </p>
  
  <pre><code>    TypeError at /home/save_local_invoice/
  Cannot convert datetime.timedelta(0, 21600) to Decimal
  Request Method: POST
  Request URL:    http://localhost:8000/home/save_local_invoice/
  Django Version: 1.7
  Exception Type: TypeError
  Exception Value:    
  Cannot convert datetime.timedelta(0, 21600) to Decimal
  Exception Location: C:\Python27\lib\decimal.py in __new__, line 658
  Python Executable:  C:\Python27\python.exe
  Python Version: 2.7.8
  Python Path:    
  ['C:\\Users\\MAGOWA\\Desktop\\magowa',
   'C:\\Users\\MAGOWA\\Desktop\\magowa',
   'C:\\Windows\\system32\\python27.zip',
   'C:\\Python27\\DLLs',
   'C:\\Python27\\lib',
   'C:\\Python27\\lib\\plat-win',
   'C:\\Python27\\lib\\lib-tk',
   'C:\\Python27',
   'C:\\Python27\\lib\\site-packages']
  Server time:    Sat, 25 Apr 2015 10:26:33 +0530
  
  error on this line fm.save() 
  </code></pre>