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.48k stars 205 forks source link

Want to set `False` value in options. #87

Closed pistatium closed 7 years ago

pistatium commented 7 years ago

I want to pass a value of False to Django. For example, ?use_unicode=False.

DATABASES['default']['OPTIONS']['use_unicode'] = 'False'  #=> True

However, if you do this, it will be set as a character string as above.

Even if ?use_unicode=0, '0' is treated as True in Python, so it does not become the expected value.

Is there a way to set False appropriately?

kennethreitz commented 7 years ago

The best practice is to update this value manually after invoking dj-database-url.