diff options
| author | Tom Christie | 2013-01-15 09:33:24 +0000 | 
|---|---|---|
| committer | Tom Christie | 2013-01-15 09:33:24 +0000 | 
| commit | 79f635e0ddeee6647a9c6f8937953052b17f6ff8 (patch) | |
| tree | 932cf589a466c56eba1da17ae0c868dbb73d9382 /docs/tutorial | |
| parent | 190473f5089c5862e610bd823d6b67257ab1376f (diff) | |
| download | django-rest-framework-79f635e0ddeee6647a9c6f8937953052b17f6ff8.tar.bz2 | |
Modify tutorial to work with pygments 1.6rc.  Fixes #581.
Diffstat (limited to 'docs/tutorial')
| -rw-r--r-- | docs/tutorial/1-serialization.md | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/docs/tutorial/1-serialization.md b/docs/tutorial/1-serialization.md index db6db2da..d3ada9e3 100644 --- a/docs/tutorial/1-serialization.md +++ b/docs/tutorial/1-serialization.md @@ -78,9 +78,10 @@ For the purposes of this tutorial we're going to start by creating a simple `Sni      from django.db import models      from pygments.lexers import get_all_lexers      from pygments.styles import get_all_styles -     -    LANGUAGE_CHOICES = sorted([(item[1][0], item[0]) for item in get_all_lexers()]) -    STYLE_CHOICES = sorted((item, item) for item in list(get_all_styles())) + +    LEXERS = [item for item in get_all_lexers() if item[1]] +    LANGUAGE_CHOICES = sorted([(item[1][0], item[0]) for item in LEXERS]) +    STYLE_CHOICES = sorted((item, item) for item in get_all_styles())      class Snippet(models.Model): | 
