      foo = models.BooleanField()
      bar = models.IntegerField(help_text='Must be an integer.')
      baz = models.CharField(max_length=32, help_text='Free text.  Max length 32 chars.')
      created = models.DateTimeField(auto_now_add=True)
      
      class Meta:
          ordering = ('created',)
  
      def save(self, *args, **kwargs):
          """For the purposes of the sandbox, limit the maximum number of stored models."""
          super(MyModel, self).save(*args, **kwargs)
          while MyModel.objects.all().count() > MAX_INSTANCES:
 
</s> remove         """For the purposes of the sandbox, limit the maximum number of stored models."""
 </s> add         """
        For the purposes of the sandbox limit the maximum number of stored models.
        """ </s> remove             MyModel.objects.all()[0].delete()
    
    @models.permalink
    def get_absolute_url(self):
        return ('my-model-resource', (self.pk,))
 </s> add             MyModel.objects.all().order_by('-created')[0].delete()
 </s> remove     class Meta:
        ordering = ('created',)

    @models.permalink
    def get_absolute_url(self):
        return ('blog-post', (), {'key': self.key})

    @property
    @models.permalink
    def comments_url(self):
        """Link to a resource which lists all comments for this blog post."""
        return ('comments', (), {'blogpost': self.key})

    def __unicode__(self):
        return self.title

 </s> add  </s> remove     class Meta:
        ordering = ('created',)

    @models.permalink
    def get_absolute_url(self):
        return ('comment', (), {'blogpost': self.blogpost.key, 'id': self.id})
    
    @property
    @models.permalink
    def blogpost_url(self):
        """Link to the blog post resource which this comment corresponds to."""
        return ('blog-post', (), {'key': self.blogpost.key})
        
 </s> add  </s> remove         for obj in self.__class__.objects.order_by('-pk')[MAX_POSTS:]:
 </s> add         for obj in self.__class__.objects.order_by('-created')[MAX_POSTS:]:
      foo = models.BooleanField()
      bar = models.IntegerField(help_text='Must be an integer.')
      baz = models.CharField(max_length=32, help_text='Free text.  Max length 32 chars.')
      created = models.DateTimeField(auto_now_add=True)



  
      def save(self, *args, **kwargs):
          """For the purposes of the sandbox, limit the maximum number of stored models."""
          super(MyModel, self).save(*args, **kwargs)
          while MyModel.objects.all().count() > MAX_INSTANCES:
keep keep keep keep replace replace replace keep keep keep keep keep
 Fixing some of the last blocking issues 
examples/modelresourceexample/models.py