Still can't get this to work:
# load_rb_env.py
import os, sys
import reviewboard directory from site-packages
# Append the main RB python directory.
sys.path.append(reviewboard.__path__[0])
# Append the RB site directory.
sys.path.append(/srv/reviews/test/conf)
# Import the RB environment.
Go figure; this seems to work:
sys.path.append(/srv/reviews/test/conf)
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings_local'
from django.contrib.auth.models import User
users = User.objects.all()
for user in users:
print user.username
On Mar 3, 1:17 pm, Stodge sto...@gmail.com wrote:
The settings module should just be 'reviewboard.settings'. The
'settings_local' is imported from that. That could be the problem you were
hitting.
I would advise going this route.
Down the road, I'd like to have better support for users to write Django
management commands that live in the site
For now I'm just directly modifying the DB, though that's kind of
naughty!
On Feb 24, 10:18 am, Stodge sto...@gmail.com wrote:
Is there a way to create a repository in review board using the API? I
can't see anything in the API docs. This is for a script I maintain
that administers our
Would you be willing to share your db scripts? I'm looking to do much
the same thing for our deployment. It would be nice to have someplace to
start.
On 02/24/2010 11:52 AM, Stodge wrote:
For now I'm just directly modifying the DB, though that's kind of
naughty!
On Feb 24, 10:18 am, Stodge
The old version is available here:
http://trac-hacks.org/wiki/AdminToolkitScript
The new version will be uploaded there once RB support is complete.
However, the scripts assume they can take over the whole Centos server
so I don't know how much use they will be for you. Also the scripts
were