Skip to content

Historic: Sprint: IETF74Sprint

Robert Sparks edited this page Apr 26, 2023 · 1 revision

IETF74 Code Sprint

There will be a code sprint in San Francisco on March 21 (the Saturday before IETF 74).

If you plan to participate, please sign up on the IETF74SprintSignUp page.

This sprint will be the California room at the Hilton from 9:30am to 5:00pm.

We have the mailing list "[email protected]" to help with coordination and for use during the event. Please make sure you're subscribed before the event starts. More info on the list is available at https://www.ietf.org/mailman/listinfo/codesprints.

See you in San Francisco!

This sprint's plan

  • Finish testing and deployment of Bill Fenner's django-based password self-service system. (Subject to additional list discussion)

  • Replace any remaining perl/mysql using scripts run by cron with django based equivalents. (See IETF73SprintLegacyScriptsDocumentation).

  • Begin the migration to from Django 0.96 to Django 1.0

Prerequisites

  • A working knowledge of python and/or web design

  • Learn the basic concepts of Django 0.96, e.g., work through the excellent tutorial. (You may choose to start with the 1.0 tutorial, but be sure to spend the time to learn the 0.96/1.0 differences - most of the code you will encounter at this sprint will still be based on 0.96).

  • Review the porting guide at http://docs.djangoproject.com/en/dev/releases/1.0-porting-guide/

  • Bring a laptop with python (2.4 or 2.5), django 0.96, subversion and mysql (4.x is ok, 5.x is better) installed, and be ready to check out a branch of the IETF web site from the tools svn server. (Watch for a list discussion on how to have Django 0.96 and 1.0 installed on the same machine). Note that some Unix distributions such as FreeBSD 7.1 only have ports for django 1.0; see http://media.djangoproject.com/releases/0.96/Django-0.96.3.tar.gz to get the source tarball.

Reference information

Each sprint participant will gets thier own branch to work in. You'll do something like this to check it out:

svn co http://svn.tools.ietf.org/svn/tools/ietfdb/sprint/74/yourname

MySQL Configuration

The database we're using for the sprint is running on Robert's mini:

DATABASE_ENGINE   = 'mysql'
DATABASE_NAME     = 'ietf'
DATABASE_USER     = 'ietf'
DATABASE_PASSWORD = 'ietf'
DATABASE_HOST     = '130.129.52.254'
DATABASE_PORT     = ''

This information goes in ietf/settings.py in your SVN checkout (see above)

Initial Setup

You can test that everything is ready go do by changing into the IETF directory and issuing a simple admin command:

python manage.py sql ipr

If you get an error like this:

Error: Can't find the file 'settings.py' in the directory containing './manage.py'. It appears you've customized things.
You'll have to run django-admin.py, passing it your settings module.
(If the file settings.py does indeed exist, it's causing an ImportError somehow.)

It's probably because you don't have a local settings file. You can get started by creating a basically empty one:

echo '#' > settings_local.py

Old Perl Scripts

The old perl scripts that we'll be can be read at:

http://trac.tools.ietf.org/tools/ietfdb/browser/branch/legacy

Or, if you'd prefer to check them out into a local tree, you can use subversion:

http://svn.tools.ietf.org/svn/tools/ietfdb/branch/legacy/

You won't be working in that branch -- it's only to get the old scripts so you can read them.

Setting up your environment to run django scripts from the command line

You'll need a couple of environment variables:

export PYTHONPATH=(path to your branch - the ietf directory should be in what you put here)
export DJANGO_SETTINGS_MODULE=ietf.settings
Clone this wiki locally