datatracker/ietf/idtracker
Bill Fenner 21c00de37f The status of items page isn't good to diff for two reasons:
* It changes all the time, so database update lag will cause differences
 * It changes all the time, so any diff file will be quickly outdated.

I've done extensive review of the whole set of differences between
the django code and perl code running on the same database and am
confident in the correctness of the django code.
 - Legacy-Id: 589
2007-06-21 17:02:44 +00:00
..
fixtures Create mailing list domains table and idtracker Roles model. 2007-06-07 17:58:06 +00:00
templatetags The same name for two functions is unfortunate. Fixed. 2007-06-17 21:07:22 +00:00
.gitignore Moving ietf to trunk/ietf 2007-05-04 12:37:28 +00:00
__init__.py Moving ietf to trunk/ietf 2007-05-04 12:37:28 +00:00
feeds.py Use a known exception when there are too many path arguments (in bits) 2007-06-02 01:15:59 +00:00
forms.py Use a regular ChoiceField for substate to allow "None" as an 2007-06-18 21:18:55 +00:00
models.py Chase the renaming of the areadirectors model to areadirector, 2007-06-20 14:02:32 +00:00
README Moving ietf to trunk/ietf 2007-05-04 12:37:28 +00:00
testurls.list The status of items page isn't good to diff for two reasons: 2007-06-21 17:02:44 +00:00
urls.py Adding handler404 and handler 500 in the right place ,;-) 2007-06-05 18:18:40 +00:00
views.py Omit 'RFC Ed Queue' and 'RFC Published' states. 2007-06-21 15:35:04 +00:00

form_for_model(IDInternal) will autogenerate form elemnts to edit the model

class ImageAddForm(BaseForm):

    def __init__(self, *args, name=None, **kwargs):
        super(ImageAddForm, self).__init__(*args, **kwargs)
        self.fields['category'].choices=(('a','a'),)
	# create filter based on name=

ImageForm = form_for_model(Image, form=ImageAddForm)
foo = ImageForm(name='foo')



To get from draft to author list:

>>> d = a[5]
>>> print d
draft-fenner-zinin-rtg-standard-reqts
>>> print d.authors.all()
[<IDAuthors: IDAuthors object>, <IDAuthors: IDAuthors object>]
>>> l=d.authors.all()
>>> print l[0].person
Bill Fenner
>>> print l[0].person.emailaddresses_set.filter(priority=d.id_document_tag)
[<EmailAddresses: EmailAddresses object>]
>>> print l[0].person.emailaddresses_set.filter(priority=d.id_document_tag)[0].ail_address
fenner@research.att.com

IDAuthors should have an auxilliary function for this.
It's the one that has the person linkage and knows the document.


--
we should use a variant of django-registration.
http://www.stonemind.net/blog/2007/04/13/django-registration-for-newbies/

1. verify email address with round trip
2. if there's a row in iesg_login, use that username
   (? liaison tool logins ?)
   otherwise, force the email address
3. get a password and create the user
   (this is almost the same as resetting the password)
4. find the person_or_org_info row, associate that with
   the user row

--

<ubernostrum> Both the regular and date-base object_detail can take either an
+object_id, or a slug/slug_field combo.
<ubernostrum> So use the username as the "slug" and specify 'username' as the
+'slug_field' argument.

http://www.b-list.org/weblog/2006/11/16/django-tips-get-most-out-generic-views

newly learned: 'slug_field' just gets passed so can be otherdb__username