Enhanced time synchronization for drf views.
| 1 | |
| 2 | |
| 3 | = |
| 4 | |
| 5 | |
| 6 | |
| 7 | """Dataclass for configuring TimeCheck""" |
| 8 | |
| 9 | : |
| 10 | """Field in headers to use for client timestamp""" |
| 11 | : |
| 12 | """Field in request body to use for client timestamp""" |
| 13 | : |
| 14 | """Field in model instance to use for server timestamp""" |
| 15 | : |
| 16 | """Status code for when the client is newer on a GET or client is older on a POST""" |
| 17 | : |
| 18 | """What do do when the client does not provide a timestamp""" |
| 19 | : |
| 20 | """Format used to normalize datetimes.""" |
| 21 | : |
| 22 | """Raise an exception or just store the should update value""" |