django-restit 4.2.50__py3-none-any.whl → 4.2.51__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 +10 -3
- {django_restit-4.2.50.dist-info → django_restit-4.2.51.dist-info}/METADATA +1 -1
- {django_restit-4.2.50.dist-info → django_restit-4.2.51.dist-info}/RECORD +6 -6
- rest/__init__.py +1 -1
- {django_restit-4.2.50.dist-info → django_restit-4.2.51.dist-info}/LICENSE.md +0 -0
- {django_restit-4.2.50.dist-info → django_restit-4.2.51.dist-info}/WHEEL +0 -0
auditlog/middleware.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
from rest import settings
|
2
|
+
from rest import helpers as rh
|
2
3
|
from .models import PersistentLog
|
3
4
|
|
4
5
|
DEBUG_REST_ALL = settings.get("DEBUG_REST_ALL", False)
|
@@ -10,19 +11,23 @@ if not LOG_REST_PREFIX.startswith("/"):
|
|
10
11
|
|
11
12
|
|
12
13
|
def checkRestDebug(request):
|
14
|
+
if checkRestIgnore(request):
|
15
|
+
return False
|
13
16
|
if DEBUG_REST_ALL:
|
14
17
|
return True
|
15
18
|
for ep in DEBUG_REST_END_POINTS:
|
16
19
|
if request.path.startswith(ep):
|
17
|
-
return
|
20
|
+
return True
|
18
21
|
return False
|
19
22
|
|
20
23
|
|
21
24
|
def checkRestIgnore(request):
|
22
25
|
for ep in IGNORE_REST_END_POINTS:
|
23
26
|
if isinstance(ep, tuple):
|
24
|
-
method,
|
25
|
-
|
27
|
+
method, epath = ep
|
28
|
+
if request.method == method and request.path.startswith(epath):
|
29
|
+
return True
|
30
|
+
rh.debug("checkRestIgnore", f"{ep} vs {request.path}")
|
26
31
|
if request.path.startswith(ep):
|
27
32
|
return True
|
28
33
|
return False
|
@@ -40,8 +45,10 @@ class LogRequest(object):
|
|
40
45
|
def process_request(self, request):
|
41
46
|
# LogRequest.last_request = request
|
42
47
|
request.rest_debug = False
|
48
|
+
rh.debug("LogRequest.process_request", request.path, DEBUG_REST_ALL)
|
43
49
|
if request.path.startswith(LOG_REST_PREFIX) or request.path.startswith("/rpc/"):
|
44
50
|
request.rest_debug = checkRestDebug(request)
|
51
|
+
rh.debug("checkRestDebug", request.rest_debug, IGNORE_REST_END_POINTS)
|
45
52
|
if request.rest_debug:
|
46
53
|
request.DATA.log()
|
47
54
|
response = self.get_response(request)
|
@@ -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=
|
61
|
+
auditlog/middleware.py,sha256=SSzqqSg_5l6x8LEvawt_RpIvNwKaIeMjxjNJ_UMkICM,1826
|
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=
|
366
|
+
rest/__init__.py,sha256=uoSQO22cfX2kuQ8uMpqYGrAX4PDy2Lvp_3n4797fgfk,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.
|
500
|
-
django_restit-4.2.
|
501
|
-
django_restit-4.2.
|
502
|
-
django_restit-4.2.
|
499
|
+
django_restit-4.2.51.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
|
500
|
+
django_restit-4.2.51.dist-info/METADATA,sha256=qolKiTHvTmfWLH7kIudyKPMtMg01aTX6ohPAjY-JZMs,7594
|
501
|
+
django_restit-4.2.51.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
502
|
+
django_restit-4.2.51.dist-info/RECORD,,
|
rest/__init__.py
CHANGED
File without changes
|
File without changes
|