Stay organized with collections
Save and categorize content based on your preferences.
Django apps that run on Google Cloud are running on the same
infrastructure that powers all of Google's products, which generally improves
the application's ability to adapt to a variable workload.
Hosting platforms
These are the available options for deploying Django on Google Cloud:
The Django object-relational mapper (ORM) works best with an SQL relational
database.
If you are starting a new project, Cloud SQL
is a good choice. You can deploy a PostgreSQL or MySQL database that's managed and scaled by Google, and supported by Django.
You can deploy Django with a Spanner backend using the python-spanner-django database backend.
Sometimes, there are compelling reasons to use a NoSQL database. Using the Django ORM with a
NoSQL database is possible, with some limitations, but not officially supported by Django. There are a number of community-supported backend connectors Datastore, including djangae if you're using App Engine, or django-gcloud-connectors if you're using Cloud Run. If you choose to use MongoDB, you can deploy it using Cloud Marketplace and do your own management, or you can use the managed MongoDB hosting service
provided by mLab.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Getting started with Django\n\nDjango apps that run on Google Cloud are running on the same\ninfrastructure that powers all of Google's products, which generally improves\nthe application's ability to adapt to a variable workload.\n\nHosting platforms\n-----------------\n\nThese are the available options for deploying Django on Google Cloud: \n\nFor more details on the differences in these platforms, see [App Hosting options on Google Cloud](/hosting-options).\n\nDatabases\n---------\n\nThe Django object-relational mapper (ORM) works best with an SQL relational\ndatabase.\n\nIf you are starting a new project, [Cloud SQL](/sql)\nis a good choice. You can deploy a [PostgreSQL](/sql/docs/postgres/create-instance) or [MySQL](/sql/docs/mysql/create-instance) database that's managed and scaled by Google, and supported by Django.\n\nYou can deploy Django with a Spanner backend using the [python-spanner-django](https://github.com/googleapis/python-spanner-django/) database backend.\n\nSometimes, there are compelling reasons to use a NoSQL database. Using the Django ORM with a\nNoSQL database is possible, with some limitations, but not officially supported by Django. There are a number of community-supported backend connectors Datastore, including [djangae](https://github.com/potatolondon/djangae) if you're using App Engine, or [django-gcloud-connectors](https://gitlab.com/potato-oss/google-cloud/django-gcloud-connectors) if you're using Cloud Run. If you choose to use MongoDB, you can deploy it using [Cloud Marketplace](/marketplace/solution/click-to-deploy-images/mongodb) and do your own management, or you can use the managed MongoDB hosting service\nprovided by [mLab](https://www.mongodb.com/cloud/atlas/mongodb-google-cloud).\n\nCaches\n------\n\n[Memorystore](/memorystore) offers managed hosting options for both [Memcache](/memorystore/docs/memcached/memcached-overview) and [Redis](/memorystore/docs/redis/redis-overview). For App Engine, see the guide for [migrating from Memcache](/appengine/docs/standard/python/migrate-to-python3/memcache-to-memorystore).\n\nTask queuing\n------------\n\n[Pub/Sub](/pubsub) offers messaging for event-driven systems, and [Google Tasks](/tasks) offers asynchronous task execution; see the guide for [choosing between Google Tasks or Pub/Sub](/tasks/docs/comp-pub-sub). For App Engine, see the guide for [migrating from Task queues](/appengine/docs/standard/python/migrate-to-python3/migrating-services#task_queue).\n\nSupport for task queuing through Cloud Tasks is available through a number of community-supported packages."]]