jazzband / dj-database-url

Use Database URLs in your Django Application.
https://pypi.org/project/dj-database-url/
BSD 3-Clause "New" or "Revised" License
1.49k stars 205 forks source link

cxOracle(and Django) expects port numbers as strings not integers #85

Closed GertBurger closed 7 years ago

GertBurger commented 7 years ago

With a port number specified in the url cxOracle fails as follows:

File "/home/test/.virtualenvs/test/local/lib/python2.7/site-packages/django/db/backends/oracle/base.py", line 213, in get_new_connection conn_string = convert_unicode(self._connect_string()) File "/home/test/.virtualenvs/test/local/lib/python2.7/site-packages/django/db/backends/oracle/base.py", line 197, in _connect_string if settings_dict['PORT'].strip(): AttributeError: 'int' object has no attribute 'strip'

I had a look at the Django docs and it shows database ports as strings.

kennethreitz commented 7 years ago

PRs accepted!