Saturday Afternoon

Project Commencement

For some reason I chose the scalability testing (perhaps it was my naivety).

Overview

This sort of thing is done in the form of a Django Management Command (a python script with the “Command” class). This subclasses something in Django and overrides a function that does all the work.

Existing Examples

Look at reviewboard/reveiws/management/commands/*.py
Others are reviewboard/*/management
Run by: “./reviewboard/manage.py fixscreenshots”

What it does

ChipX86: “what’s useful is that they’re run with the site’s settings pre-loaded. You’ll have access to all our code for interacting with the database, and the right database will automatically be used in a dev tree, they’re run with: ./reviewboard/manage.py commandname args in a site install: rb-site manage /path/to/site commandname — args”

Running a Command
To Rn: ./reviewboard/manage.py commandname args
Will perform the operation on the database & you can see the results
Then you need to purge the database and start again.
purge with: ./reviewboard/manage.py flush

Resources

This is where I started: docs.djangoproject.com/custom-mgt-cmds
Management-Commands
django command guide

So Far…

I created a db.py file and test ran some simple text from the file.  Thinking I need the LabelCommand subcommand of the BaseCommand class, which should allow for any kind of “string” as arguments.  Not much documentation on BaseCommand in Django & not much on other django books.

Plans for Tomorrow:

Determine which type of command to pursue (most likely LabelCommand).

Collect the Sprint Status Reports and post those reports.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s