django-restit 4.2.111__py3-none-any.whl → 4.2.112__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.
account/models/group.py CHANGED
@@ -177,7 +177,7 @@ class Group(models.Model, RestModel, MetaDataModel):
177
177
  parent = request.member.getGroup(child_of)
178
178
  if parent:
179
179
  request.group = None
180
- return parent.getAllChildren(grand_children=True)
180
+ return parent.getAllChildren(grand_children=True, great_grand_children=True)
181
181
  return qset
182
182
 
183
183
  def on_rest_get(self, request):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-restit
3
- Version: 4.2.111
3
+ Version: 4.2.112
4
4
  Summary: A Rest Framework for DJANGO
5
5
  License: MIT
6
6
  Author: Ian Starnes
@@ -28,7 +28,7 @@ account/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
28
28
  account/models/__init__.py,sha256=cV_lMnT2vL_mjiYtT4hlcIHo52ocFbGSNVkOIHHLXZY,385
29
29
  account/models/device.py,sha256=0AFeLMGk4im4KZVd3eGSyRbK4eQEXiFM2cdY8GUzihs,5934
30
30
  account/models/feeds.py,sha256=vI7fG4ASY1M0Zjke24RdnfDcuWeATl_yR_25jPmT64g,2011
31
- account/models/group.py,sha256=mjWwePt3ogQUo9m0EhURMz0aBrVVx_0Drr0lNDESQio,22281
31
+ account/models/group.py,sha256=KnLj0cOJBg1JYo33wL-7NehD4_PCsLyEjLdX6GZJZAo,22308
32
32
  account/models/legacy.py,sha256=zYdtv4LC0ooxPVqWM-uToPwV-lYWQLorSE6p6yn1xDw,2720
33
33
  account/models/member.py,sha256=JziyYNC13SFWX07Thtoe2V_YlrKNn2RHJZcRk15Zh-s,54205
34
34
  account/models/membership.py,sha256=90EpAhOsGaqphDAkONP6j_qQ0OWSRaQsI8H7E7fgMkE,9249
@@ -374,7 +374,7 @@ pushit/utils.py,sha256=IeTCGa-164nmB1jIsK1lu1O1QzUhS3BKfuXHGjCW-ck,2121
374
374
  rest/.gitignore,sha256=TbEvWRMnAiajCTOdhiNrd9eeCAaIjRp9PRjE_VkMM5g,118
375
375
  rest/README.md,sha256=V3ETc-cJu8PZIbKr9xSe_pA4JEUpC8Dhw4bQeVCDJPw,5460
376
376
  rest/RemoteEvents.py,sha256=nL46U7AuxIrlw2JunphR1tsXyqi-ep_gD9CYGpYbNgE,72
377
- rest/__init__.py,sha256=f6yMzn65J43zKPsou6HIxzAW4azgU8ZpZYPncvcWlzU,122
377
+ rest/__init__.py,sha256=m3kqpu3YhcghJ-KrIUqDNZLIi6TS2MsL0ixv0h0LuPE,122
378
378
  rest/arc4.py,sha256=y644IbF1ec--e4cUJ3KEYsewTCITK0gmlwa5mJruFC0,1967
379
379
  rest/cache.py,sha256=1Qg0rkaCJCaVP0-l5hZg2CIblTdeBSlj_0fP6vlKUpU,83
380
380
  rest/crypto/__init__.py,sha256=Tl0U11rgj1eBYqd6OXJ2_XSdNLumW_JkBZnaJqI6Ldw,72
@@ -386,7 +386,7 @@ rest/decorators.py,sha256=ig0LATc3-2mhEJPAWHRbIRM-ZOFyjm6e_F9RhpRWidE,15082
386
386
  rest/encryption.py,sha256=x6Kiez0tVqfxK26MSsRL3k8OS05ni1gEX2aj3I0S9V0,788
387
387
  rest/errors.py,sha256=uKwG9OkLme36etabqK54DMjMQc1fgEoUIAUxXa7WFQw,612
388
388
  rest/extra/__init__.py,sha256=YzmNsch5H5FFLkUK9mIAKyoRK_rJCA9HGb0kubp4h30,54
389
- rest/extra/hostinfo.py,sha256=LFigr90B-NU6MkaYDNj7fwfqJVuu9UP1InZMky4kH58,4041
389
+ rest/extra/hostinfo.py,sha256=5R23EafcNbFARyNEqdjBkqcpC8rPfmPd1zqNqle6-nM,4298
390
390
  rest/extra/json_metadata.py,sha256=p_ffzmANmOFix_oC3voR6_NNTjcn7-T7aXcH-I4_Npg,1078
391
391
  rest/fields.py,sha256=_v1TJVc6vyWlqmwFRJ6mtuR5Fo-lS0KcUhPWIrzKZUo,9719
392
392
  rest/forms.py,sha256=66Wm5cdy8tKib_mGicjq_yd-gNVMFWRECnrDksnNnwU,6316
@@ -509,7 +509,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
509
509
  ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
510
510
  ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
511
511
  ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
512
- django_restit-4.2.111.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
513
- django_restit-4.2.111.dist-info/METADATA,sha256=Z7wRFxgI3NVj0LMn1EMKppq0Wo50qCh_iKbkvdFqSUA,7663
514
- django_restit-4.2.111.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
515
- django_restit-4.2.111.dist-info/RECORD,,
512
+ django_restit-4.2.112.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
513
+ django_restit-4.2.112.dist-info/METADATA,sha256=sb1cEMGTn30fqgEPa6eq2gPuta4N5nSVKh3WzcG5fec,7663
514
+ django_restit-4.2.112.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
515
+ django_restit-4.2.112.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.111"
4
+ __version__ = "4.2.112"
rest/extra/hostinfo.py CHANGED
@@ -6,6 +6,7 @@ import django
6
6
  import version
7
7
  import platform
8
8
  import socket
9
+ import subprocess
9
10
 
10
11
 
11
12
  try:
@@ -36,13 +37,19 @@ def getTcpEstablished(filter=None):
36
37
 
37
38
  def filterConnections(cons, filter):
38
39
  if filter == "https":
39
- return [c for c in cons if cons.laddr.port == 443]
40
+ return [c for c in cons if c.laddr.port == 443]
40
41
  elif filter == "redis":
41
- return [c for c in cons if cons.raddr.port == 6379]
42
+ return [c for c in cons if c.raddr.port == 6379]
42
43
  elif filter == "postgres":
43
- return [c for c in cons if cons.raddr.port == 5432]
44
+ return [c for c in cons if c.raddr.port == 5432]
44
45
  elif filter == "unknown":
45
- return [c for c in cons if cons.raddr.port not in [5432, 6379] and cons.laddr.port != 443]
46
+ return [c for c in cons if c.raddr.port not in [5432, 6379] and c.laddr.port != 443]
47
+ elif filter and ":" in filter:
48
+ addr, port = filter.split(':')
49
+ if addr == "raddr":
50
+ return [c for c in cons if c.raddr.port == port]
51
+ elif addr == "laddr":
52
+ return [c for c in cons if c.laddr.port == port]
46
53
  return cons
47
54
 
48
55