datatracker/ietf/idtracker
Henrik Levkowetz 798f7697af Merged [4600] from rjsparks@nostrum.com:
* Adds a new document type for conflict reviews, with a ballot for the IESG 5742 response to a review request
* Integrated the new document type into the iESG agenda views (including RSS feeds)* Removed the Edit and Add buttons from the document main view.
* Replaced Add with actions appropriate for the document type, such as "Begin IESG Processing" or "Begin IETF Conflict Review", and made most data directly editable on the document's main page, depending on access permissions.
* Removed a manual editing step that the secretariat had to perform when sending conflict review messages. The view now composes the message correctly given the stream.
* Added a pencil icon motif to differentiate fields that are editable.
* Generalized several views and helper functions to use Document instead of (e.g.) IdWrapper
* Generalized reading documents from the repository
* Added a way to get from IdWrapper  to the underlying Document to facilitate migrating way from the Wrapper classes* Added many helpers to Document to assist with migrating off IdWrapper
* Minor fixes and other changes
  * Fixes to document main view to avoid (silent) template failures. 
  * Began removing some of the code that is no longer reachable post-migration  * Corrected the behavior of the undefer code and added test cases for it
  * Improved initial population of notification lists and added the ability to regenerate the initial list
* Made the test code that scans for template coverage more robust
* Deployment notes:
  * new setting: CONFLICT_REVIEW_PATH. The associated directory will need to be created

This branch fixes bugs #805, #744 and #812
 - Legacy-Id: 4652
Note: SVN reference [4600] has been migrated to Git commit 798e7a50e7
2012-07-28 16:29:28 +00:00
..
fixtures Merged from log:branch/2.00@2363: Current release branch head to trunk. 2010-07-21 12:48:05 +00:00
migrations Set svn:ignore *.pyc in new directories. 2011-05-12 14:29:37 +00:00
templatetags Merged [4600] from rjsparks@nostrum.com: 2012-07-28 16:29:28 +00:00
.gitignore Merged from log:branch/2.00@2363: Current release branch head to trunk. 2010-07-21 12:48:05 +00:00
__init__.py Adding copyright notices to all python files 2007-06-27 21:16:34 +00:00
feeds.py Remove .state and .*_state on Document in favour of generic states 2011-11-16 18:18:06 +00:00
models.py Move new schema models from redesign/ to ietf/ 2012-01-24 17:17:24 +00:00
README Moving ietf to trunk/ietf 2007-05-04 12:37:28 +00:00
sitemaps.py Merged in changes from the conversion branch 2011-06-28 18:20:20 +00:00
tests.py Merged in changes from the conversion branch 2011-06-28 18:20:20 +00:00
testurl.list Merged in changes from the conversion branch 2011-06-28 18:20:20 +00:00
urls.py Merged from log:branch/2.00@2363: Current release branch head to trunk. 2010-07-21 12:48:05 +00:00
views.py Remove .state and .*_state on Document in favour of generic states 2011-11-16 18:18:06 +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