Add a LocalDataQuerySet for using generic data in WebAPIResource.

Review Request #5880 — Created May 26, 2014 and submitted

Information

Djblets
release-0.8.x
6a17cac...

Reviewers

This introduces LocalDataQuerySet, which operates similarly to a
QuerySet, but can store any iterable data. The interface it exposes is
similar enough to QuerySet for basic usage.

While this may be useful for various purposes, it's largely intended for
use with WebAPIResource. Before now, getting WebAPIResource to return
data not from a database was tricky. You had to rewrite the
serialization functions, get(), get_list(), etc. Now, get_queryset() can
return a LocalDataQuerySet, passing in whatever it needs, and
WebAPIResource will work with it.

Unit tests pass.

Used this with the new HostingServiceResource to great success.

Description From Last Updated

LocalDataQuerySet

daviddavid

typo

daviddavid
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        djblets/db/query.py
        djblets/webapi/resources.py
        djblets/db/tests.py
      Ignored Files:
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        djblets/db/query.py
        djblets/webapi/resources.py
        djblets/db/tests.py
      Ignored Files:
    
    
  2. 
      
david
  1. 
      
  2. djblets/webapi/resources.py (Diff revision 1)
     
     
    Show all issues

    LocalDataQuerySet

  3. 
      
chipx86
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        djblets/db/query.py
        djblets/webapi/resources.py
        djblets/db/tests.py
      Ignored Files:
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        djblets/db/query.py
        djblets/webapi/resources.py
        djblets/db/tests.py
      Ignored Files:
    
    
  2. 
      
david
  1. 
      
  2. djblets/db/query.py (Diff revision 2)
     
     
    Show all issues

    typo

  3. 
      
chipx86
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        djblets/db/query.py
        djblets/webapi/resources.py
        djblets/db/tests.py
      Ignored Files:
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        djblets/db/query.py
        djblets/webapi/resources.py
        djblets/db/tests.py
      Ignored Files:
    
    
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.8.x (b43a44a)