I can list all RB users this way:
from django.contrib.auth.models import User
for user in User.objects.all():
print user
That correctly prints out all of my users. But the same doesn't work for
Group
from django.contrib.auth.models import Group
for group in Group.objects.all():
Better yet, is there a way to do this with the new RBTools 5.x API?
--Steve
On Wednesday, September 11, 2013 8:54:07 AM UTC-7, Steve wrote:
I can list all RB users this way:
from django.contrib.auth.models import User
for user in User.objects.all():
print user
That correctly
This example is very helpful. Thanks!
--Steve
On Wednesday, September 11, 2013 11:43:11 AM UTC-7, Steven MacLeod wrote:
Yes, this can be done using the API. Assuming you have rbtools 5.x
installed, the following script should work. Modify for your desired
output. It should be noted that
Yes, this can be done using the API. Assuming you have rbtools 5.x
installed, the following script should work. Modify for your desired
output. It should be noted that this will make a large number of HTTP
requests, and is not optimized.
from rbtools.api.client import RBClient
client =
And to address the initial approach:
django.contrib.auth.models.Group is for authentication groups, which we
don't use. If you want to use a management command, use this:
from reviewboard.reviews.models import Group
-David
On Wed, Sep 11, 2013 at 11:43 AM, Steven MacLeod ste...@smacleod.ca