postgres - cannot drop database using psycopg2
Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Over a Mysterious Island
--
Chapters
00:00 Question
02:13 Accepted answer (Score 4)
02:44 Thank you
--
Full question
https://stackoverflow.com/questions/2235...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #database #django #postgresql #psycopg2
#avk47
    --
Music by Eric Matyas
https://www.soundimage.org
Track title: Over a Mysterious Island
--
Chapters
00:00 Question
02:13 Accepted answer (Score 4)
02:44 Thank you
--
Full question
https://stackoverflow.com/questions/2235...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #database #django #postgresql #psycopg2
#avk47
ACCEPTED ANSWER
Score 5
Here is what happened. One of the imported classes had a decorator that was opening the connection. This is a standard Django decorator transaction.atomic (I actually incorrectly applied it to a class as opposed to a method). Apparently it is executed during the import process, opening a connection to the postgres DB.