Commit graph

1179 commits

Author SHA1 Message Date
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