# Using 2 databases influxdb and postgres

**URL:** https://community.influxdata.com/t/using-2-databases-influxdb-and-postgres/18304
**Category:** Store
**Tags:** influxdb
**Created:** [February 11, 2021, 11:18am UTC](https://community.influxdata.com/t/using-2-databases-influxdb-and-postgres/18304 "2021-02-11T11:18:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![DanerSound](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/danersound/32/5743_2.png) [@DanerSound](https://community.influxdata.com/u/DanerSound)
#### Post date: [February 11, 2021, 11:18am UTC](https://community.influxdata.com/t/using-2-databases-influxdb-and-postgres/18304/1 "2021-02-11T11:18:38Z")

</div>

hello! i need to develop s django app that connects to postgres (as default) and influxdb. Some data will be stored in influxdb and some other data will be stored into postgres. i installed all necessary packages

 ![db1](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/b/b5508d86df6cc17c26cf321a75d423e750644a34.png)

i wrote this configuration for the db part on settings.py but it dont works

![db2](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/0/03d04d062585ef6f8132e5ba8f99cbd362a98b90.png)

i found this configuration, but dont know if is write:

```
"""
'machines': {
    'INFLUXDB_HOST': 'influxdb',
    'INFLUXDB_PORT': '8086',
    'INFLUXDB_USERNAME': '',
    'INFLUXDB_PASSWORD': '',
    'INFLUXDB_DATABASE': 'testdb',
    'INFLUXDB_TIMEOUT': '10'
},
 """

```

i have this error:  
ImportError: cannot import name ‘InfluxDBClient’ from ‘influxdb’ (/home/dispater/Documents/djangotest/grafanaSED/venv/lib/python3.8/site-packages/influxdb/ **init**.py)

any help ?

---

<div class="post-metadata">

### Author: ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)
#### Post date: [February 19, 2021, 7:49pm UTC](https://community.influxdata.com/t/using-2-databases-influxdb-and-postgres/18304/2 "2021-02-19T19:49:05Z")

</div>

Hello @DanerSound,  
Please make sure you are using the correct client. [GitHub - influxdata/influxdb-client-python: InfluxDB 2.0 python client](https://github.com/influxdata/influxdb-client-python)

---

<div class="post-metadata">

### Author: ![DanerSound](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/danersound/32/5743_2.png) [@DanerSound](https://community.influxdata.com/u/DanerSound)
#### Post date: [February 25, 2021, 10:18am UTC](https://community.influxdata.com/t/using-2-databases-influxdb-and-postgres/18304/3 "2021-02-25T10:18:33Z")

</div>

can i said that i love you just for reply to my message ? xD really thanks
