mirror of
https://github.com/jazzband/dj-database-url.git
synced 2026-03-16 22:20:24 +00:00
Do not leak key loop variable into global namespace (#226)
This is a common problem for module level loops / helpers / etc. `key` is importable name, it is even imported when using `from dj_database_url import *`. This is clearly not what we want.
This commit is contained in:
parent
9292e1fa8a
commit
f600d9089b
1 changed files with 1 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ SCHEMES = {
|
|||
# Register database schemes in URLs.
|
||||
for key in SCHEMES.keys():
|
||||
urlparse.uses_netloc.append(key)
|
||||
del key
|
||||
|
||||
|
||||
# From https://docs.djangoproject.com/en/4.0/ref/settings/#databases
|
||||
|
|
|
|||
Loading…
Reference in a new issue