There is 1 other session using the database while resetting database in django using docker

I have been using docker with django. The app is up and running. But, when I changed the models and migrate it, the migrations is not being reflected in my database. So I am getting no column exists error :

      django.db.utils.ProgrammingError: column          ............_id does not exist

So, I want to reset the database and rerun makemigrations. But, When I run following commands :

  • Java RMI Server in Docker Container
  • Cannot keep the scala application up and running on docker
  • Connecting to Kubernetes master, updating heapster
  • How to configure Docker mysql + aspnet
  • For what sort of volume mounting errors will Docker fail silently?
  • Docker splunk logging driver - handshake failure
  •   sudo docker-compose -f dev.yml run django python reset_db

    It gives following error:

     Traceback (most recent call last):
     File "", line 10, in <module>
         File "/usr/local/lib/python3.5/sitepackages/django/core/management/", line 353, in execute_from_command_line
         File "/usr/local/lib/python3.5/site-packages/django/core/management/", line 345, in execute
         File "/usr/local/lib/python3.5/site-packages/django/core/management/", line 348, in run_from_argv
         self.execute(*args, **cmd_options)
         File "/usr/local/lib/python3.5/site- packages/django/core/management/", line 399, in execute
         output = self.handle(*args, **options)
         File "/usr/local/lib/python3.5/site-  packages/django_extensions/management/", line 57, in inner
         ret = func(self, *args, **kwargs)
         File "/usr/local/lib/python3.5/site-packages/django_extensions/management/commands/", line 151, in handle
         psycopg2.OperationalError: database "postgres" is being accessed by other users
             DETAIL:  There is 1 other session using the database.

  • Change the app-name sent by docker's syslog driver
  • Should swarm loadbalancing perform healthchecks on its nodes?
  • How to downloaded from remote location and execute script on container start Docker?
  • Docker container keeps restarting
  • docker set cpuset error when use lxc driver
  • How to add module to Wildfly using CLI
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.