Getting started with Django

Django apps that run on Google Cloud are running on the sameinfrastructure that powers all of Google's products, which generally improvesthe application's ability to adapt to a variable workload.

Hosting platforms

These are the available options for deploying Django on Google Cloud:

For more details on the differences in these platforms, seeApp Hosting options on Google Cloud.

Databases

The Django object-relational mapper (ORM) works best with an SQL relationaldatabase.

If you are starting a new project,Cloud SQLis a good choice. You can deploy aPostgreSQL orMySQL database that's managed and scaled by Google, and supported by Django.

You can deploy Django with a Spanner backend using thepython-spanner-django database backend.

Sometimes, there are compelling reasons to use a NoSQL database. Using the Django ORM with aNoSQL database is possible, with some limitations, but not officially supported by Django. There are a number of community-supported backend connectors Datastore, includingdjangae if you're using App Engine, ordjango-gcloud-connectors if you're using Cloud Run. If you choose to use MongoDB, you can deploy it usingCloud Marketplace and do your own management, or you can use the managed MongoDB hosting serviceprovided bymLab.

Caches

Memorystore offers managed hosting options for bothMemcache andRedis. For App Engine, see the guide formigrating from Memcache.

Task queuing

Pub/Sub offers messaging for event-driven systems, andGoogle Tasks offers asynchronous task execution; see the guide forchoosing between Google Tasks or Pub/Sub. For App Engine, see the guide formigrating from Task queues.

Support for task queuing through Cloud Tasks is available through a number of community-supported packages.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-17 UTC.