-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
5 changed files
with
14 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../examples/from-scratch/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../examples/healthchecks/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,12 @@ | ||
Sample Code | ||
#################################### | ||
Sample Examples | ||
############### | ||
|
||
Create and register your first model | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
To define your database layout create a models file in your app folder and add the relevant | ||
classes to it. Spanner works exactly like any other database you may have used with Django. | ||
Here is a simple example you can run with Spanner. In our poll application below we create | ||
the following two models: | ||
django-spanner for Django tutorial | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. code:: python | ||
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>`_ | ||
|
||
from django.db import models | ||
class Question(models.Model): | ||
question_text = models.CharField(max_length=200) | ||
pub_date = models.DateTimeField('date published') | ||
def __str__(self): | ||
return str(self.rating) | ||
class Choice(models.Model): | ||
question = models.ForeignKey(Question, on_delete=models.CASCADE) | ||
choice_text = models.CharField(max_length=200) | ||
votes = models.IntegerField(default=0) | ||
django-spanner on healthchecks.io | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
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/>`_ |