django-restit 4.2.50__py3-none-any.whl → 4.2.52__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
auditlog/middleware.py CHANGED
@@ -1,5 +1,4 @@
1
1
  from rest import settings
2
- from .models import PersistentLog
3
2
 
4
3
  DEBUG_REST_ALL = settings.get("DEBUG_REST_ALL", False)
5
4
  DEBUG_REST_END_POINTS = settings.get("DEBUG_REST_END_POINTS", [])
@@ -10,19 +9,22 @@ if not LOG_REST_PREFIX.startswith("/"):
10
9
 
11
10
 
12
11
  def checkRestDebug(request):
12
+ if checkRestIgnore(request):
13
+ return False
13
14
  if DEBUG_REST_ALL:
14
15
  return True
15
16
  for ep in DEBUG_REST_END_POINTS:
16
17
  if request.path.startswith(ep):
17
- return not checkRestIgnore(request)
18
+ return True
18
19
  return False
19
20
 
20
21
 
21
22
  def checkRestIgnore(request):
22
23
  for ep in IGNORE_REST_END_POINTS:
23
24
  if isinstance(ep, tuple):
24
- method, ep = ep
25
- return request.method == method and request.path.startswith(ep)
25
+ method, epath = ep
26
+ if request.method == method and request.path.startswith(epath):
27
+ return True
26
28
  if request.path.startswith(ep):
27
29
  return True
28
30
  return False
@@ -46,4 +48,3 @@ class LogRequest(object):
46
48
  request.DATA.log()
47
49
  response = self.get_response(request)
48
50
  return response
49
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-restit
3
- Version: 4.2.50
3
+ Version: 4.2.52
4
4
  Summary: A Rest Framework for DJANGO
5
5
  License: MIT
6
6
  Author: Ian Starnes
@@ -58,7 +58,7 @@ auditlog/README,sha256=q4DXhdz5CuMyuxYISHXzhlHnIkRJlojwOMchLzW2qOI,520
58
58
  auditlog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
59
  auditlog/admin.py,sha256=-q7fstdFjNeDFfbwdrxVqy0WGKxMpBwrsM7AyG1p80g,1006
60
60
  auditlog/decorators.py,sha256=ZoIv0fhZjxtMEV15NcKijW4xPF5UEScPna60zB3TxZo,6553
61
- auditlog/middleware.py,sha256=jQiuedadlu8NU0Fi7ExfPx6X1aQquXfSxMECMprO_tg,1511
61
+ auditlog/middleware.py,sha256=Q4bXg8rnm8y2fMnAsN6ha3Fz6TW8jIzLnvpu4H9SpWE,1537
62
62
  auditlog/migrations/0001_initial.py,sha256=X171gKQZIaTO9FGNG1yKTjGSZS0ZjZj5gvimF9-_kks,3309
63
63
  auditlog/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
64
  auditlog/models.py,sha256=6CyWMRNvqCYoyiXE9_qk41EJFjutwo6nfoP9KKYWiYw,16294
@@ -363,7 +363,7 @@ pushit/utils.py,sha256=IeTCGa-164nmB1jIsK1lu1O1QzUhS3BKfuXHGjCW-ck,2121
363
363
  rest/.gitignore,sha256=TbEvWRMnAiajCTOdhiNrd9eeCAaIjRp9PRjE_VkMM5g,118
364
364
  rest/README.md,sha256=V3ETc-cJu8PZIbKr9xSe_pA4JEUpC8Dhw4bQeVCDJPw,5460
365
365
  rest/RemoteEvents.py,sha256=nL46U7AuxIrlw2JunphR1tsXyqi-ep_gD9CYGpYbNgE,72
366
- rest/__init__.py,sha256=GtpQiCh5a1BbYUUxXkVV-jufixYEP2g-9sZdo3k08t4,121
366
+ rest/__init__.py,sha256=2HE4WDfkdAvL49lqRgAGV6gAWbfUZ0GG_msNkKxkqHM,121
367
367
  rest/arc4.py,sha256=y644IbF1ec--e4cUJ3KEYsewTCITK0gmlwa5mJruFC0,1967
368
368
  rest/cache.py,sha256=1Qg0rkaCJCaVP0-l5hZg2CIblTdeBSlj_0fP6vlKUpU,83
369
369
  rest/crypto/__init__.py,sha256=Tl0U11rgj1eBYqd6OXJ2_XSdNLumW_JkBZnaJqI6Ldw,72
@@ -496,7 +496,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
496
496
  ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
497
497
  ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
498
498
  ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
499
- django_restit-4.2.50.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
500
- django_restit-4.2.50.dist-info/METADATA,sha256=gonbCvh7SiUJQejEU5aqPqcGCtKawrqOLntpZ_J3iGI,7594
501
- django_restit-4.2.50.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
502
- django_restit-4.2.50.dist-info/RECORD,,
499
+ django_restit-4.2.52.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
500
+ django_restit-4.2.52.dist-info/METADATA,sha256=hcuj_PkQUXWFLBONZkHn_mhS6sUN3sAyqPduk2d_iiI,7594
501
+ django_restit-4.2.52.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
502
+ django_restit-4.2.52.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.50"
4
+ __version__ = "4.2.52"