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 directory. So, you'd be able to
write a script that is pre-bootstrapped and had full access to the database.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Wed, Feb 24, 2010 at 8:52 AM, Stodge <sto...@gmail.com> wrote:

> 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 development server - it automates creating Trac
> > projects and now RB sites.
> >
> > Also I thought I could import the review board environment and access
> > RB classes directly but I can't get that working. It's a trick I use
> > in a Mercurial hook for Django:
> >
> > sys.path.append("/srv/reviews/support/conf")
> > os.environ['DJANGO_SETTINGS_MODULE'] = 'settings_local'
> > from django.core.management import setup_environ
> > import settings_local
> > project_directory = setup_environ(settings_local)
> > from django.contrib.auth.models import User
> >
> > But I get:
> >
> > ImportError: No module named conf
> >
> > Any suggestions? I also need to promote a user to admin/staff status
> > from within a script or via the API. Thanks
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to