Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Django-Apps, die in Google Cloud ausgeführt werden, beruhen auf derselben Infrastruktur wie alle Google-Produkte, was generell die Fähigkeit der Anwendung verbessert, sich an eine variable Arbeitslast anzupassen.
Host-Plattformen
Verfügbare Optionen für die Bereitstellung von Django in Google Cloud:
Der objektrelationale Mapper (ORM) von Django funktioniert optimal mit einer relationalen SQL-Datenbank.
Für ein neues Projekt ist Cloud SQL eine gute Wahl. Sie können eine PostgreSQL oder MySQL bereitstellen, die von Google verwaltet und skaliert und von Django unterstützt wird.
Sie können Django mit einem Spanner-Back-End mithilfe des Datenbank-Back-Ends python-spanner-django bereitstellen.
Manchmal gibt es zwingende Gründe, eine NoSQL-Datenbank zu verwenden. Die Verwendung von Django ORM mit einer NoSQL-Datenbank ist mit einigen Einschränkungen möglich, wird jedoch nicht offiziell von Django unterstützt. Es gibt eine Reihe von Community-unterstützten Backend-Connectors, einschließlich djangae, wenn Sie App Engine verwenden, oder django-gcloud-connectors, wenn Sie Cloud Run verwenden. Wenn Sie sich für MongoDB entscheiden, können Sie die Datenbank über den Cloud Marketplace bereitstellen und selbst verwalten oder den verwalteten MongoDB-Hostingdienst von mLab verwenden.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2024-06-25 (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."]]