# Query geodjango running in remote server

**URL:** <https://forum.djangoproject.com/t/query-geodjango-running-in-remote-server/31660>\
**Category:** GeoDjango\
**Created:** [May 31, 2024, 11:20am UTC](https://forum.djangoproject.com/t/query-geodjango-running-in-remote-server/31660 "2024-05-31T11:20:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saraivajp](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/saraivajp/32/21653_2.png) [@saraivajp](https://forum.djangoproject.com/u/saraivajp)\
**Post date:** [May 31, 2024, 11:20am UTC](https://forum.djangoproject.com/t/query-geodjango-running-in-remote-server/31660/1 "2024-05-31T11:20:57Z")

</div>

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.

Thanks

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [May 31, 2024, 1:09pm UTC](https://forum.djangoproject.com/t/query-geodjango-running-in-remote-server/31660/2 "2024-05-31T13:09:44Z")

</div>

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.
