Query geodjango running in remote server

I am running a geodjango project in a remote server. I now want to query the database from my laptop using django ORM commands. What is the best way of doing it?

From my understanding, to use django ORM, I need to get access to the existing models. I tried to turn the django project into a package and access them using simple import functions. However, I can’t get through an error from GDAL that prevents me from importing gis methods.


The basic answer for what you describe is that you need a complete and functional Django installation in your laptop. You would change your settings file to refer to the remote database, but otherwise it’s the same installation as your server. With this, you also need to ensure that you can access your database remotely.

Or, you can ssh into your server and run the Django shell (or shell_plus, as appropriate) command in your terminal session.