          pathname = os.path.join(HIGHLIGHTED_CODE_DIR, unique_id)
  
          if not os.path.exists(pathname):
              # We only need to generate the file if it doesn't already exist.
              title = content['title'] if content['title'] else None
              linenos = 'table' if content['linenos'] else False
              lexer = get_lexer_by_name(content['lexer'])
              formatter = HtmlFormatter(style=content['style'], linenos=linenos, full=True, title=title)
              
              with open(pathname, 'w') as outfile:
 
</s> remove             formatter = HtmlFormatter(style=content['style'], linenos=linenos, full=True, title=title)
 </s> add             formatter = HtmlFormatter(style=content['style'], linenos=linenos, full=True, **options) </s> remove         return Response(status.HTTP_303_SEE_OTHER, headers={'Location': self.reverse(PygmentsInstance, unique_id)})
 </s> add         return Response(status.HTTP_201_CREATED, headers={'Location': self.reverse(PygmentsInstance, unique_id)}) </s> remove MEDIA_ROOT = '/Users/tomchristie/'
 </s> add MEDIA_ROOT = 'media/' </s> remove     (r'pygments-example/', include('pygments_api.urls')),
 </s> add     (r'^pygments-example/', include('pygments_api.urls')), </s> remove [
    {
        "pk": 1, 
        "model": "auth.user", 
        "fields": {
            "username": "admin", 
            "first_name": "", 
            "last_name": "", 
            "is_active": true, 
            "is_superuser": true, 
            "is_staff": true, 
            "last_login": "2010-01-01 00:00:00", 
            "groups": [], 
            "user_permissions": [], 
            "password": "sha1$6cbce$e4e808893d586a3301ac3c14da6c84855999f1d8", 
            "email": "test@example.com", 
            "date_joined": "2010-01-01 00:00:00"
        }
    }
] </s> add 
            options = {'title': content['title']} if content['title'] else {}
          pathname = os.path.join(HIGHLIGHTED_CODE_DIR, unique_id)
  
          if not os.path.exists(pathname):
              # We only need to generate the file if it doesn't already exist.
            options = {'title': content['title']} if content['title'] else {}
              linenos = 'table' if content['linenos'] else False
              lexer = get_lexer_by_name(content['lexer'])
              formatter = HtmlFormatter(style=content['style'], linenos=linenos, full=True, title=title)
              
              with open(pathname, 'w') as outfile:
keep keep keep keep replace keep keep keep keep keep
 Minor fixups on pygments example 
examples/pygments_api/views.py