      We do some additional form validation to ensure clients see helpful error responses."""
  
      code = forms.CharField(widget=forms.Textarea, label='Code Text', max_length=1000000, 
                             help_text='(Copy and paste the code text here.)')
      title = forms.CharField(required=False, help_text='(Optional)', max_length=100)
      linenos = forms.BooleanField(label='Show Line Numbers', required=False)
      lexer = forms.ChoiceField(choices=LEXER_CHOICES, initial='python')
      style = forms.ChoiceField(choices=STYLE_CHOICES, initial='friendly')
  
  
 
</s> remove     code = forms.CharField(widget=forms.Textarea, label='Code Text', max_length=1000000, 
 </s> add     code = forms.CharField(widget=forms.Textarea,
                           label='Code Text',
                           max_length=1000000,  </s> remove import hashlib
 </s> add import uuid
import operator </s> remove     allowed_methods = ('read',)
 </s> add     """Resource with default operations for list.
    TODO: provide filter/order/num_results/paging, and a create operation to create queries."""
    allowed_methods = ('GET',) </s> remove class BlogPostCreator(ModelResource):
    """A resource with which blog posts may be created."""
    allowed_methods = ('POST',)
 </s> add class BlogPostRoot(RootModelResource):
    """A resource with which lists all existing blog posts and creates new blog posts."""
    allowed_methods = ('GET', 'POST',) </s> remove 
##### Comment Resources #####

COMMENT_FIELDS = ('username', 'comment', 'created', 'rating', 'absolute_url', 'blogpost_url')

class CommentList(QueryModelResource):
    """A resource which lists all existing comments for a given blog post."""
    allowed_methods = ('GET', )
    model = Comment
    fields = COMMENT_FIELDS

class CommentCreator(ModelResource):
    """A resource with which blog comments may be created for a given blog post."""
    allowed_methods = ('POST',)
 </s> add class CommentRoot(RootModelResource):
    """A resource which lists all existing comments for a given blog post, and creates new blog comments for a given blog post."""
    allowed_methods = ('GET', 'POST',)
    title = forms.CharField(required=False,
                            help_text='(Optional)',
                            max_length=100)
    linenos = forms.BooleanField(label='Show Line Numbers',
                                 required=False)
    lexer = forms.ChoiceField(choices=LEXER_CHOICES,
                              initial='python')
    style = forms.ChoiceField(choices=STYLE_CHOICES,
                              initial='friendly')
      We do some additional form validation to ensure clients see helpful error responses."""
  
      code = forms.CharField(widget=forms.Textarea, label='Code Text', max_length=1000000, 
                             help_text='(Copy and paste the code text here.)')
    title = forms.CharField(required=False,
                            help_text='(Optional)',
                            max_length=100)
    linenos = forms.BooleanField(label='Show Line Numbers',
                                 required=False)
    lexer = forms.ChoiceField(choices=LEXER_CHOICES,
                              initial='python')
    style = forms.ChoiceField(choices=STYLE_CHOICES,
                              initial='friendly')
    title = forms.CharField(required=False,
                            help_text='(Optional)',
                            max_length=100)
    linenos = forms.BooleanField(label='Show Line Numbers',
                                 required=False)
    lexer = forms.ChoiceField(choices=LEXER_CHOICES,
                              initial='python')
    style = forms.ChoiceField(choices=STYLE_CHOICES,
                              initial='friendly')
    title = forms.CharField(required=False,
                            help_text='(Optional)',
                            max_length=100)
    linenos = forms.BooleanField(label='Show Line Numbers',
                                 required=False)
    lexer = forms.ChoiceField(choices=LEXER_CHOICES,
                              initial='python')
    style = forms.ChoiceField(choices=STYLE_CHOICES,
                              initial='friendly')
    title = forms.CharField(required=False,
                            help_text='(Optional)',
                            max_length=100)
    linenos = forms.BooleanField(label='Show Line Numbers',
                                 required=False)
    lexer = forms.ChoiceField(choices=LEXER_CHOICES,
                              initial='python')
    style = forms.ChoiceField(choices=STYLE_CHOICES,
                              initial='friendly')
  
  
keep keep keep keep replace replace replace replace keep keep
 Lots of docs, trying to tidy up examples... 
examples/pygments_api/forms.py