diff options
| author | Marc Tamlyn <marc.tamlyn@gmail.com> | 2013-05-19 01:37:25 -0700 |
|---|---|---|
| committer | Marc Tamlyn <marc.tamlyn@gmail.com> | 2013-05-19 01:37:25 -0700 |
| commit | 33c361ef9d882522aeae549a3a8c8b52ca5cfc5a (patch) | |
| tree | 7c07f1f460ea123af7d9aa29ac6de254b423f9cc /docs/ref/models/options.txt | |
| parent | c70ca4879ee33fc4b70ad9a17d74b649f8f75487 (diff) | |
| parent | a4a761ada2286e0f08282efe8dffcd1b384c052c (diff) | |
Merge pull request #1129 from frog32/master
Add needed Imports to the Documentation
Diffstat (limited to 'docs/ref/models/options.txt')
| -rw-r--r-- | docs/ref/models/options.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index 5f9316bd2a..90099d13a3 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -145,6 +145,12 @@ Django quotes column and table names behind the scenes. and a question has more than one answer, and the order of answers matters, you'd do this:: + from django.db import models + + class Question(models.Model): + text = models.TextField() + # ... + class Answer(models.Model): question = models.ForeignKey(Question) # ... |
