Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Le app di Django in esecuzione su Google Cloud sono eseguite sulla stessa infrastruttura alla base di tutti i prodotti Google, il che in genere migliora la capacità dell'applicazione di adattarsi a un carico di lavoro variabile.
Piattaforme di hosting
Queste sono le opzioni disponibili per eseguire il deployment di Django su Google Cloud:
Il mapper ORM (Object-Relational Mapper) di Django funziona meglio con un database relazionale SQL.
Se stai iniziando un nuovo progetto, Cloud SQL
è una buona scelta. Puoi eseguire il deployment di un database PostgreSQL o MySQL gestito e scalato da Google e supportato da Django.
Puoi eseguire il deployment di Django con un backend Spanner utilizzando il backend del database python-spanner-django.
A volte esistono validi motivi per utilizzare un database NoSQL. L'utilizzo del mapper ORM di Django con un
database NoSQL, con alcune limitazioni, ma non ufficialmente supportato da Django. Esistono diversi connettori di backend supportati dalla community, tra cui djangae se utilizzi App Engine e django-gcloud-connectors se utilizzi Cloud Run. Se scegli di utilizzare MongoDB, puoi eseguire il deployment tramite Cloud Marketplace e gestire in autonomia oppure puoi utilizzare il servizio di hosting di MongoDB fornito da mLab.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2024-06-26 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."]]