Commit graph

14 commits

Author SHA1 Message Date
Jennifer Richards 8cf609bfa9
refactor: Implement require_api_key with functools.wraps
The @decorator mechanism does not seem to work with @method_decorator
in Django 4.0, have not tracked down why.
2023-05-17 09:45:07 -03:00
Jennifer Richards 7ad74c99e4
refactor: import from django.urls instead of django.conf.urls 2023-05-12 20:29:11 -03:00
Jennifer Richards aa4c04126c
chore: Use re_path() instead of url(), its deprecated synonym, 2023-05-12 17:09:32 -03:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz 1c808bf63b Removed further six usage.
- Legacy-Id: 17387
2020-03-05 15:54:32 +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 f481f5c3e6 Replaced use of six with the equivalent pure python3 constructs.
- Legacy-Id: 16428
2019-07-08 10:43:47 +00:00
Henrik Levkowetz 5f053ad21a Cleaned up the remaining explicit url names, using dotted-paths to view
functions instead.  In all almost 700 changes.
 - Legacy-Id: 12923
2017-02-26 23:21:49 +00:00
Henrik Levkowetz 84527c9df6 Added some code to utils.urls.url() to output remaining explicit url names together with the matching dotted-path to the view function.
- Legacy-Id: 12921
2017-02-25 20:32:20 +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 9c095365dd Commented out debug output from ietf.utils.urls.url(). Tweaked the url() handling of django views.
- Legacy-Id: 12634
2017-01-09 16:32:38 +00:00
Henrik Levkowetz eb5aa9a691 Django 1.9: Refined the autonaming url() replacement.
- Legacy-Id: 12622
2016-12-22 18:08:21 +00:00
Henrik Levkowetz bfc44dea82 Django 1.9: Added an alternative implementation of urls() which derives an url pattern name from the callable, in order to maintain DRY for url patterns.
- Legacy-Id: 12617
2016-12-22 17:20:29 +00:00