Skip to content

Commit 08b80ce

Browse files
authored
Docs: fix changelog link and sample examples. (#700)
* docs: update docs to show decimal field support and check constraints but no support for unsigned data type * docs: linked changelog correctly * docs: fix doc links for sample examples * fix: skip test cursor_executemany_with_empty_params_list as spanner support is not there
1 parent ed404f5 commit 08b80ce

File tree

5 files changed

+14
-22
lines changed

5 files changed

+14
-22
lines changed

django_spanner/features.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ class DatabaseFeatures(BaseDatabaseFeatures):
3838
skip_tests = (
3939
# No foreign key constraints in Spanner.
4040
"backends.tests.FkConstraintsTests.test_check_constraints",
41+
# Spanner does not support empty list of DML statement.
42+
"backends.tests.BackendTestCase.test_cursor_executemany_with_empty_params_list",
4143
"fixtures_regress.tests.TestFixtures.test_loaddata_raises_error_when_fixture_has_invalid_foreign_key",
4244
# No Django transaction management in Spanner.
4345
"basic.tests.SelectOnSaveTests.test_select_on_save_lying_update",

docs/changelog.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CHANGELOG.md

docs/example_from_scratch.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../examples/from-scratch/README.md

docs/example_healthchecks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../examples/healthchecks/README.md

docs/samples.rst

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,12 @@
1-
Sample Code
2-
####################################
1+
Sample Examples
2+
###############
33

4-
Create and register your first model
5-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6-
To define your database layout create a models file in your app folder and add the relevant
7-
classes to it. Spanner works exactly like any other database you may have used with Django.
8-
Here is a simple example you can run with Spanner. In our poll application below we create
9-
the following two models:
4+
django-spanner for Django tutorial
5+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106

11-
.. code:: python
7+
This `Example <example_from_scratch.html>`_ shows how to use django-spanner for Cloud Spanner as a backend database for `healthchecks.io <https://healthchecks.io>`_
128

13-
from django.db import models
14-
15-
class Question(models.Model):
16-
question_text = models.CharField(max_length=200)
17-
pub_date = models.DateTimeField('date published')
18-
def __str__(self):
19-
return str(self.rating)
20-
21-
class Choice(models.Model):
22-
question = models.ForeignKey(Question, on_delete=models.CASCADE)
23-
choice_text = models.CharField(max_length=200)
24-
votes = models.IntegerField(default=0)
9+
django-spanner on healthchecks.io
10+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11+
12+
This `Example <example_healthchecks.html>`_ shows how to use django-spanner for Cloud Spanner as a backend database for `Django's tutorials <https://docs.djangoproject.com/en/2.2/intro/tutorial01/>`_

0 commit comments

Comments
 (0)