Commit graph

134 commits

Author SHA1 Message Date
Henrik Levkowetz b9b36dc124 Tweaked the meetecho access API fallback response to use person.plain_name instead of person.name.
- Legacy-Id: 17913
2020-06-06 20:13:54 +00:00
Henrik Levkowetz 950f1822bc Refined the makeresources management command slightly to improve handling of models with names ending in 'Resource' -- tastypie requires the resource name to be explicitly set in that case.
- Legacy-Id: 17858
2020-05-20 19:38:44 +00:00
Henrik Levkowetz 0bc19f0c7c Added group chair/secretary role information to the personal meetecho key API.
- Legacy-Id: 17806
2020-05-16 15:58:40 +00:00
Henrik Levkowetz eedd48d455 Simplified the URL and view code for the personal meetecho access API endpoint, and added test code.
- Legacy-Id: 17642
2020-04-15 17:19:54 +00:00
Henrik Levkowetz e01cc95f15 Tweaked some comments
- Legacy-Id: 17632
2020-04-15 12:02:28 +00:00
Henrik Levkowetz 0db30f3ca8 Updated the API v2 JsonExporMixin to not try to use an API key argument as a queryset argument when building the json response.
- Legacy-Id: 17631
2020-04-15 12:01:52 +00:00
Henrik Levkowetz bd934d0f2d Added a personal API key for meetecho access.
- Legacy-Id: 17630
2020-04-15 11:58:52 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz ab173cb2eb Removed further six usage: six.string_types, six.integer_types, six.moves.urllib instances.
- Legacy-Id: 17390
2020-03-05 20:46:58 +00:00
Henrik Levkowetz e9a37d8ac8 Removed six.text_type(), changed six.moves.urllib to plain urllib, and removed now unused six imports.
- Legacy-Id: 17385
2020-03-05 14:41:41 +00:00
Ole Laursen 3957743b85 Move Session.status, .requested, and .requested_by to a new SchedulingEvent
- Legacy-Id: 17122
2019-12-05 12:41:09 +00:00
Henrik Levkowetz 92a84117b4 Added a type hint stub file for ietf/api/__init__.py, to capture variables created during module initialization.
- Legacy-Id: 16804
2019-10-01 20:29:02 +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 a5e31c3f40 Py2/3 compatibility: Added __future__ import.
- Legacy-Id: 16452
2019-07-15 15:52:18 +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 71ea5ae379 Updated the file header generated by the makeresources managment command to set Copyright and file encoding, and use io.open() for py2/3 compatibility.
- Legacy-Id: 16441
2019-07-15 14:35:25 +00:00
Henrik Levkowetz f481f5c3e6 Replaced use of six with the equivalent pure python3 constructs.
- Legacy-Id: 16428
2019-07-08 10:43:47 +00:00
Henrik Levkowetz 0679eaa8d4 Removed unused imports.
- Legacy-Id: 16402
2019-07-04 21:06:57 +00:00
Henrik Levkowetz f480799af9 Undid unintentional bulk commit
- Legacy-Id: 16401
2019-07-04 21:04:46 +00:00
Henrik Levkowetz fc09a59950 Added decode() of command pipe output.
- Legacy-Id: 16400
2019-07-04 21:01:39 +00:00
Henrik Levkowetz b7690fbdcd Changed additional regexes to r strings.
- Legacy-Id: 16377
2019-07-04 15:54:23 +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 92350834c7 Give hashlib.md5() bytes instead of str.
- Legacy-Id: 16325
2019-06-28 20:20:18 +00:00
Henrik Levkowetz e39ac52071 Removed 2to3-generated list() around .items() iterator in for loops.
- Legacy-Id: 16315
2019-06-27 18:11:17 +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 b8e92d31da Added generation of Meta.ordering for API ModelResources in mkresources.
- Legacy-Id: 16283
2019-06-18 12:32:28 +00:00
Henrik Levkowetz 004d1d3aa8 Removed a debug statement.
- Legacy-Id: 15545
2018-10-09 13:51:54 +00:00
Henrik Levkowetz 8c985fe440 Turned the nomcom chair dropdown menu item 'Classify pending feedback' into a tab with a mail count badge.
- Legacy-Id: 15544
2018-10-08 15:11:21 +00:00
Henrik Levkowetz 8f2ba33059 Merged in [15263], [15264], [15265], [15287] from rcross@amsl.com:
Added new custom API endpoints for export of person data, restricted
    to secretariat use.  Added a test for the new custom API.
 - Legacy-Id: 15543
Note: SVN reference [15263] has been migrated to Git commit 8e7e0faf529db057ac4f7496d0bc84fb05f0625d

Note: SVN reference [15264] has been migrated to Git commit e6549635650d4d9f9a9de7c5b4711f5a4a25c42c

Note: SVN reference [15265] has been migrated to Git commit 7c0e97f824b874763550adf1647841129017bf5a

Note: SVN reference [15287] has been migrated to Git commit 7431bdfcd9f2213c812a9004162ca576ae230a94
2018-10-08 14:23:51 +00:00
Henrik Levkowetz fcbbe08eba Removed video url import from youtube, which is not needed any more given the /api/meeting/session/video/url API endpoint. This also prevents duplicate video URLs.
- Legacy-Id: 15424
2018-08-10 12:54:27 +00:00
Henrik Levkowetz 65fc1f8e0f Added additional checks to the meeting_session_video_url api test.
- Legacy-Id: 15377
2018-07-17 22:14:54 +00:00
Henrik Levkowetz 21f38a364e Replaced the use of a deprecated Django field attribute with the sanctioned replacement.
- Legacy-Id: 15315
2018-07-12 10:19:00 +00:00
Henrik Levkowetz 816f5de566 Added a missing related object to the person information export. Related to issue #2501.
- Legacy-Id: 15208
2018-06-04 14:27:43 +00:00
Henrik Levkowetz a62e9964a5 Added a recursive object to JSON serializer and a view which will let any logged-in user download a JSON serialized copy of the datatracker information related to his person record. Added information about this, and a link, to the account page. Related to issue #2501.
- Legacy-Id: 15206
2018-06-04 13:06:47 +00:00
Henrik Levkowetz a9fbea113b Changed incorrect use of 404 status code in api to 400. Fixes issue #2498.
- Legacy-Id: 15044
2018-04-13 11:11:48 +00:00
Henrik Levkowetz 33e7be35e3 Added more information about personal API keys to the API help page.
- Legacy-Id: 15031
2018-04-08 13:24:14 +00:00
Henrik Levkowetz 189cb2a2f9 Added another check to test_api_set_session_video_url()
- Legacy-Id: 14974
2018-03-30 18:21:57 +00:00
Henrik Levkowetz a1c79a075d Merged in ^/personal/henrik/6.76.1-meetecho-api/ which provides new API endpoint to let video urls be associated with sessions. Also added some more checks to the test_api_set_session_video_url() test.
- Legacy-Id: 14969
2018-03-29 15:25:36 +00:00
Henrik Levkowetz e8f999dc07 Added an API endpoint to let Meetech associate recording urls with sessions.
- Legacy-Id: 14967
2018-03-29 11:04:47 +00:00
Henrik Levkowetz 36b5e2ef8e Changed name from .rel to .remote_field for remote accessors.
- Legacy-Id: 14665
2018-02-21 23:56:36 +00:00
Henrik Levkowetz 6567e707ce Merged in ^/personal/henrik/6.64.2-ballotapi@14426. This provides personal API keys and a ballot position API at /api/iesg/position. Also added an endpoint description at /api/.
- Legacy-Id: 14430
2017-12-17 23:43:44 +00:00
Henrik Levkowetz e7209c6e50 Added a new personal event table to keep track of personal API key logins, and a management command to send out reports about activity to users with API keys. Added a weekly cronjob script to trigger weekly reports, and a monthly script for future use. Added a @require_api_key decorator to validate API keys for API key views and log in the API key owner. Modified the API key management urls to use create and disable rather than add and delete. Updated the API key list view. Added an API placeholder view function for ballot position setting, for test purposes. Added tests for the decorator and management command.
- Legacy-Id: 14426
2017-12-16 18:37:52 +00:00
Henrik Levkowetz 77d5f1c155 Added a test for the new API help page.
- Legacy-Id: 14299
2017-11-03 20:01:14 +00:00
Henrik Levkowetz 526003fd26 Added a brief REST API info page. In preparation for signing http notifications using RFC 7515, added information about API signing public/private keypair. Refactored api views to reside in api/views.py. Added jwcrypto to requirements.
- Legacy-Id: 14294
2017-11-03 16:17:00 +00:00
Henrik Levkowetz 3af2554b2f Added an API for draft submission, at /api/submit. Added an urls.py file under api/ to hold api urls, and moved those from ietf/urls.py. Refactored out many parts of the regular submission forms and functions in submit/forms.py and submit/views.py in order to re-use the appropriate parts for the submission API. Moved support functions to submit/utils.py. Added a new validation errors for missing docName in xml-based submissions. Updated the submission test document templates to use insert additional values. Added failure and success test cases for automated API submissions, and refactored some test utility functions.
- Legacy-Id: 14125
2017-09-16 09:35:42 +00:00
Henrik Levkowetz 27bf51cbb9 Removed some test code which isn't useful with tastypie 0.14.0
- Legacy-Id: 13768
2017-07-03 21:20:36 +00:00
Henrik Levkowetz e9b82e3425 Tastypie 0.14.0 does not support the callback parameter as earlier; disable the tests for this as we don't use it anyway.
- Legacy-Id: 13764
2017-07-03 17:38:33 +00:00
Henrik Levkowetz 023a32715d Merged in ^/branch/iola/author-stats-r13145 from olau@iola.com, with additional features from ^/personal/henrik/6.52.1-authorstats.
- Legacy-Id: 13550
2017-06-06 18:36:59 +00:00
Henrik Levkowetz d3decdcb61 Merged in [13485] from rcross@amsl.com:
Add import of YouTube session videos using YouTube Data API.  Fixes #2249.
 - Legacy-Id: 13509
Note: SVN reference [13485] has been migrated to Git commit 7ee2a16967
2017-06-03 23:58:05 +00:00
Ryan Cross 7ee2a16967 Add import of YouTube session videos using YouTube Data API. Fixes #2249. Commit ready for merge.
- Legacy-Id: 13485
2017-06-01 18:36:46 +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 9635e5e3e4 Fixed some pyflakes issues.
- Legacy-Id: 13313
2017-05-11 09:57:58 +00:00
Henrik Levkowetz c36e773a9d More fixes for the makeresources management command
- Legacy-Id: 13310
2017-05-11 05:06:41 +00:00
Henrik Levkowetz 405f76f238 Updated the makeresources command to use the current AppCommand.handle_app_config() interface.
- Legacy-Id: 13306
2017-05-10 20:08:40 +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
Henrik Levkowetz 69c9d25022 Merged in [13125] from rcross@amsl.com:
Add REST API endpoint to notify Datatracker that new recording files are available.
 - Legacy-Id: 13158
Note: SVN reference [13125] has been migrated to Git commit a50b09b152
2017-03-27 21:51:55 +00:00
Henrik Levkowetz 6110b15de1 Modified an API test to make it pickleable (for parallel test runs).
- Legacy-Id: 13156
2017-03-27 21:28:39 +00:00
Ryan Cross a50b09b152 Add REST API endpoint to notify Datatracker that new recording files are available. Commit ready for merge.
- Legacy-Id: 13125
2017-03-25 21:52:11 +00:00
Lars Eggert 8a70e9773d Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
- Legacy-Id: 13112
2017-03-25 19:16:45 +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
Henrik Levkowetz 7b95411f58 The context_instance parameter to render_to_response() and render_to_string() is now deprecated. Fixed this, and generally changed the idiom render_to_response('template.html', {}, RequestContext(request)) to the newer and simpler render(request, 'template.html', {}). About 200 instances.
- Legacy-Id: 12637
2017-01-09 21:26:30 +00:00
Henrik Levkowetz 8e9858379b Fixed some pyflakes and form initialization issues with the upgrade to DurationField.
- Legacy-Id: 12599
2016-12-21 17:03:39 +00:00
Henrik Levkowetz cc333d9430 Changed method of retrieving an app's models. Also now importing import_module from importlib instead of from django.
- Legacy-Id: 12531
2016-12-15 13:17:07 +00:00
Henrik Levkowetz 8e56935cfd Undid commit 12527, which contained much too much.
- Legacy-Id: 12528
2016-12-15 10:38:54 +00:00
Henrik Levkowetz e3c6e0ac6b Changed the state shown in all_id.txt for drafts which have entered IESG processing, but then been replaced, to show as 'Replaced' instead of 'In IESG Processing'. This is consistent with how they are shown in all_id2.txt.
- Legacy-Id: 12527
2016-12-15 10:36:15 +00:00
Henrik Levkowetz b628a0844b Changed to using TestCase from ietf.utils in some places, for consistent test-suite failure output.
- Legacy-Id: 12467
2016-12-07 11:03:32 +00:00
Henrik Levkowetz b914f46313 Merged in ^/branch/iola/review-tracker-r12128@12397, bringing in the review tool functionality described in RFC7735. This adds the ability to set up review management pages for review teams such as genart, secdir, opsdir, etc.; letting the review team secretaries manage requested and completed reviews; letting the reviewers keep track of and document their reviews, and more. See the RFC for full specification, and the branch commit log for a full commit history.
- Legacy-Id: 12419
2016-11-29 14:54:19 +00:00
Henrik Levkowetz 5b6ffbcbd5 Fixed a bug in the API cache key construction which could make the key longer than necessary.
- Legacy-Id: 12196
2016-10-21 14:27:18 +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 c11f3b5ee7 Make pyflakes happier sorting out tastypie.resources.ModelResource.
- Legacy-Id: 12037
2016-09-26 10:33:22 +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
Ole Laursen 7146e88067 Remove another bit of debug code
- Legacy-Id: 11926
2016-09-06 10:25:34 +00:00
Ole Laursen 74a02be9bf Create new branch from trunk@r11921, and merge review-tracker-r11360 into it
- Legacy-Id: 11923
2016-09-06 10:17:12 +00:00
Henrik Levkowetz 15ef1af9c5 Added object pk to the cache key. Fixes issue #1929.
- Legacy-Id: 10956
2016-03-20 16:38:40 +00:00
Henrik Levkowetz 62cae36acd Subclassed tastypie's ToOneField in order to provide caching for FK entries.
- Legacy-Id: 10927
2016-03-15 23:08:35 +00:00
Henrik Levkowetz 2c2ac888d0 Updated the API tests to avoid deprecation warnings from a new version of Tastypie (0.13.1).
- Legacy-Id: 10796
2016-02-07 15:33:40 +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 550f69cc37 Merged in [9305] from willem@nlnetlabs.nl:
Callback API test code paths
 - Legacy-Id: 9315
Note: SVN reference [9305] has been migrated to Git commit 65c052a2f7
2015-03-21 22:27:41 +00:00
Henrik Levkowetz 0d4bceb977 Fixed a typo in maketestresources.py
- Legacy-Id: 9314
2015-03-21 22:00:08 +00:00
Willem Toorop 20123641bf Pyflakes ignore iderectly used variables
They are (potentionally) used in a compile statement where their usage is invisible for pyflakes.
Ready for merge
 - Legacy-Id: 9311
2015-03-21 20:49:49 +00:00
Willem Toorop 65c052a2f7 Callback API test code paths
- Legacy-Id: 9305
2015-03-21 19:47:50 +00:00
Henrik Levkowetz e9fcce9cdc Added a couple of missing __init__.py files.
- Legacy-Id: 9146
2015-03-04 16:19:07 +00:00
Henrik Levkowetz 86997e1e95 Turned the api.py file into a module. Moved the makeresources management command to the api module. Added some api tests. Added crawling of api files to the test-crawler. Adjusted some resource files discovered by the test suite and test-crawler. Removed a bunch of empty model files.
- Legacy-Id: 9144
2015-03-03 20:23:36 +00:00