mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add backend for exchangerate.host
This commit is contained in:
parent
098b9b7597
commit
65aa468168
@ -1,4 +1,4 @@
|
|||||||
from djmoney.contrib.exchange.backends.base import BaseExchangeBackend
|
from djmoney.contrib.exchange.backends.base import BaseExchangeBackend, SimpleExchangeBackend
|
||||||
|
|
||||||
|
|
||||||
class InvenTreeManualExchangeBackend(BaseExchangeBackend):
|
class InvenTreeManualExchangeBackend(BaseExchangeBackend):
|
||||||
@ -19,3 +19,18 @@ class InvenTreeManualExchangeBackend(BaseExchangeBackend):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
|
class ExchangeRateHostBackend(SimpleExchangeBackend):
|
||||||
|
"""
|
||||||
|
Backend for https://exchangerate.host/
|
||||||
|
"""
|
||||||
|
|
||||||
|
name = "exchangerate.host"
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.url = "https://api.exchangerate.host/latest"
|
||||||
|
|
||||||
|
def get_params(self):
|
||||||
|
# No API key is required
|
||||||
|
return {}
|
||||||
|
Loading…
Reference in New Issue
Block a user