                                                       key=operator.itemgetter(1), reverse=True)]
      [os.remove(path) for path in ctime_sorted_paths[max_files:]]
  
  
  class ObjectStoreRoot(View):
      """
      Root of the Object Store API.
      Allows the client to get a complete list of all the stored objects, or to create a new stored object.
      """
 
</s> remove         filepaths = [os.path.join(OBJECT_STORE_DIR, file) for file in os.listdir(OBJECT_STORE_DIR) if not file.startswith('.')]
 </s> add         filepaths = [os.path.join(OBJECT_STORE_DIR, file)
                     for file in os.listdir(OBJECT_STORE_DIR)
                     if not file.startswith('.')] </s> remove     filepaths = [os.path.join(dir, file) for file in os.listdir(dir) if not file.startswith('.')]
    return [item[0] for item in sorted( [(path, os.path.getctime(path)) for path in filepaths],
                                        key=operator.itemgetter(1), reverse=False) ]
 </s> add     filepaths = [os.path.join(dir, file)
                 for file in os.listdir(dir)
                 if not file.startswith('.')]
    ctimes = [(path, os.path.getctime(path)) for path in filepaths]
    ctimes = sorted(ctimes, key=operator.itemgetter(1), reverse=False)
    return [filepath for filepath, ctime in  ctimes]
 </s> remove         return [reverse('stored-object', request, kwargs={'key':key}) for key in ctime_sorted_basenames]
 </s> add         return [get_file_url(key, request) for key in ctime_sorted_basenames] </s> remove         Return a stored object, by unpickling the contents of a locally stored file.
 </s> add         Return a stored object, by unpickling the contents of a locally
        stored file. </s> remove         return {"Some other resources": [reverse('another-example', request, kwargs={'num':num}) for num in range(3)]}
 </s> add         return {"Some other resources": [reverse('another-example', kwargs={'num':num}, request=request) for num in range(3)]}
def get_filename(key):
    """
    Given a stored object's key returns the file's path.
    """
    return os.path.join(OBJECT_STORE_DIR, key)


def get_file_url(key, request):
    """
    Given a stored object's key returns the URL for the object.
    """
    return reverse('stored-object', kwargs={'key': key}, request=request)


                                                       key=operator.itemgetter(1), reverse=True)]
      [os.remove(path) for path in ctime_sorted_paths[max_files:]]
  
  
def get_filename(key):
    """
    Given a stored object's key returns the file's path.
    """
    return os.path.join(OBJECT_STORE_DIR, key)


def get_file_url(key, request):
    """
    Given a stored object's key returns the URL for the object.
    """
    return reverse('stored-object', kwargs={'key': key}, request=request)


  class ObjectStoreRoot(View):
      """
      Root of the Object Store API.
      Allows the client to get a complete list of all the stored objects, or to create a new stored object.
      """
keep keep keep add keep keep keep keep keep
 reverse takes request as a kwarg for compatibility with django's reverse 
examples/objectstore/views.py