Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
L'ORM Django est un composant autonome puissant du framework Web Django qui mappe des objets Python à des données relationnelles. Il fournit une interface pythonique à la base de données sous-jacente, et inclut des outils permettant de générer automatiquement les modifications de schéma et de gérer l'historique des versions de schéma.
Ouvrez une demande sur GitHub pour signaler un bug ou poser une question sur l'utilisation de l'ORM Django avec Spanner.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/08/11 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/08/11 (UTC)."],[],[],null,["# Django ORM with Spanner\n\nThe Django ORM is a powerful standalone component of the\n[Django web framework](https://www.djangoproject.com/) that maps Python objects\nto relational data. It provides a Pythonic interface to the underlying database,\nand includes tools for automatically generating schema changes and managing\nschema version history.\n| **Note:** The PostgreSQL interface for Spanner doesn't support the Django ORM.\n\nThe [django-google-spanner](https://pypi.org/project/django-google-spanner/)\npackage is a third-party database backend for using Spanner with the\nDjango ORM, powered by the\n[Spanner Python client library](https://github.com/googleapis/python-spanner).\n\nWith this integration, Django applications can take advantage of\nSpanner's high availability and consistency at scale.\n\nInstall, configure, and use\n---------------------------\n\nRefer to the\n[django-google-spanner documentation](https://pypi.org/project/django-google-spanner/)\nfor instructions on installing and configuring your environment.\n\nWhat's next\n-----------\n\n- Read our [blog post](/blog/topics/developers-practitioners/django-orm-support-cloud-spanner-now-generally-available) for a walkthrough and insight into how the code is designed.\n- See [code examples](https://github.com/googleapis/python-spanner-django/tree/master/examples) using Django with Spanner.\n- Learn more about the [Django project](https://www.djangoproject.com/).\n- Learn more about [DB API](https://www.python.org/dev/peps/pep-0249/).\n- [File a GitHub issue](https://github.com/googleapis/python-spanner-django/issues) to report a bug or ask a question about using the Django ORM with Spanner."]]