django-restit 4.2.136__py3-none-any.whl → 4.2.137__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-restit
3
- Version: 4.2.136
3
+ Version: 4.2.137
4
4
  Summary: A Rest Framework for DJANGO
5
5
  License: MIT
6
6
  Author: Ian Starnes
@@ -377,14 +377,14 @@ pushit/utils.py,sha256=IeTCGa-164nmB1jIsK1lu1O1QzUhS3BKfuXHGjCW-ck,2121
377
377
  rest/.gitignore,sha256=TbEvWRMnAiajCTOdhiNrd9eeCAaIjRp9PRjE_VkMM5g,118
378
378
  rest/README.md,sha256=V3ETc-cJu8PZIbKr9xSe_pA4JEUpC8Dhw4bQeVCDJPw,5460
379
379
  rest/RemoteEvents.py,sha256=nL46U7AuxIrlw2JunphR1tsXyqi-ep_gD9CYGpYbNgE,72
380
- rest/__init__.py,sha256=P7AsJG2-fQOZPMovCvkbEW57dyHqLdU0F4_ptZlHISg,122
380
+ rest/__init__.py,sha256=PSWIfpDjtvbPEOyM64myB5msZj0BE25NqYDa501DmEs,122
381
381
  rest/arc4.py,sha256=y644IbF1ec--e4cUJ3KEYsewTCITK0gmlwa5mJruFC0,1967
382
382
  rest/cache.py,sha256=1Qg0rkaCJCaVP0-l5hZg2CIblTdeBSlj_0fP6vlKUpU,83
383
383
  rest/crypto/__init__.py,sha256=Tl0U11rgj1eBYqd6OXJ2_XSdNLumW_JkBZnaJqI6Ldw,72
384
384
  rest/crypto/aes.py,sha256=NOVRBRSHCV-om68YpGySWWG-4kako3iEVjq8hxZWPUU,4372
385
385
  rest/crypto/privpub.py,sha256=_FioylVcbMmDP80yPYjURmafEiDmEAMkskbc7WF10ac,4082
386
386
  rest/crypto/util.py,sha256=agFN2OCPHC70tHNGWrMkkZX4Tt_Ty6imoKEMdTkZpKA,4514
387
- rest/datem.py,sha256=hX6bTbl5mQSg0x2hDK5P1TynkZFUfVTDwYkTuFObgbw,12626
387
+ rest/datem.py,sha256=qbkgDpTVbxpnS4hRm_GnyRo9Gk7nRJbH-tJqxm172mo,13152
388
388
  rest/decorators.py,sha256=AuB4agpog587CUsF8HkAZiHDfs_pueb2rdxXZD7dUUE,15327
389
389
  rest/encryption.py,sha256=x6Kiez0tVqfxK26MSsRL3k8OS05ni1gEX2aj3I0S9V0,788
390
390
  rest/errors.py,sha256=uKwG9OkLme36etabqK54DMjMQc1fgEoUIAUxXa7WFQw,612
@@ -410,7 +410,7 @@ rest/middleware/request.py,sha256=JchRNy5L-bGd-7h-KFYekGRvREe2eCkZXKOYqIkP2hI,41
410
410
  rest/middleware/session.py,sha256=zHSoQpIzRLmpqr_JvW406wzpvU3W3gDbm5JhtzLAMlE,10240
411
411
  rest/middleware/session_store.py,sha256=1nSdeXK8PyuYgGgIufqrS6j6QpIrQ7zbMNT0ol75e6U,1901
412
412
  rest/models/__init__.py,sha256=M8pvFDq-WCF-QcM58X7pMufYYe0aaQ3U0PwGe9TKbbY,130
413
- rest/models/base.py,sha256=asj1ehoq_LLcm99PbyICGG9I_GQikxilrc52tTs2YBY,71301
413
+ rest/models/base.py,sha256=soIYiW71wZdUPmYf-JPPcnHx79CrA9B-hGNFt_WlRCI,71609
414
414
  rest/models/cacher.py,sha256=eKz8TINVhWEqKhJGMsRkKZTtBUIv5rN3NHbZwOC56Uk,578
415
415
  rest/models/metadata.py,sha256=1nQ7CYo9bJHoaXE_hVNaj1-Y7yqhHlf2ZlaD1IfTzic,12904
416
416
  rest/net.py,sha256=LcB2QV6VNRtsSdmiQvYZgwQUDwOPMn_VBdRiZ6OpI-I,2974
@@ -513,7 +513,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
513
513
  ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
514
514
  ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
515
515
  ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
516
- django_restit-4.2.136.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
517
- django_restit-4.2.136.dist-info/METADATA,sha256=0XTqwV9RSBBDL7jfrwHLJoRI-Rr122bpMowDHQbuLCA,7663
518
- django_restit-4.2.136.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
519
- django_restit-4.2.136.dist-info/RECORD,,
516
+ django_restit-4.2.137.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
517
+ django_restit-4.2.137.dist-info/METADATA,sha256=kG5p8Bv4ZpfqyPukB-PQ6uzRwk-42-83MtyOIk70iRY,7663
518
+ django_restit-4.2.137.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
519
+ django_restit-4.2.137.dist-info/RECORD,,
rest/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  from .uberdict import UberDict # noqa: F401
2
2
  from .settings_helper import settings # noqa: F401
3
3
 
4
- __version__ = "4.2.136"
4
+ __version__ = "4.2.137"
rest/datem.py CHANGED
@@ -394,3 +394,18 @@ def convert_to_epoch_range(start, end=None):
394
394
  raise ValueError("Start parameter must be an int, datetime object, or a string representing a timedelta.")
395
395
 
396
396
  return start_epoch, end_epoch
397
+
398
+
399
+ def updateTimeFromString(dt, time_string):
400
+ # Check if the time_string is in "hour" format (e.g., "13") or
401
+ # "hour:minute" format (e.g., "1:32")
402
+ if ':' in time_string:
403
+ # Parse hour and minute
404
+ hour, minute = map(int, time_string.split(':'))
405
+ else:
406
+ # Only hour is provided
407
+ hour = int(time_string)
408
+ minute = 0
409
+ # Update the datetime object with the new hour and minute
410
+ updated_dt = dt.replace(hour=hour, minute=minute, second=0, microsecond=0)
411
+ return updated_dt
rest/models/base.py CHANGED
@@ -1021,6 +1021,12 @@ class RestModel(object):
1021
1021
  if dr_offset > 0:
1022
1022
  dr_start = dr_start + timedelta(minutes=dr_offset)
1023
1023
  dr_end = dr_end + timedelta(minutes=dr_offset)
1024
+ tr_start = request.DATA.get("tr_start")
1025
+ if tr_start is not None:
1026
+ tr_start = rh.updateTimeFromString(dr_start, tr_start)
1027
+ tr_end = request.DATA.get("tr_end")
1028
+ if tr_end is not None:
1029
+ tr_end = rh.updateTimeFromString(dr_end, tr_end)
1024
1030
  dr_field = request.DATA.get("dr_field", getattr(cls.RestMeta, "DATE_RANGE_FIELD", "created"))
1025
1031
  q = dict()
1026
1032
  q["{}__gte".format(dr_field)] = dr_start