Commit graph

188 commits

Author SHA1 Message Date
Henrik Levkowetz 8e313e4ed5 Adjusted migrations for Python2/3 compatibility.
- Legacy-Id: 16633
2019-08-08 17:11:14 +00:00
Henrik Levkowetz 2b1dd0f3e8 Merged in [16590] from rjsparks@nostrum.com:
Example of using webtest. The full testcase was not converted because the add_rule form is modified in-flight by javascript when a control value is changed.
 - Legacy-Id: 16609
Note: SVN reference [16590] has been migrated to Git commit e89f200abc0d9af7609e4bff3592f87eddee1359
2019-08-01 15:09:51 +00:00
Henrik Levkowetz b873af1eac Merged in [16583] from rjsparks@nostrum.com:
Restore ability to remove documents while managing a personal list. Required updating code to match the recent change to Document's primary key. Fixes #2757.
 - Legacy-Id: 16608
Note: SVN reference [16583] has been migrated to Git commit 821609888a2c8a6db67867dd334103b034157d20
2019-08-01 14:27:00 +00:00
Henrik Levkowetz e03784132d Merged changes from current trunk to Py3 branch.
- Legacy-Id: 16468
2019-07-16 15:36:16 +00:00
Henrik Levkowetz bdc73e771a Python2/3 compatibility: replaced six.ensure_text() with either six.text_type or django's force_text(), depending on the case, and fixed a variable scope issue.
- Legacy-Id: 16461
2019-07-16 13:20:05 +00:00
Henrik Levkowetz 8c6eb3a30a Python2/3 compatibility: Changed the use of open() and StringIO to io.open() etc.
- Legacy-Id: 16458
2019-07-15 19:14:04 +00:00
Henrik Levkowetz ea8c84d2f6 Python2/3 compatibility: used @python_2_unicode_compatible to provide __unicode__() versions of __str__() methods.
- Legacy-Id: 16455
2019-07-15 18:01:26 +00:00
Henrik Levkowetz 2d7c9629aa Added 'from __future__' imports all over the place, to bring code behaviour into closer alignment between python2 and python3
- Legacy-Id: 16446
2019-07-15 15:40:51 +00:00
Henrik Levkowetz 0ef7e98e0a Corrected the content type for some JSON responses.
- Legacy-Id: 16409
2019-07-07 12:39:22 +00:00
Henrik Levkowetz 8f3c420a62 Fixed a typo and some pyflakes issues.
- Legacy-Id: 16388
2019-07-04 20:47:34 +00:00
Henrik Levkowetz 05f275a3af Changed instances of json.loads(r.content) to r.json(). Changed some instances of assert* to assertContains.
- Legacy-Id: 16338
2019-06-30 20:44:45 +00:00
Henrik Levkowetz 15e74e89cb Converted instances of assertTrue(text in response.content) to the recommended assertContains(response, text), and similar for assertFalse(... in ...)
- Legacy-Id: 16336
2019-06-29 13:43:31 +00:00
Henrik Levkowetz 484dcece5f Changed all model __unicode__() methods to __str__()
- Legacy-Id: 16330
2019-06-28 21:07:08 +00:00
Henrik Levkowetz 9decae5e7e Fixed changed object attributes for UUID objets.
- Legacy-Id: 16327
2019-06-28 20:49:03 +00:00
Henrik Levkowetz d7f5c84182 Initial 2to3 patch with added copyright statement updates.
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz f5f838ddf8 Added guards against duplicate m2m entries.
- Legacy-Id: 16304
2019-06-25 11:01:25 +00:00
Henrik Levkowetz db12f2b948 Fixed some name versus pk issues lingering after the Document/DocAlias primary key refactoring. Fixes issue #2729.
- Legacy-Id: 16288
2019-06-19 12:57:52 +00:00
Henrik Levkowetz 7270d5f67a Added the option to order API resource lists by primary key, for stable ordering when paging through a list.
- Legacy-Id: 16284
2019-06-18 12:40:19 +00:00
Henrik Levkowetz 1e76d9ce60 Fixed buggy guard code
- Legacy-Id: 16278
2019-06-17 18:22:02 +00:00
Henrik Levkowetz 814ac8fe24 Added a guard against duplicate insertions in SearchRule.name_contains_index
- Legacy-Id: 16276
2019-06-17 17:46:55 +00:00
Henrik Levkowetz 798b12c6ef Admin page tweaks: another raw_id field, added search fields
- Legacy-Id: 16272
2019-06-17 13:01:28 +00:00
Henrik Levkowetz c9a7571e0a Changed a field to use raw_id to avoid choice fields with 90000 entries
- Legacy-Id: 16271
2019-06-17 12:12:46 +00:00
Henrik Levkowetz 426870b766 Merged in the Document and DocAlias primary key change and m2m work in ^/personal/henrik/6.96.1-docalias.
- Legacy-Id: 16261
2019-06-15 12:00:48 +00:00
Henrik Levkowetz 815602351f This is a series of 50 migrations that changes the Document and DocAlias
primary keys from character strings to integers, and makes corresponding code
changes.

This was prompted by database limitations discovered when trying to make
DocAlias use a m2m document field; with 255 long strings as primary keys for
Document and DocAlias this violated the MySQL database limitations.

Changing the primary keys to integers should also improve efficiency.  

Due to the data migrations which create the new integer primary keys and adds
corresponding integer foreign keys matching the previous string foreign keys
in all tables having foreign keys to Document and DocAlias, some of these
migrations take a long time.  The total set of migrations are expected to have
a runtime on the order of 2 hours.
 - Legacy-Id: 16237
2019-06-10 11:32:46 +00:00
Henrik Levkowetz 3ec9d7b678 Updated the role handling to use GroupFeatures.groupman_roles consistently for group management access. Fixes a IRTF RG delegate permissions issue.
- Legacy-Id: 16160
2019-04-25 13:19:30 +00:00
Henrik Levkowetz 57a4c9f41f Added 9 new group features, and changed list-like char fields to json fields, to get better support for using the values as lists. Modified code to use the group features instead of explicit lists of group types in many places in the code.
- Legacy-Id: 15908
2019-01-22 18:11:46 +00:00
Henrik Levkowetz 7e13f2dc6a Added code to catch a possible attribute error on event notification.
- Legacy-Id: 15793
2018-11-30 20:48:01 +00:00
Robert Sparks ae70706faf Converted the community app tests to use factories. Commit ready for merge.
- Legacy-Id: 15314
2018-07-12 05:56:14 +00:00
Henrik Levkowetz 24a5eab0b4 Added a debug import.
- Legacy-Id: 14793
2018-03-14 17:41:49 +00:00
Henrik Levkowetz 1389775488 Added some missing migrations.
- Legacy-Id: 14696
2018-02-25 20:06:50 +00:00
Henrik Levkowetz 26bf387356 Replaced direct assignment to m2m fields with .clear() and .set()
- Legacy-Id: 14666
2018-02-21 23:58:25 +00:00
Henrik Levkowetz a4768bb514 Removed unused imports. Added some explicit orderings to avoid pagination issues.
- Legacy-Id: 14664
2018-02-21 23:54:31 +00:00
Henrik Levkowetz 06362ec046 Got rid of old migrations and created new initial migrations.
- Legacy-Id: 14662
2018-02-21 23:46:22 +00:00
Henrik Levkowetz 5638cf3da3 Changed all usage of ForeignKey and OneToOneFiled in model.py files to the compatibility versions from ietf.utils.models.
- Legacy-Id: 14661
2018-02-20 15:36:05 +00:00
Henrik Levkowetz 4dad8cdf9a Added a test to check for missing admin models, and added the admin models that were currently missing.
- Legacy-Id: 14021
2017-08-01 14:00:29 +00:00
Robert Sparks 2c92aa213d Treat Area Groups similar to Working Groups and Research Groups where it makes sense to do so. Commit ready for merge.
- Legacy-Id: 13832
2017-07-11 19:12:21 +00:00
Henrik Levkowetz 76628be3fd Merged in ^/branch/iola/author-stats-r13145 from olau@iola.dk, and fixed some tests in code which moved after the latest merge with trunk. The test suite passes, but the migrations are _not_ ready to run, because of numbering conflicts (again due to code changes on trunk since the latest sync).
- Legacy-Id: 13479
2017-05-31 20:59:26 +00:00
Henrik Levkowetz 6bdf6ffd9b Changed some tests to use unicontent(r) instead of r.content, which decodes non-ascii content according to the response charset.
- Legacy-Id: 13189
2017-04-10 22:25:43 +00:00
Ole Laursen 5b677dc6ba Merge author stats branch into new branch from trunk
- Legacy-Id: 13159
2017-03-28 14:36:40 +00:00
Lars Eggert 8a70e9773d Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00
Henrik Levkowetz aa5e61d958 Updated all urlpatterns to use ietf.utils.urls.url() instead of django's,
in order to autogenerate dotted path url pattern names.  Updated a number
of url reverses to use dotted path, and removed explicit url pattern names
as needed.

Changed some imports to prevent import of ietf.urls before django
initialization was complete.


Changed 3 cases of form classes being curried to functions; django 1.10
didn't accept that.

Started converting old-style middleware classes to new-style middleware
functions (incomplete).

Tweaked a nomcom decorator to preserve function names and attributes, like
a good decorator should.

Replaced the removed django templatetag 'removetags' with our own version
which uses bleach, and does sanitizing in addition to removing explicitly
mentionied html tags.

Rewrote the filename argument handling in a management command which had
broken with the upgrade.
 - Legacy-Id: 12818
2017-02-11 14:43:01 +00:00
Henrik Levkowetz 19d585255a Django 1.10 does not permit the view argument to url() to be a string any more. Changed all cases view arguments to url() which were strings to instead reference the actual imported function.
- Legacy-Id: 12815
2017-02-10 14:49:16 +00:00
Henrik Levkowetz 40e8380751 Merged django 1.9 work forward to copy of trunk @6.41.0
- Legacy-Id: 12756
2017-01-30 23:13:02 +00:00
Ole Laursen 9308948195 Add person, affiliation and country (through django-countries) to
DocumentAuthor, rename author field to email and make it optional (for
modeling old email-less submissions), remove the authors many to many
referencing field from Document as it is not really pointing the right
place.

Update the Secretariat tools to show affiliation and country.

Add migration for getting rid of the fake email addresses that the
migration script created some years ago (just set the author email
field to null).
 - Legacy-Id: 12739
2017-01-26 17:10:08 +00:00
Robert Sparks e0ea8b0f57 Added programs to the datatracker. Added use of restructuredtext for group about pages. Generalized several places where code handles different group types. Improved testing of group about. Commit ready for merge.
- Legacy-Id: 12722
2017-01-24 19:55:49 +00:00
Henrik Levkowetz c2541ec04b Django 1.9: Removed deprecated use of django.conf.urls.patterns() from all urls*.py files.
- Legacy-Id: 12618
2016-12-22 17:21:57 +00:00
Ole Laursen 958ba5ba95 Make new branch from trunk and merge in review-tracker-r11921
- Legacy-Id: 12129
2016-10-13 16:38:47 +00:00
Henrik Levkowetz e31bdff708 Apply string operations on the string, not on the Email object.
- Legacy-Id: 12092
2016-10-05 17:51:22 +00:00
Henrik Levkowetz c20357b75d Fixed a place where email addresses not all lowercase could slip in, which can mess up reverse table relationships.
- Legacy-Id: 12088
2016-10-05 15:16:03 +00:00
Ole Laursen 4c7b2847ba Add a utility function for extracting information about review
requests for a given set of teams/reviewers (making it trivial to
compute statistics), revamp the related doc event code to support this
by referencing the review request directly, add a reviewer overview
page with recent performance for each reviewer as well as
settings/unavailable periods. Fix some bugs and shuffle some of the
review code a bit around.

Finish the importer from the previous Perl-based review tool,
importing log entries, figuring out whether a given review is
early/telechat/last call and fixing corner cases.
 - Legacy-Id: 12080
2016-10-03 15:52:32 +00:00
Henrik Levkowetz 7f772641d4 Change the cache key construction to deal with query arguments containing spaces. Fixes 500 errors which would otherwise occur.
- Legacy-Id: 12035
2016-09-25 13:53:22 +00:00
Henrik Levkowetz 4f9db3020a Removed an unused import.
- Legacy-Id: 11735
2016-07-21 20:04:30 +00:00
Ole Laursen 9ad8c983a2 Speed up the community refactor migration by building the index
of the group name search rules in Python
 - Legacy-Id: 11188
2016-05-13 13:30:37 +00:00
Ole Laursen 12079a5612 Add SearchRule.__unicode__ for debugging purposes
- Legacy-Id: 11187
2016-05-13 13:22:53 +00:00
Ole Laursen 5f4c989ba6 Set notify_on correctly in community refactor migration
- Legacy-Id: 11186
2016-05-13 12:25:59 +00:00
Henrik Levkowetz 9ceb753a29 Added progress bars and rule counts for various parts of this migration.
- Legacy-Id: 11183
2016-05-12 20:16:23 +00:00
Henrik Levkowetz deb2f73047 Merged in ^/branch/iola/community-list-cleanup-r11172@11175.
- Legacy-Id: 11182
2016-05-12 19:14:28 +00:00
Ole Laursen b6d4c5ffe8 Drop naming community URL patterns, just reverse them directly from
the view
 - Legacy-Id: 11175
2016-05-06 18:10:37 +00:00
Ole Laursen c061caaf04 Merge in changes from community-list-cleanup
- Legacy-Id: 10968
2016-03-23 13:31:24 +00:00
Ole Laursen c7589f9b6a Integrate community lists for groups with the existing group documents
page. Each WG/RG now gets a list with an initial set of rules to
populate the list.

Refine the community list management interface a bit to support the
group lists better - group lists aren't connected to the usual track
icons so need to be able to add/remove individual drafts.

Change the "name contains" rule to support regular expressions to
enable each group to have a default replacement for the previously
implemented "related documents" search. Maintain a materialized view
of the regexp-matched drafts with a call in the submit code to avoid
having to scan all drafts/~1000 group rules all the time.
 - Legacy-Id: 10963
2016-03-22 12:48:44 +00:00
Ole Laursen cdcad43fc0 Simplify community lists further by letting email subscriptions reuse
the existing infrastructure for accounts and emails, instead of a
having a separate confirmation step
 - Legacy-Id: 10951
2016-03-17 12:02:45 +00:00
Henrik Levkowetz 6e6a8baa13 Fixed a typo.
- Legacy-Id: 10931
2016-03-15 23:15:44 +00:00
Henrik Levkowetz adb8625635 Introduced caching for the api resources.
- Legacy-Id: 10929
2016-03-15 23:12:04 +00:00
Ole Laursen 5f4082d595 Overhaul of the community list code.
From a user perspective: Use friendlier URLs for lists. Reuse the
search results table for displaying lists. Simplify the management
pages and improve the search rule UI to help fill in the values and
validating them, instead of just providing a text field. Fixes #1874.
Add an explicit button for adding individual documents. Include all
changes in the document change streams, not just some changes. Fix a
concurrency issue that allows changed documents to escape the search
rules. Don't create an empty list just be logging in.

From a code maintenance perspective: Clean up the models. Replace the
background caching scheme with direct queries. Get rid of a big chunk
of code. Speed up the code that adds track buttons to search results.
Add tests of all community views. Fixes #1422. Also fix some minor
bugs and oddities here and there.

There's still some work to do with respect to integrating the group
lists better.
 - Legacy-Id: 10921
2016-03-14 10:44:57 +00:00
Henrik Levkowetz 846a02c3f9 Fixed pyflakes complaints introduced with pyflakes 1.1.0
- Legacy-Id: 10896
2016-03-04 21:24:26 +00:00
Ole Laursen b7232d0ab7 Revamp tracked/not tracked icons in search results to not do one query
per document, and make them work on all search result pages, move the
utility function to community/
 - Legacy-Id: 10690
2016-01-14 18:04:05 +00:00
Ole Laursen 22e2a6a2b8 Delete the DocumentChangeDates model from CommunityList, it's being
used as a cache, but won't be necessary once the display code is
rewritten since it will be able to calculate the data on the fly
 - Legacy-Id: 10682
2016-01-13 18:11:03 +00:00
Ole Laursen 1b8e9eb7e4 Get rid of ExpectedChange model in community lists, it's not used
- Legacy-Id: 10681
2016-01-13 17:43:05 +00:00
Ole Laursen cd5c60ccf1 Clean up permission checking in community lists, fix split in
track/untrack between personal/group lists, get rid of remove_document
 - Legacy-Id: 10680
2016-01-13 17:37:22 +00:00
Ole Laursen 4696dad536 Delete some unused code
- Legacy-Id: 10669
2016-01-13 10:53:28 +00:00
Ole Laursen 1e75ee3d11 Do not create CommunityLists when rendering the side bar, only render
the links
 - Legacy-Id: 10668
2016-01-13 10:47:36 +00:00
Ole Laursen e807115e81 Fix community list track/untrack to use POST rather than GET
- Legacy-Id: 10660
2016-01-13 10:15:38 +00:00
Henrik Levkowetz 9bf1ff01f1 Merged in [10621] from lars@netapp.com:
Use js tablesort almost everywhere I thought it would make sense. While I
touched the pages, I also corrected a few minor HTML nits, capitalization
inconsistencies and some other minor things.
Range r10605:r10621
 - Legacy-Id: 10647
Note: SVN reference [10621] has been migrated to Git commit 7d3c2681e2
2016-01-12 16:47:18 +00:00
Henrik Levkowetz 2fe8dcb4c2 Added a very simple html version of the json API, to make it easier to explore the api manually.
- Legacy-Id: 9991
2015-08-09 16:28:55 +00:00
Henrik Levkowetz acc2c59920 Updated a bunch of links from http: to https: based on a patch from lars@netapp.com.
- Legacy-Id: 9556
2015-04-24 21:47:12 +00:00
Robert Sparks d1d731838f Don't show concluded groups in the community list section of the navbar. Fixes bug #1652. Commit ready for merge.
- Legacy-Id: 9513
2015-04-15 20:03:09 +00:00
Henrik Levkowetz 3740c036c2 Fixed a merge error in community_tags.
- Legacy-Id: 9364
2015-04-02 19:52:04 +00:00
Henrik Levkowetz 625347cd2f Merged trunk@9354 to facelift copy
- Legacy-Id: 9357
2015-04-02 06:51:34 +00:00
Henrik Levkowetz 66bbc97679 Normalized the new filter expression to limit the wg state in the wg selection in community_tags.py
- Legacy-Id: 9320
2015-03-22 14:53:16 +00:00
Tim Wicinski 817547cc91 Fixed #845. Commit read for merge.
- Legacy-Id: 9309
2015-03-21 20:46:17 +00:00
Henrik Levkowetz c7c89a6250 Fixed a small issue with the filter expression to select ADs for active groups.
- Legacy-Id: 9181
2015-03-11 12:05:20 +00:00
Ole Laursen a225fd5069 Make new branch from trunk and merge facelift-r9007 into it, fixing a few merge conflicts
- Legacy-Id: 9072
2015-02-12 10:43:52 +00:00
Henrik Levkowetz 7ecfac6308 Merged in personal/henrik/django-1.7@9020 which upgrades Django from 1.6.0 to 1.7.4 and applies the needed changes to the datatracker code to work with release 1.7.x.
- Legacy-Id: 9028
2015-02-08 21:16:44 +00:00
Henrik Levkowetz 028b7e315a Reverted to [9025] because commit [9026] failed (it was incomplete with a broken working dir).
- Legacy-Id: 9027
Note: SVN reference [9026] has been migrated to Git commit 4a3749a66b
2015-02-08 20:03:16 +00:00
Henrik Levkowetz 4a3749a66b Merged in personal/henrik/django-1.7@9020 which upgrades Django from 1.6.0 to 1.7.4 and applies the needed changes to the datatracker code to work with release 1.7.x.
- Legacy-Id: 9026
2015-02-08 19:16:46 +00:00
Henrik Levkowetz 342b2d3cb5 Removed the unnecessary get_and_create() of community.model.DisplayConfiguration on community page GET.
- Legacy-Id: 9010
2015-02-06 11:27:50 +00:00
Ole Laursen e78637b9fc Remove non-facelift static assets, and move the facelift assets one step up
- Legacy-Id: 8971
2015-02-04 17:03:43 +00:00
Ole Laursen 12faa4a2f8 Summary: Rewrite community tags to use the much simpler built-in tag parser
- Legacy-Id: 8968
2015-02-04 14:27:49 +00:00
Ole Laursen d0999c8b5e Merge facelift-r8510 branch with trunk. The IPR tool still has some non-facelifted parts and ideosyncracies. Fix a couple of minor bugs (including infamous empty licensing choice) in the IPR code, and port the IPR views to use the render shortcut.
- Legacy-Id: 8896
2015-01-22 17:38:05 +00:00
Henrik Levkowetz 25eb00c925 New django-1.7 initial migrations. Circular references exist, requiring explicit --fake migration for doc, dbtemplate and community apps.
- Legacy-Id: 8823
2014-12-22 17:07:38 +00:00
Henrik Levkowetz dd15785936 Removing south migrations as part of the django 1.7 changeover to builtin migrations.
- Legacy-Id: 8820
2014-12-22 16:44:35 +00:00
Henrik Levkowetz 770b36d575 Added generated (and sometimes manually tweaked) resources.py files.
- Legacy-Id: 8744
2014-12-14 20:33:25 +00:00
Ole Laursen 41cb195f52 Rebase /personal/lars/5.6.4-facelift/ on trunk
- Legacy-Id: 8520
2014-10-30 14:31:07 +00:00
Lars Eggert a4daf2630c Merge branch 'lars/5.6.3-facelift' into lars/5.6.4-facelift
Conflicts:
	ietf/doc/templatetags/ietf_filters.py
	ietf/doc/views_charter.py
	ietf/templates/doc/charter/edit_notify.html
	ietf/templates/doc/charter/edit_telechat_date.html
	ietf/templates/doc/document_ballot_content.html
	ietf/templates/doc/document_history.html
	ietf/templates/doc/edit_notify.html
	ietf/templates/doc/edit_telechat_date.html
	ietf/templates/doc/notify.html
	ietf/templates/group/concluded_groups.html
 - Legacy-Id: 8429
2014-10-14 11:48:57 +00:00
Ole Laursen f291a466d7 Change Document.shepherd to point to the email address rather than the
person, add migration to fix the existing shepherds, fix wording and
max entries on change shepherd page to be more self-explanatory
 - Legacy-Id: 8268
2014-08-13 11:40:01 +00:00
Shane Kerr 4d71417817 Untrack this document button added to draft document view.
- Legacy-Id: 8130
2014-07-19 19:44:30 +00:00
Henrik Levkowetz 09f654b1f4 Merged in branch/iola/team-support from olau@iola.dk. This generalises and extends the group support for WGs and RGs so that also other groups, such as for instance the Edu Team, can have pages.
- Legacy-Id: 8013
2014-07-02 19:30:07 +00:00
Robert Sparks 52936f21d1 Only turns WG and RG groups into links. Fixes bug #1421. Will apply to production as a patch. Commit ready for merge.
- Legacy-Id: 7888
2014-06-11 19:44:43 +00:00
Ole Laursen 0144ef366b Add description field on group, enable most group info page views to
work without a group type to pave the way for /group/<acronym>/ URLs,
make charter page more generic, enable it to handle descriptions and
walk over all personnel instead of picking out specific types
of roles, add a redirect view on /group/<acronym>/ to lead to either
documents/ or charter/, add simple group.features() class to be able
to condition on group features rather than specific group types,
adjust group pages menu accordingly
 - Legacy-Id: 7758
2014-05-20 10:19:26 +00:00
Ole Laursen ad357e0068 Parameterize the <wg> in /wg/<acronym> to allow for RGs, add simple /rg/ overview page based on similar /wg/ overview page, fix links and other WG/RG-specific details. All the basic pages under /rg/ now appear to be working for RGs. Edit pages and permissions are not adapted yet, though.
- Legacy-Id: 7535
2014-03-22 13:11:23 +00:00