Commit graph

1179 commits

Author SHA1 Message Date
Henrik Levkowetz e27e4dbb1f Changed the 'pipe' utility to work with commands taking input
on standard in, also when providing an emtpy string as input.
This is now different from providing 'None' as the input
argument, or omitting it.
 - Legacy-Id: 6485
2013-10-23 20:45:07 +00:00
Henrik Levkowetz 65d505edf3 Fixed some bugs in the method which saves a copy of a page which failed a
testurl diff test.
 - Legacy-Id: 6450
2013-10-15 17:37:30 +00:00
Henrik Levkowetz b951a187a7 If we have a diff with a known-good master in a testurl.list file, save the
failed file for inspection.
 - Legacy-Id: 6447
2013-10-14 18:38:13 +00:00
Henrik Levkowetz bc0e4e5614 Tweaked the makefixture command to not recurse on reverse relationships.
- Legacy-Id: 6446
2013-10-14 18:36:20 +00:00
Henrik Levkowetz e5c5d4cafa Tweaked the return handling for urltest diffs.
- Legacy-Id: 6444
2013-10-13 23:43:50 +00:00
Henrik Levkowetz ec05016585 Added a test assertion in the case of a failed urltest diff, to have the
test noticed as failed.
 - Legacy-Id: 6441
2013-10-13 21:12:23 +00:00
Henrik Levkowetz 90e95e6f15 Repurpose the 'master' column in testurl.list files to point to a local
known-good master file, for comparisons.
 - Legacy-Id: 6433
2013-10-13 17:46:19 +00:00
Ole Laursen f6ff2a8082 Delete all old WGAction stuff, it's superceded by the WG charter
support, clean up iesg/models.py a bit
 - Legacy-Id: 6411
2013-10-10 16:12:34 +00:00
Henrik Levkowetz 3020c5f7eb Imported a new version of the draft metadata extraction module, which
calculates page numbers more reliably, doesn't include duplicates in
the list of referenced drafts, and other minor tweaks.
 - Legacy-Id: 6362
2013-10-04 13:50:14 +00:00
Henrik Levkowetz a07f47a4a0 Added a new TestCase class, subclassing django.test.TestCase, in order to
be able to add fixtures once and for all for all tests, instead of loading
them again and again for each test, if running on a database that supports
transaction rollbacks.  In this case, fixtures specified in the perma_fixtures
class attribute will be loaded permanently, and not re-loaded.  Fixtures
specifice as before, in a fixtures class attribute, will be treated as
before.

The downside of this is that as fixtures are loaded and not unloaded, they
can conflict with each other.  The requirements on consistency becomes much
greater.  The effect of this has been to require quite a bit of changes to
the simplified creations of various objects in make_test_data() in cases
where identically named objects occur in fixtures.  Where completely
fictitious objects are created, no conflicts appear.

Also re-wrote parts of test_runner.py to permit global fixtures, loaded
before any tests are run and shared by all.
 - Legacy-Id: 6318
2013-09-30 20:22:24 +00:00
Henrik Levkowetz b335ef3b5c Imported a newer version of makefixture from github. It handles reverse relationships in a less hackish way than my hack.
- Legacy-Id: 6314
2013-09-30 14:24:14 +00:00
Ole Laursen 52febb2fc0 Fix spelling bug in global[e] test fixtures
- Legacy-Id: 6311
2013-09-30 12:17:15 +00:00
Henrik Levkowetz 4b568f8d22 Empty models.py, needed to make django look for management/commands/.
- Legacy-Id: 6310
2013-09-29 21:15:06 +00:00
Henrik Levkowetz 6e9e1930e2 Added a makefixture management command, from http://djangosnippets.org/snippets/918/, somewhat hacked.
- Legacy-Id: 6307
2013-09-29 20:50:51 +00:00
Ole Laursen f13837ef5f Add support for global test fixtures to avoid loading them for all
tests
 - Legacy-Id: 6304
2013-09-29 17:32:52 +00:00
Henrik Levkowetz 2a2389d17f Merged in branch/iola/shimfree@6083. This cleans up and moves relevant code from idrfc/ to doc/. There should now only be a bit of old wrapper code left in idrfc; that will go away when the remaining models which use it are cleaned up.
- Legacy-Id: 6117
2013-09-09 17:45:36 +00:00
Henrik Levkowetz ed020c8b8e Add Auto-Submitted and Precedence header fields to outgoing email messages.
- Legacy-Id: 6071
2013-08-17 15:33:56 +00:00
Ole Laursen de7ae60985 Move markup_txt.py from idrfc/ to utils/
- Legacy-Id: 6046
2013-08-13 14:33:22 +00:00
Henrik Levkowetz 6baea429aa Merged in the nomcom app from ejimenez@yaco.es and esanchez@yaco.es, and accompanying dbtemplate app and the (standard) docutils module. Added some tweaks to get all tests to pass and migrations to run.
- Legacy-Id: 5948
2013-08-06 10:09:29 +00:00
Henrik Levkowetz 8675711c27 Merged [5902],[5904] from markus.stenberg@iki.fi:
Added support and scripts for generation of wg- and draft-aliases.  Fixes issue #713.
 - Legacy-Id: 5937
Note: SVN reference [5902] has been migrated to Git commit e5b551f4ce

Note: SVN reference [5904] has been migrated to Git commit e68e51cc55
2013-08-01 12:44:49 +00:00
Henrik Levkowetz 4ed0337cae Made the code which uses the 'magic' module to determine file type and encoding work with both the old and new interface to python-magic.
- Legacy-Id: 5876
2013-07-25 14:45:01 +00:00
Henrik Levkowetz cbfe489ff5 Merged in more shim-layer removals from olau@iola.dk
(-r5465:HEAD from branch/iola/shimfree).  Copying relevant
commit messages here:

 - Deleted dead code in many places.

 - Renamed id-something to draft-something, make the "is
   this eligible for expiration" logic clearer

 - Added a name for IPR search URL

 - Revamped the ballot popup view

 - URL reversed the IPR search link instead of hardcoding it

 - Cleaned up search views and remove dead code, port them to the new DB
   schema, hack related views in iesg/ and wginfo/ to use the new search
   interfaces, avoid camelCase in search GET parameters (with
   backwards-compat fallback), add some simple search unit tests, remove
   caching from views_search.py index pages as they're now pretty fast to
   generate, rewrite ballot popup JS, regularize some CSS classes to use
   hyphen-notation rather than camelCase, move some of the search
   templates to doc/.

   idrfc/ now mostly contains some wrapper code still in use by other
   subdirs, some ported code not yet moved, and dead code.

 - Fixed output bug in test crawler and print referrer upon errors so it's
   easier to figure out where a link came from

 - Added /doc/in-last-call/ to crawler, report original page as referrer in
   a redirect chain rather than intermediate URL

 - Ported idindex to new schema, speed them up, add tests, refactor index
   page in views_search to share code with the text index file, get rid
   of some special-case idindex filters from ietf_filters, move
   "/drafts/" redirects to a file in /doc/

 - Ported /idtracker/status/ and /idtracker/status/last-call/ overview of
   drafts in IESG process to new schema in /doc/iesg/ and
   /doc/iesg/last-call/

 - Added redirects for all of /idtracker/*, removed all view code and other
   dead code from idtracker/

 - Removed the idtracker sitemap indexing drafts - in its current form,
   it adds nothing of value to the HTML-based /doc/all/ view, and it's
   pretty slow

 - Ported idtracker feeds to new schema, move them to doc/, cleaned up
   idtracker/ - only templatetags/ietf_filters and proxy code is left
 - Legacy-Id: 5836
2013-07-17 20:52:39 +00:00
Henrik Levkowetz e678659b56 Merged in a lot of shim-layer removals from olau@iola.dk
(-r5194:5465 from branch/iola/shimfree).  Copying relevant
commit messages here:

  - Removed .related many to many relationship, it's not really useful
    since we always have to restrict on the relationship type anyway,
    instead add two helpers for doing the necessary queries (in both
    directions)

  - Added migration for transforming the .desc on the new_revision events
    into something more akin to what is actually shown in the history page

  - Added migration for blanking IESG notes that just consist of "RFC
    XXXX", these have been superfluous for some time

  - Grant stream chairs access to changing the stream on a draft

  - Hacked the format_history_text filter to be less weird, using the same
    formatting for snippets and full text, also link up legacy ballot set
    events

  - Moved the decoraters + utilities to new ietfauth/utils.py file

  - Added simple helper to Email to identify invalid email addresses (from
    legacy author entries)

  - Used new new_revision .desc format for when drafts are submitted

  - Improved the looks of the button class by adding extra contrast and a
    linear gradient. Currently the gradient is only visible in fairly
    recent browsers.

  - Rewrote draft and RFC tabs in terms of the new schema, porting
    write-up and history tabs as well

  - Fixed two bugs in RFC Editor syncing: make sure documents we don't know
    beforehand get a "draft" type and make sure individually submitted
    drafts get the type="individ" group instead of NULL

  - Made the CSS-styled button feel a bit nicer to use by flattening the
    active state, also introduce some temporary styles until browsers
    catch up with the standard syntax

  - Added migrations for fixing 1) a dummy RFC entry, 2) three stand-alone
    RFCs that didn't get their doc.type set, 3) a big bunch of historic
    stand-alone RFCs that have doc.group=None - set these to the
    individual submission "none" group for the time being so the view code
    doesn't have to deal with a special case.

    In some cases this is wrong since there actually was a WG associated
    but unfortunately fixing them properly requires detective work
    (probably parsing the RFCs) and in at least some cases recreating
    historic WGs. In case someone ends up doing this, the documents to
    check can still be found with

    Document.objects.filter(name__startswith="rfc", group__type="individ")
    since there are almost no new RFCs that didn't went through the I-D
    process.

  - Merged the I-D and RFC views by showing I-D information on RFCs too.
    I-Ds that have been published as RFCs redirect to the RFC URL. Also
    support alias URLs so e.g. /doc/bcpXXXX redirects to /doc/rfcXXXX.

  - Fixed revision augmentation so events after RFC publication gets a "RFC"
    designation

  - Fixed a bug with tabs not using provided name but rather doc.name

  - Displaying draft-iesg state rather than doc.friendly_state as IESG state,
    also show a notice that the IESG state refers to post-RFC processing
    if it does, like the old separate RFC page did

  - Fixed the RFC number doc.note migration to catch combined "RFC XXX; BCP
    XXX" notes too, use the opportunity to remove inserted HTML tags from
    notes and rely on linebreaksbr filter instead (the other thing was a
    left-over from the Perl days), update the various uses of the note to
    reflect that

  - Refactored slightly to make views_doc.py independent of other idrfc code

  - Moveed idrfc/views_doc.py to doc/ with associated templates, replace the
    somewhat fragile simple URL tests for views_doc.py with ordinary unit
    tests. The new tests are still fairly basic but at least test more
    than the URL tests did.

  - Made sure RFC's (and BCP/STD/FYI) are stored as RFC123 instead of
    RFC0123 in the alias table with a new migration and a change to the
    RFC Editor sync, this in turn makes /doc/std1/ do the right thing

  - Now /doc/std1/ works, we can actually do a local link in
    urlize_ietf_docs rather than linking to the tools.ietf.org server

  - Fixed history text formatter: sanitize HTML before adding linebreaks and
    non-breaking spaces, this cuts the time to render a history page with
    long comments in half

  - Added a test crawler that walks through the crawlable part of the site,
    reporting errors and slow pages

  - Got rid of initial "No record" positions when showing old positions,
    it's just noise

  - Added a .select_related() to the document main tab to reduce the number
    of DB queries, unfortunately it seems it doesn't really help with
    Django 1.2.x due to a bug (Document inherits from DocumentInfo which
    makes things a bit more complicated)

  - Introduced a simple cache in doc.get_state so repeated reads don't
    cause a DB query

  - Cleaned up the search code in preparation for removal of the shim-layer;
    use a static button and don't send extraneous GET parameters

  - Removed dead code in several places
 - Legacy-Id: 5830
2013-07-15 20:55:24 +00:00
Henrik Levkowetz 3105101cc5 Changed test running and test data generation to work with database rollback
(for instance with InnoDB).

Added settings.DATABASE_TEST_OPTIONS which can be used to force for instance
InnoDB use during testing.

Using this has the potential of reducing the time it takes to run the test
suite substantially; a few test runs indicate a reduction in test run time by
50% on a run-of-the-mill linux server.
 - Legacy-Id: 5823
2013-07-15 07:21:34 +00:00
Robert Sparks a741642717 Added editing last call messages, requesting, issuing and tracking IETF LCs to status-change documents
Added a Cancel button to the form that allows editing the relations for status-change documents
Added instructions to the agenda section 3.3

This adds states to status-change- documents and has a migration that must be applied.

This fixes bug #1039
 - Legacy-Id: 5770
2013-06-01 21:01:45 +00:00
Henrik Levkowetz 5bee7ac538 Provide the necessary message information to the user confirmation messaging. Fixes issue #1049.
- Legacy-Id: 5767
2013-05-31 16:32:25 +00:00
Henrik Levkowetz bd0c07290a Merged in branch/iola/milestones, which provides datatracker support for management of WG milestones.
- Legacy-Id: 5739
2013-05-15 22:07:23 +00:00
Henrik Levkowetz 927efe2b7c Merged [5600] and [5602] from rjsparks@nostrum.com:
Changed the header to last call messages to IETF Announce and to IANA to make
replying to the announcement less likely to create an unnecessary ticket.
 - Legacy-Id: 5652
Note: SVN reference [5602] has been migrated to Git commit 19dcf10316
2013-04-15 22:24:22 +00:00
Ole Laursen 3d1eb07afe Port idindex to new schema, speed them up, add tests, refactor index
page in views_search to share code with the text index file, get rid
of some special-case idindex filters from ietf_filters, move
"/drafts/" redirects to a file in /doc/
 - Legacy-Id: 5634
2013-04-10 11:48:07 +00:00
Henrik Levkowetz 7a98fff79c Merged [5476] from rjsparks@nostrum.com:
* Added a document type for changing the publication status of other documents, and the UI for manipulating them.
* Added charters, conflict reviews, and status changes to the AD's \'My Documents\' page
* Improved the presentation of all document types on the Agenda, Future Telechats, Scribe and Moderator package pages
* Made the reverse name for document relationships explicit rather than deriving them from forward names
* Added a way to get to the underlying Document (when it exists) from an RfcWrapper
* Unified several common forms used by different document types
 - Legacy-Id: 5629
Note: SVN reference [5476] has been migrated to Git commit 10b4f7a4dc
2013-04-07 19:11:18 +00:00
Robert Sparks 19dcf10316 Changed the header to last call messages to IETF Announce and to IANA to make replying to the announcement less likely to create an unnecessary ticket
- Legacy-Id: 5602
2013-03-27 19:04:50 +00:00
Henrik Levkowetz cc60a1aa5d Restored fix to utils/mail.py.
- Legacy-Id: 5521
2013-03-09 20:06:11 +00:00
Henrik Levkowetz e1a7bf92ff Added logging for mail sending problems.
- Legacy-Id: 5489
2013-03-06 19:36:06 +00:00
Henrik Levkowetz 2f3476690f In order that document states (which may be used by old documents) should not need to be removed when state machines change and states go out of use, all document states have a 'used' field. The code which accesses the state fields have not been requiring that used=True for the states returned, which is an error. Fixed this by adding 'used=True' to all State.objects.get() and State.objects.filter() call where it's relevant.
- Legacy-Id: 5486
2013-03-05 23:24:41 +00:00
Robert Sparks 10b4f7a4dc * Added a document type for changing the publication status of other documents, and the UI for manipulating them.
* Added charters, conflict reviews, and status changes to the AD's "My Documents" page
* Improved the presentation of all document types on the Agenda, Future Telechats, Scribe and Moderator package pages
* Made the reverse name for document relationships explicit rather than deriving them from forward names
* Added a way to get to the underlying Document (when it exists) from an RfcWrapper
* Unified several common forms used by different document types
 - Legacy-Id: 5476
2013-03-01 15:47:51 +00:00
Henrik Levkowetz c4015a302b Added variations on the recognized date formats during submitted draft parsing, such that comma need not be followed by whitespace in the formats using comma as a separator between some of the fields. Added extraction of drafts referenced by a document, in addition to RFCs referenced.
- Legacy-Id: 5456
2013-02-24 20:17:22 +00:00
Robert Sparks 589ff698ee Merge forward complete
- Legacy-Id: 5328
2013-01-24 21:28:27 +00:00
Ole Laursen accf6d4470 Move idrfc/views_doc.py to doc/ with associated templates, replace the
somewhat fragile simple URL tests for views_doc.py with ordinary unit
tests. The new tests are still fairly basic but at least test more
than the URL tests did.
 - Legacy-Id: 5295
2013-01-18 13:17:00 +00:00
Ole Laursen 6e89f3b606 Merge changes from old milestones branch
- Legacy-Id: 5198
2013-01-15 16:45:19 +00:00
Henrik Levkowetz 1fbcd783f3 Merged branch/iola/statesync up to @5118 to trunk.
- Legacy-Id: 5147
2012-12-20 20:32:03 +00:00
Henrik Levkowetz 9d9e2851e0 Test the argument list, not the tuple of argument tuple.
- Legacy-Id: 5134
2012-12-16 18:30:25 +00:00
Henrik Levkowetz 97a7ab30db Added simple logging of test runs, to make it easier to be sure that tests has been run successfully on the latest code.
- Legacy-Id: 5131
2012-12-15 22:47:11 +00:00
Ole Laursen b19f6d8060 Merge in milestones branch
- Legacy-Id: 5091
2012-12-03 14:36:30 +00:00
Henrik Levkowetz 4946a3f694 Updated draft submission author extraction module to handle dash-separated double given names.
- Legacy-Id: 5088
2012-12-03 13:17:33 +00:00
Emilio Jiménez 65afd10d4a Refactor mange group views:
* Create a new models NomComGroup with public_key field. Default type is nomcom
 * News urls and views to separate members and chair forms
 * Add rolodex url when person not found.
 * Views access is only for secretariat and chair roles
See #904
 - Legacy-Id: 5069
2012-11-22 10:46:39 +00:00
Emilio Jiménez 230f6cfae7 view only accessible by the secretariat that allows to assign the email of the members and the chair of the NomCom
See #904
 - Legacy-Id: 5066
2012-11-20 00:40:57 +00:00
Henrik Levkowetz 0e67b2c758 Tweaked the handling of the syslog module not being available on windows.
- Legacy-Id: 5058
2012-11-07 21:41:02 +00:00
Ole Laursen 45cf853524 Dump redacted events in DeletedEvent table
- Legacy-Id: 5025
2012-11-07 14:59:17 +00:00
Ole Laursen daa5d49adb Fix RFC Editor group acronym to be rfceditor in test data
- Legacy-Id: 5024
2012-11-07 14:58:49 +00:00
Henrik Levkowetz cfcce2f03e Merged [5000] from rjsparks@nostrum.com:
Made it more obvious when an intended status or shepherding AD is not set
Removed an unused template
Show reset approval text immediately.

Fixes bug #900
 - Legacy-Id: 5015
Note: SVN reference [5000] has been migrated to Git commit 2470ad77dd
2012-11-07 13:01:34 +00:00
Henrik Levkowetz cfe466eb37 Merged [4991] from adam@nostrum.com:
Fixing time column wrapping problem that exhibits in (at least) Safari.
 - Legacy-Id: 5008
Note: SVN reference [4991] has been migrated to Git commit 5e384591fd
2012-11-06 15:23:17 +00:00
Henrik Levkowetz 8aa4922978 Remove dependency on syslog module -- it won't be available under Python 2.7 under Windows.
- Legacy-Id: 4974
2012-10-30 22:17:24 +00:00
Henrik Levkowetz 45585957ef Added support for reverse-order (i.e., Japanese, Chinese, and other) names with uppercase family name in the draft submission author extraction.
- Legacy-Id: 4949
2012-10-23 12:33:21 +00:00
Henrik Levkowetz d0214d3b25 Merged [4806] from rjsparks@nostrum.com:
Better handling for BoFs, particularly those that won't create WGs
 - Legacy-Id: 4939
2012-10-21 14:40:02 +00:00
Henrik Levkowetz c5e364dbfc Added a script to create NewRevisionDocEvent entries for charter files.
- Legacy-Id: 4859
2012-09-19 19:50:37 +00:00
Ole Laursen 6062e16c2d Email IANA and RFC Editor when a draft is pulled from the queue at the
Datatracker, add page for editing IANA states, add more info to the
/doc/draft-XXXXX/doc.json dump for the RFC Editor, add page for
editing consensus, add page for requesting publication at the RFC
Editor for alternate streams (this will email the RFC Editor and set
the draft in the appropriate state), make it possible for alternate
streams to change the intended RFC status of a draft in the stream,
refactor how IANA copies are handled slightly so it's less code, put
drafts automatically in IANA Review "Need Review" state upon last
call, fix a bug in ballot issuing, remove a bit of dead code
 - Legacy-Id: 4857
2012-09-17 16:15:45 +00:00
Ole Laursen 85d2cdddc2 Add POST interface for IANA/RFC Editor for triggering updates, add
discrepancies report for seeing differences between the
Datatracker/RFC Editor/IANA, add tests of IANA/RFC Editor integration,
add script for weekly discrepancies emails
 - Legacy-Id: 4851
2012-09-17 15:57:48 +00:00
Ole Laursen 9fdcbc38ab Add time zone helpers for converting between local IETF db time and UTC
- Legacy-Id: 4849
2012-09-17 15:51:33 +00:00
Henrik Levkowetz 7467fa48a5 Tweaked the author extraction code to handle company names in the author list on the first page, when the company names contain a comma, such as for instance 'Foo Bar, Inc'.
- Legacy-Id: 4781
2012-08-22 12:52:32 +00:00
Henrik Levkowetz eb28ac8177 Removed the ValueError exceptions introduced in the previous revision of the draft author extraction code. Fixes issue #858.
- Legacy-Id: 4753
2012-08-06 15:16:53 +00:00
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
Henrik Levkowetz 0c49999fc9 Updated utils/draft.py and modified the submit app code accordingly.
New features (keep in mind that utils/draft.py can be run standalone
to do extraction of draft author data, too):

  * The handling of author info formatted in columns causes problems
    in the face of an author named for instance A. Author with the
    company 'Al Author and Associates', causing breakage of email
    addresses longer than 'Al Author and'.  Tweaked the recognition
    of column data to require multiple (not only one) space around
    'and'.

  * Added support for extraction of author affiliation.

  * Tweaked the meaning of -t, --timestamp and added --notimestamp; and
    made the default be to emit leading timestamps based ont the draft
    file time.

  * Added support for running author extraction on RFCs, by not bailing
    out on not finding a draft name when RFC information is available.

  * Added support for additional date formats and author name formats.

  * Improved creation date extraction -- previously, the first supported
    date format which was recognized on the first page of the draft would
    be used, rather than the first date in a supported format.  This could
    cause errors if the Status of Memo section or Abstract contained a
    date occurring at the start of a line.

  * Tweaked the honorific regex to make things work better for the case
    when the full name in the author's address section includes a first
    name which isn't part of the first-page abbreviated name.  Fixes
    problems with draft-chiappa-lisp-introduction and similar.

  * Added a special case for people who provide their email address as
    'foo&cisco.com' instead of 'foo@cisco.com'.  Bah.

  * Added an alternative, more human-readable key-value-pair attribute
    output mode with a '-a' switch.

  * Tweaded the first-name regex to capture cases where the first name
    is indicated with an alternate first letter: 'Y(J) Stein'.  Fixes
    problems with draft-anavi-tdmoip and similar.
 - Legacy-Id: 4612
2012-07-11 12:51:33 +00:00
Robert Sparks f3fd4db35c Merge forward complete - checkpointing before fixing popup position dialogs
- Legacy-Id: 4595
2012-07-04 19:35:46 +00:00
Ole Laursen 6050cbf76a Give test groups a list_email so we can email them
- Legacy-Id: 4592
2012-07-04 18:29:53 +00:00
Henrik Levkowetz 1bc2f7daa2 Tweak test setup message for site_id change.
- Legacy-Id: 4567
2012-07-03 13:42:36 +00:00
Henrik Levkowetz aa00b6e35d Remove old duplicate debug.py
- Legacy-Id: 4565
2012-07-03 11:31:30 +00:00
Henrik Levkowetz 350914da15 Minor cleanup of test_runner.py. Added guards against settings which can make tests inexplicably fail. Updated check to avoid running tests on production server.
- Legacy-Id: 4564
2012-07-03 11:31:11 +00:00
Ole Laursen b68bf9b0b8 Fix comment
- Legacy-Id: 4561
2012-07-02 18:10:41 +00:00
Ole Laursen 419f387bce Make find_history_active_at return the original object if it is
currently active, otherwise we can't see from the return value whether
a given time predates the history set. The downside is that the caller
may now need to check whether it got a history object or the same
object back.
 - Legacy-Id: 4560
2012-07-02 18:09:42 +00:00
Ole Laursen 488add5004 Add script and code (and tests) to send milestone reminders to ADs
(for reviews) and group chairs.
 - Legacy-Id: 4557
2012-06-30 16:46:31 +00:00
Ole Laursen 6c1e87b773 Move milestones branch out of the way to prepare for merge with trunk to get latest charter changes in
[[Split portion of a mixed commit.]]
 - Legacy-Id: 4514.1
2012-06-26 17:47:53 +00:00
Robert Sparks 51ab8123d9 merged in from 4.20-ise
- Legacy-Id: 4502
2012-06-22 20:25:17 +00:00
Henrik Levkowetz 839df60480 Merged in charter branch fixes from olau@iola.dk, from r4354 through r4381.
- Legacy-Id: 4382
2012-05-04 11:47:30 +00:00
Ole Laursen 3ec4dffd24 Check and sanitize text file upload (code is factored out in a new
helper so it can be reused elsewhere in the future).
 - Legacy-Id: 4380
2012-05-04 11:37:16 +00:00
Henrik Levkowetz bcd28cc45f Merged in fixes to the migration from olau@iola.dk. Merged in charter branch from olau@iola.dk. Added various fixes and correction of merge errors.
- Legacy-Id: 4353
2012-05-02 19:35:32 +00:00
Ole Laursen 8a8ddb0cc6 Add started_iesg_process event back in in test data as it's still
useful there
 - Legacy-Id: 4276
2012-04-16 13:57:18 +00:00
Ole Laursen e4a9d8c7aa Finish ballot support for charters (apart from non-generic ballot
deferral), remove a bunch of now obsolete charter code.
 - Legacy-Id: 4255
2012-04-04 18:09:03 +00:00
Ole Laursen 480cb04cd6 Save announcements generated by the system as Messages, adding an
extra relation to be able to associate a draft with the message
 - Legacy-Id: 3917
2012-02-08 21:05:28 +00:00
Ole Laursen 980d4e6444 Move new schema models from redesign/ to ietf/
- Legacy-Id: 3855
2012-01-24 17:17:24 +00:00
Ole Laursen f3685e7af1 Turn expiration into an explicit expires attribute on document, set
that on submission of new revision and resurrection
 - Legacy-Id: 3801
2012-01-12 12:03:45 +00:00
Ole Laursen 31aef86164 Merge charter branch with the UI hooks disabled for the time being
- Legacy-Id: 3800
2012-01-11 15:04:13 +00:00
Ole Laursen 9ae5f6a456 Make test runner multi-DB-aware
- Legacy-Id: 3786
2011-12-23 13:15:27 +00:00
Ole Laursen de0fc12ce8 Port telechat dates
- Legacy-Id: 3774
2011-12-20 13:12:12 +00:00
Ole Laursen 498dc38507 Port to Django 1.2, replacing built-in patched Django with Django 1.2.7 (with patches applied on top) and replacing South with South 0.7.3
- Legacy-Id: 3773
2011-12-15 14:13:54 +00:00
Ole Laursen 79ea179ff9 Comment out verbose mail server debug output for the time being
- Legacy-Id: 3719
2011-11-28 17:52:27 +00:00
Ole Laursen 03d1877802 Interpret settings.EMAIL_COPY_TO="" as "don't send a copy"
- Legacy-Id: 3717
2011-11-28 17:21:29 +00:00
Ole Laursen ea4e79cacb Fix empty_outbox to actually work as intended when outbox is imported elsewhere
- Legacy-Id: 3702
2011-11-24 16:36:19 +00:00
Ole Laursen 367d6b2116 Port recently merged stream delegate management in ietfworkflows to new schema
- Legacy-Id: 3687
2011-11-22 21:15:49 +00:00
Ole Laursen 5a4c23ea92 Merge with trunk
- Legacy-Id: 3676
2011-11-21 16:41:21 +00:00
Ole Laursen 5d291f222c Remove .state and .*_state on Document in favour of generic states
mapping, port the codebase to use these states
 - Legacy-Id: 3660
2011-11-16 18:18:06 +00:00
Ole Laursen ce74be89ef Use the test mode in the mail code when running automated tests instead of
reinventing the wheel in test_runner
 - Legacy-Id: 3620
2011-11-15 11:24:33 +00:00
Ole Laursen ea7f45d56e Port ietfworkflows and wgchairs to new schema, fix missing state
setting in I-D submission, add tests
 - Legacy-Id: 3617
2011-11-14 19:40:20 +00:00
Ole Laursen f7eefe8ee2 Finally get the mail system during automated test to send the real
message (i.e. pretend to do) instead of sending a copy, should make it
a bit easier to write tests
 - Legacy-Id: 3595
2011-11-08 11:48:57 +00:00
Henrik Levkowetz 5351319a9d Change the signatures of ietf.utils.mail functions using toUser to reflect that it's used as a boolean, not something else.
- Legacy-Id: 3522
2011-10-26 13:30:20 +00:00
Henrik Levkowetz f46f893de9 Don't try to output draft metadata (in standalone mode) for a file if the extraction failed.
- Legacy-Id: 3505
2011-10-25 13:58:55 +00:00
Henrik Levkowetz 43f1d5da93 Improved extraction of draft title during submission. Fixed a problem where the scan for an author's email address was prematurely terminated because another author's affiliation also was part of this author's address information.
- Legacy-Id: 3445
2011-10-13 14:36:26 +00:00
Ole Laursen 6f10d2f3f7 Port submit to new schema, adding a set of tests and fixing some bugs
- Legacy-Id: 3436
2011-09-21 19:29:50 +00:00
Ole Laursen 022bc51e23 Move unaccent helpers
- Legacy-Id: 3426
2011-09-16 11:32:33 +00:00
Ole Laursen 5c5d534104 Add person foreign key on Role to link the role and person directly instead of through Email, this will allow us to use non-personal emails on roles
- Legacy-Id: 3418
2011-09-14 14:01:17 +00:00
Henrik Levkowetz 7f8eea3b9d * Speeded up things and increased reliability by looking for a
recognizable author's address section, and not searching for
    author names earlier in the document if found.  Fixes a known
    bad case where the author name occurred in the middle of a draft.

  * Added handling for the case where an author name is followed by 
    parentheses which are not closed on the same line.

  * Some refactoring.
 - Legacy-Id: 3417
2011-09-14 12:31:48 +00:00
Ole Laursen 7f5fd62a3d Add simple test for ID submission, needs more extensive checking
- Legacy-Id: 3416
2011-09-05 17:14:47 +00:00
Ole Laursen 0769a07756 Port add delegate, add test, fix bug with first form in delegate
adding not checking whether found persons have a login
 - Legacy-Id: 3393
2011-08-29 14:08:27 +00:00
Ole Laursen 646e8b8615 Port WG Delegate deletion with new test
- Legacy-Id: 3383
2011-08-26 17:37:44 +00:00
Ole Laursen f11b558d00 Refactor slightly to get rid of clunky "ex-ad" role, any future uses
should use GroupHistory/RoleHistory instead
 - Legacy-Id: 3370
2011-08-24 20:49:30 +00:00
Ole Laursen b9e1753ef6 Port and proxy liaison views to new schema and add a bunch of tests
- Legacy-Id: 3350
2011-08-22 23:15:35 +00:00
Martin Qvist b73c5358e7 Added corrections and tests as discussed with Ole.
- Legacy-Id: 3349
2011-08-22 19:54:25 +00:00
Ole Laursen 2bf8e0a45d Move fixture generation for names to name app, add liaison edit test,
fix some liaison bugs
 - Legacy-Id: 3347
2011-08-22 12:37:56 +00:00
Ole Laursen e831dc3e89 Add generic find_history_active_at(obj, time), refactor to use it
- Legacy-Id: 3303
2011-08-12 09:41:50 +00:00
Ole Laursen 67e317d535 Merged in changes from conversion branch fixing a couple of problems
- Legacy-Id: 3285
2011-08-04 15:09:54 +00:00
Henrik Levkowetz 804e7cb795 Add some debug output utility functions.
- Legacy-Id: 3262
2011-07-27 16:33:50 +00:00
Ole Laursen af768fb633 Fix a bunch of merge bugs
- Legacy-Id: 3191
2011-06-29 13:05:11 +00:00
Ole Laursen 03bed41630 Merged in changes from the conversion branch
- Legacy-Id: 3187
2011-06-28 18:20:20 +00:00
Henrik Levkowetz 494b3c77fd Fix a problem with author extraction when a given name is the same as the surname.
- Legacy-Id: 3135
2011-05-23 21:42:34 +00:00
Henrik Levkowetz e904041ea9 Don't try to do string join on None, in case any address in an address list given to the mail sending routines is missing and represented by None.
- Legacy-Id: 3111
2011-05-10 12:13:40 +00:00
Henrik Levkowetz 101fe5f3dd When extracting meta-information from drafts, it is required that some data reside on the first page. Split unpaginated drafts into chunks so we can adhere better to this.
- Legacy-Id: 3083
2011-05-03 14:10:43 +00:00
Henrik Levkowetz 0ccff982bb Merged [2948] from bmheight@gmail.com:
Addresses issue #628, using reverse() and the newly created helper function 
reverse_lazy()  (found in ietf/utils/lazy.py) to DRY out the code a bit by 
decoupling the urls from being hardcoded.

With this commit idrfc, and ipr modules have been modified to take advantage 
of the reverse() and reverse_lazy() functions.
 - Legacy-Id: 2956
Note: SVN reference [2948] has been migrated to Git commit 9399a2e0e8bbfe5c5a16781fd784776cfa31fbac
2011-03-26 14:36:10 +00:00
Henrik Levkowetz fa16a7b0c1 Change ietf/utils/draft.py to provide an alternative method to get author
information: draft.get_author_info().  This method returns a list of
(full_name, first_name, middle_part, surname, suffix, email), with
middle_part, suffix and email set to None if none was found.
 - Legacy-Id: 2921
2011-03-24 13:25:14 +00:00
Henrik Levkowetz 79a283c3f6 Add the fix for email addresses from [2892].
- Legacy-Id: 2920
Note: SVN reference [2892] has been migrated to Git commit db905d3903
2011-03-24 13:09:01 +00:00
Henrik Levkowetz 0b8bcfa81d Fix a series of issues found during testing. This is the patch provide
to Yaco on 2011-03-19, and committed on branch/yaco/idsubmit as [2896].

   * Extraction of Title which don't have the draft name on a separate
     page fails.  See for instance this example:
     http://www.ietf.org/staging/draft-ma-cdni-publisher-use-cases-00.txt
     The regex should maybe be updated to permit but not require a newline
     before the draft filename:
     '(?:\n\s*\n\s*)((.+\n){1,2}(.+\n?))(\s+<?draft-\S+\s*\n)\s*\n'

   * If there are blank lines before the start of the author list on the
     first page, the author extraction will fail.  This sometimes happens
     when there's junk at the start of a draft, see for instance
     http://www.ietf.org/id/draft-ietf-mpls-tp-process-00.txt .

   * Sometimes the Authors' Addresses section lists authors with the same
     workplace address on the same line: "Sam Spade and Joe Smith".  This
     needs a fix in the author extraction code.

   * Sometimes the order of first name, surname is different on the first
     page and in the author list, and sometimes the surname is uppercase
     in one place, but not in the other.  This also needs a fix in the
     author extraction code.

   * The header stripping code had a bug, where multiple blank lines could
     be replaced by a single blank line in the stripped text, which could
     mess up title extraction.

   * Title space normalization should be done also for titles from the
     'unusual title format' code branch of the title extraction code.

   * Company names on the first page are sometimes rendered with different
     case than in the Authors' Addresses section.

   * Some drafts list the draft filename _before_ the title, rather than
     after the title.  Permit this too. Covered in the patch.

   * Spanish names can be shown as either
	<given_name> <fathers_first_surname> <mothers_first_surname>
     or less formally as
	<given_name> <fathers_first_surname>
     If the first form is used in the Authors' Addresses section, but the
     second form (with the given name possibly abbreviated to its first
     letter) the author extraction will fail.

   * Drafts containing tabs will be caught by idnits during I-D submission,
     but in case the drafts.py module is used independently from idnits,
     convert tabs to spaces in order for the author extraction and other
     methods to work as expected.  Example: recently submitted draft
     draft-bergeron-payload-rtpfec-rs-00.txt.

   * Found a draft with a previously unhandled header/footer format:
     draft-fang-mpls-tp-oam-toolset-01.txt.  Tweak needed for header/footer
      stripping.
 - Legacy-Id: 2919
Note: SVN reference [2896] has been migrated to Git commit 5a34b70e52
2011-03-24 13:05:48 +00:00
Henrik Levkowetz 61300a9354 Fix title extraction. Patch provided to yaco 2011-03-14, committed to yaco/idsubmit branch as [2887].
- Legacy-Id: 2918
Note: SVN reference [2887] has been migrated to Git commit fb7219c6ce
2011-03-24 12:58:33 +00:00
Henrik Levkowetz 9ae7b90b59 Merged in changes from Yaco @2880.
- Legacy-Id: 2917
2011-03-24 12:54:31 +00:00
Henrik Levkowetz 265b94c4ca Bugfix for faulty header/footer stripping, sent to Yaco 2011-03-02.
- Legacy-Id: 2916
2011-03-24 12:53:19 +00:00
Henrik Levkowetz 5ab9f020ec Merged in changes from Yaco @2855.
- Legacy-Id: 2915
2011-03-24 12:51:34 +00:00
Henrik Levkowetz 2f1426ed18 Copy ietf/utils/draft.py from the old idsubmit branch.
- Legacy-Id: 2914
2011-03-24 12:38:27 +00:00
Henrik Levkowetz 7e6134496b Remove the To/From/Subject headers from extra headers to prevent duplicate headers.
- Legacy-Id: 2812
2011-02-04 12:13:46 +00:00
Henrik Levkowetz 985dd2138f Provide a utility function admin_link() for use in admin list pages.
- Legacy-Id: 2795
2011-02-02 15:21:32 +00:00
Henrik Levkowetz ef26a18076 Don't try to send out mail which has no recipients.
- Legacy-Id: 2779
2011-02-01 10:24:54 +00:00
Henrik Levkowetz 9720c03038 Propagate all extra fields on to the final email sending function, not only the Cc and Bcc fields.
- Legacy-Id: 2765
2011-01-27 15:06:53 +00:00
Henrik Levkowetz e8de267a1d Merged [2644] from fenner@fenron.net:
Fill in the X-IETF-IDTracker header with the
I-D Tracker version number.  This fixes #513
 - Legacy-Id: 2647
Note: SVN reference [2644] has been migrated to Git commit 77a401f7eb3f06427d3cfae81ec71e4277d828cc
2010-11-08 09:11:37 +00:00
Henrik Levkowetz 5833428881 Merged [2639] from fenner@fenron.net:
Add regression tests (and accompanying test mode) for utils.mail.
Fixes #538
 - Legacy-Id: 2645
Note: SVN reference [2639] has been migrated to Git commit 14de6870df426f18afaf90af2c74a5009cca3c1f
2010-11-08 08:47:36 +00:00
Henrik Levkowetz 6d6d3aac51 Merged [2604] from rjsparks@nostrum.com: Added filename to the subject of Protocol Action and Document Action email messages.
Fixed a bug that was preventing CC/BCC from being honored. Fixes issue #528.
 - Legacy-Id: 2623
Note: SVN reference [2604] has been migrated to Git commit 4d27ae4d7a535fb7c9cb44dd0d486a0f5850b1b1
2010-11-06 08:44:42 +00:00
Henrik Levkowetz b652330f2a Utility function to execute external functions.
- Legacy-Id: 2606
2010-11-06 05:24:02 +00:00
Henrik Levkowetz eafcdccd3d Merged from log:branch/iesg-tracker@2571: IOLA's port of cron-scripts.
- Legacy-Id: 2578
2010-10-26 14:49:12 +00:00
Henrik Levkowetz 266b7820d0 Merged from log:branch/2.00@2363: Current release branch head to trunk.
- Legacy-Id: 2365
2010-07-21 12:48:05 +00:00
Henrik Levkowetz fa77ac30d5 Merged r840 from branch/2.00 to trunk, and updated version information in ietf/__init__.py
- Legacy-Id: 841
2007-07-04 21:17:57 +00:00
Henrik Levkowetz cd030d3b43 Adding copyright notices to all python files
- Legacy-Id: 716
2007-06-27 21:16:34 +00:00
Henrik Levkowetz 1a43ca5ebd Show number of review pages on overview page.
- Legacy-Id: 645
2007-06-25 23:20:56 +00:00
Henrik Levkowetz 410a69b914 Removing unused import from ietf/utils/views.py
- Legacy-Id: 620
2007-06-22 23:21:05 +00:00
Henrik Levkowetz 71429f59aa Alternative review pages which shouldn't shift when new test-URLs are added. Old review URLs still work, but withouth guarantee against shifting when new test-URLs are added.
- Legacy-Id: 600
2007-06-21 20:07:24 +00:00
Henrik Levkowetz 96b1f822ab Added an overview page for the review pages
- Legacy-Id: 529
2007-06-19 14:54:19 +00:00
Henrik Levkowetz 53f3be5ca0 It's better to test for retrieval of review pages than to just skip them.
- Legacy-Id: 527
2007-06-19 08:25:15 +00:00
Henrik Levkowetz bcc361359d Test urls for /review/
- Legacy-Id: 503
2007-06-18 19:30:58 +00:00
Henrik Levkowetz c03019afbe Adding a page review facility under the URL /review/. This is based on frames and takes the URLs in question from the testurl.list files.
- Legacy-Id: 487
2007-06-18 14:34:00 +00:00
Henrik Levkowetz de9a7ddbc4 Added the ability to give fill and pre(formatted) switches to the soup2text command
- Legacy-Id: 403
2007-06-15 13:28:12 +00:00
Henrik Levkowetz 754ba193ca A small script to run a diff against the master for one single django URL specified in any of the testurl.list files. Uses environment variable DJANGO_SERVER if set, or http://merlot.tools.ietf.org:31415/ otherwise.
- Legacy-Id: 375
2007-06-13 17:26:04 +00:00
Henrik Levkowetz e2db0d869d Compact spaces after \n conversion in soup2html.
- Legacy-Id: 351
2007-06-12 22:46:30 +00:00
Henrik Levkowetz aa68d30e85 Tweaking the paragraph filling code some more
- Legacy-Id: 346
2007-06-12 20:31:28 +00:00
Henrik Levkowetz 712cd8aa17 Tweak to again avoid space at the beginning of a paragraph.
- Legacy-Id: 345
2007-06-12 20:23:09 +00:00
Henrik Levkowetz 890b8a1ada Fix potential exception in soup2html again.
- Legacy-Id: 341
2007-06-12 18:34:26 +00:00
Henrik Levkowetz 6b7137994a Fix potential exception in soup2html.
- Legacy-Id: 340
2007-06-12 18:12:19 +00:00
Henrik Levkowetz dd37257c0c Only print the first 100 lines of a long diff. New soup2html code for spacing associated with certain tags.
- Legacy-Id: 337
2007-06-12 17:52:07 +00:00
Henrik Levkowetz aba06af322 Another soup2html() tweak to better avoid indentation at paragraph start.
- Legacy-Id: 330
2007-06-12 01:32:05 +00:00
Henrik Levkowetz 541b041cdc soup2html() tweak to better avoid indentation at paragraph start.
- Legacy-Id: 329
2007-06-12 00:55:41 +00:00
Henrik Levkowetz 67eb998901 soup2html() tweak to handle html comments.
- Legacy-Id: 328
2007-06-12 00:37:16 +00:00
Henrik Levkowetz b15c02c830 soup2html() tweak to handle table cells.
- Legacy-Id: 326
2007-06-12 00:25:45 +00:00
Henrik Levkowetz bfcb0e6c78 Two soup2text tweaks.
- Legacy-Id: 324
2007-06-11 23:52:51 +00:00
Henrik Levkowetz 1cafcf3e9d Changed approach to space normalization in soup2text(). Plain whitespace stripping followed by reassembly caused too large information loss. Accompanying changes in generic diff files.
- Legacy-Id: 321
2007-06-11 20:28:19 +00:00
Henrik Levkowetz 8e8c3ff5e2 * ietf/tests.py: Remove filetime() again -- not using it.
* ietf/utils/soup2text.py: Do line ending normalization.
 - Legacy-Id: 315
2007-06-11 17:26:59 +00:00
Henrik Levkowetz 7f512b4889 make soup2text convert numeric character codes (e.g., "&#39;") too.
- Legacy-Id: 306
2007-06-11 07:47:56 +00:00
Henrik Levkowetz 0452fca7d2 * ietf/tests.py, in reduce(): add ad-hoc fix for pathologic case of not
closing <li> tags.  BeautifulSoup can handle it, but the recursive text
   rendering code in soup2text recurses too deeply with a sufficiently long
   list...
 * ietf/tests.py, in setUp(): grab the right tuple element when extracting
   the URLs from the url test tuples
 * ietf/tests.py, in read_testurls(): close opened file
 * ietf/tests.py, in doUrlsTest(): narrower try/except clause, and a new one
 * soup2text.py, in para(): undo previous change
 - Legacy-Id: 304
2007-06-11 06:13:29 +00:00
Henrik Levkowetz b42e0728c8 Accept both testurl.list and testurls.list as test url list file names. Output status for good compares, too.
- Legacy-Id: 303
2007-06-11 04:43:22 +00:00
Henrik Levkowetz 9b78963547 Fix occasional bad sentence end merges in ietf/utils/soup2text.py.
Remove some now unneded exceptions from ietf/testurl.list
 - Legacy-Id: 302
2007-06-11 04:22:29 +00:00
Henrik Levkowetz a7a6d956af Adding a fix in soup2text for a common pathological case: <br><br> used instead
of <p /> to indicate paragraph breaks.

This changes the failed diff for /iesg/telechat/detail/354/ to show only three
differences, where two are whitespace differences and one shows a difference
between '@ietf.org. The' and '@ietf.org . The' and is an artifact of the text
extraction.  Will look at fixing that next.
 - Legacy-Id: 300
2007-06-11 03:36:08 +00:00
Henrik Levkowetz 7c60b321cd Add BeautifulSoup.py to the ietf/contrib/ directory so it doesn't have to be installed separately
- Legacy-Id: 289
2007-06-10 14:02:11 +00:00
Henrik Levkowetz 06eae09af4 Removing unused imports from ietf/tests.py. Using the right Exception type in soup2html.
- Legacy-Id: 283
2007-06-10 11:43:19 +00:00
Henrik Levkowetz 10ce0e07dd 'soup2text' is a html-to-text converter which uses the BeautifulSoup.py module. It converts html to plain paragraph-filled readable text.
- Legacy-Id: 277
2007-06-10 11:27:02 +00:00
Henrik Levkowetz 03c18bd33d Fixing a bunch of nits pyflakes were complaining about, in order to get a clean run. There are still at least 2 cases of using undefined values which needs scrutiny.
- Legacy-Id: 235
2007-06-05 16:58:58 +00:00
Henrik Levkowetz 5c9e46027b Try to make the utils/listop functions return something sensible with empty input.
- Legacy-Id: 233
2007-06-05 15:05:31 +00:00
Henrik Levkowetz 8ff20e3127 Expanded the test code which finds urlpatterns to extract all URLs
specified in the various Django apps of the site.  Also fixed the
documentation of the TemplatedForm factory to be more correct.
 - Legacy-Id: 227
2007-06-04 19:26:16 +00:00
Bill Fenner cae902a373 Add two middleware classes:
- SQLLogMiddleware.  This logs any INSERT or UPDATE performed by
a request.

- SMTPExceptionMiddleware.  This renders a "please try again"
(template email_failed.html) message when an attempt to send
email failed.  This uses a bit of a hack, in that the middleware
looks explicitly for smtplib.SMTPException, and smtplib can
raise other exceptions (particularly socket errors).  utils/mail/send_smtp
catches all exceptions and reraises non-smtplib exceptions as
fake smtplib exceptions, and the middleware undoes the wrapping.
 - Legacy-Id: 224
2007-06-04 13:52:34 +00:00
Bill Fenner 8628844700 Remove CRs from subject that comes from a template.
- Legacy-Id: 211
2007-06-01 20:40:02 +00:00
Bill Fenner 6072945ba4 Handle, log, and reraise an smtplib exception.
- Legacy-Id: 201
2007-06-01 02:10:26 +00:00
Henrik Levkowetz 4a289b821f Minor cleanup based on pyflakes feedback
- Legacy-Id: 188
2007-05-31 09:44:12 +00:00
Henrik Levkowetz 4aa8b5810a Separating out utility functions into their own files.
- Legacy-Id: 168
2007-05-28 09:17:30 +00:00
Bill Fenner edd08f3d10 Log sent mail.
Use the right template for the subject.
 - Legacy-Id: 164
2007-05-24 20:38:27 +00:00
Bill Fenner 78186c7406 Use the "standard" django way to get at the settings.
- Legacy-Id: 162
2007-05-24 17:36:25 +00:00
Bill Fenner 19d77b754a Add mail-sending module. It uses the django settings file for several
bits of configuration (e.g., mail server, any authentication required,
etc.)  It has different behavior based on the setting of the
SERVER_MODE setting:

 - 'development' or 'test': the message will be sent as an attachment
   to ietf.tracker.archive+SERVER_MODE@gmail.com; the actual destination
   supplied won't be used.

 - 'production': the message will be sent to the addressees and a
   copy sent to ietf.tracker.archive+production@gmail.com .

There are several functions to call, depending on what you want
to pass:

 - send_mail_text() takes a request, "To:" list, From header (or None
   to default), Subject text, Body text, an optional Cc: list, and
   an optional dict with extra headers.

 - send_mail() takes a template and a context instead of the body text,
   and renders the template with the given context.

 - send_mail_subj() takes a template for the subject as well as for the
   body.  It uses the same context to render both templates.
 - Legacy-Id: 159
2007-05-24 17:17:47 +00:00
Henrik Levkowetz 8d7053fc5c * Removed InternationalPhoneNumber class, instead using the form creation
callback to provide a RegexpField class.
 * Added checkbox for submitter contact information being the same as
   IETF contact information; with javascript support and validation
   support.
 * Cleaned out the old split_form() and mk_formatting_form() functions from
   ietf.utils.
 - Legacy-Id: 138
2007-05-18 15:50:30 +00:00
Henrik Levkowetz cf20093762 * Moved utility functions into utils/ directory, and started breaking out
utilities into separate files.
 * Added a log() function in ietf/utils.  It uses syslog, but adds some
   information about where it was called from.
 - Legacy-Id: 130
2007-05-11 15:48:45 +00:00