Jennifer Richards
ebebdbed3e
refactor: replace datetime.now and datetime.today with timezone.now ( #4211 )
...
* refactor: replace datetime.now with timezone.now
* refactor: migrate model fields to use timezone.now as default
* refactor: replace datetime.today with timezone.now
datetime.datetime.today() is equivalent to datetime.datetime.now(); both
return a naive datetime with the current local time.
* refactor: rephrase datetime.now(tz) as timezone.now().astimezone(tz)
This is effectively the same, but is less likely to encourage accidental
use of naive datetimes.
* refactor: revert datetime.today() change to old migrations
* refactor: change a missed datetime.now to timezone.now
* chore: renumber timezone_now migration
* chore: renumber migrations
2022-08-25 13:45:16 -03:00
Robert Sparks
3697180cc1
Reverted merge of timezone-aware migration efforts.
...
- Legacy-Id: 18792
2021-01-12 16:54:20 +00:00
Henrik Levkowetz
774e752a54
Snapshot of timezone-aware datatracker code. Tests pass, and the test-crawler shows only expected differences. Trunk changes merged in up to r18768.
...
- Legacy-Id: 18770
2020-12-16 23:53:37 +00:00
Henrik Levkowetz
0ba2c93d7f
Added a showapikeys management command, to be able to easily see the api keys.
...
- Legacy-Id: 17935
2020-06-08 19:20:27 +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
726fcbf27d
Removed all __future__ imports.
...
- Legacy-Id: 17391
2020-03-05 23:53:42 +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
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
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
36b5e2ef8e
Changed name from .rel to .remote_field for remote accessors.
...
- Legacy-Id: 14665
2018-02-21 23:56:36 +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
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
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
0d4bceb977
Fixed a typo in maketestresources.py
...
- Legacy-Id: 9314
2015-03-21 22:00:08 +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