django-restit 4.2.157__py3-none-any.whl → 4.2.160__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- account/models/device.py +3 -0
- account/models/passkeys.py +4 -2
- {django_restit-4.2.157.dist-info → django_restit-4.2.160.dist-info}/METADATA +1 -1
- {django_restit-4.2.157.dist-info → django_restit-4.2.160.dist-info}/RECORD +9 -9
- metrics/models.py +3 -1
- rest/__init__.py +1 -1
- taskqueue/worker.py +1 -0
- {django_restit-4.2.157.dist-info → django_restit-4.2.160.dist-info}/LICENSE.md +0 -0
- {django_restit-4.2.157.dist-info → django_restit-4.2.160.dist-info}/WHEEL +0 -0
account/models/device.py
CHANGED
@@ -96,6 +96,9 @@ class MemberDevice(models.Model, rm.RestModel, rm.MetaDataModel):
|
|
96
96
|
md.kind = "mac"
|
97
97
|
md.save()
|
98
98
|
md.setProperty("user_agent", request.META.get('HTTP_USER_AGENT', ''))
|
99
|
+
metadata = request.DATA.get("device_metadata", None)
|
100
|
+
if isinstance(metadata, dict):
|
101
|
+
md.set_metadata(metadata)
|
99
102
|
return md
|
100
103
|
|
101
104
|
@classmethod
|
account/models/passkeys.py
CHANGED
@@ -9,8 +9,10 @@ from datetime import datetime
|
|
9
9
|
|
10
10
|
class UserPassKey(models.Model, rm.RestModel):
|
11
11
|
"""
|
12
|
-
|
13
|
-
|
12
|
+
A “Passkey” is a modern, secure authentication method designed to replace
|
13
|
+
traditional passwords with more robust and user-friendly alternatives.
|
14
|
+
It leverages cryptographic techniques and is based on standards like
|
15
|
+
WebAuthn and FIDO2, aiming to improve both security and convenience.
|
14
16
|
"""
|
15
17
|
class RestMeta:
|
16
18
|
VIEW_PERMS = ["manage_users", "owner"]
|
@@ -26,14 +26,14 @@ account/migrations/0021_alter_cloudcredentials_group.py,sha256=zoFYmE-hd3uRGX6DR
|
|
26
26
|
account/migrations/0022_alter_memberdevice_modified.py,sha256=9eeKcdr9p6qFJ8ZxSnKSj1KxZjW8NZfM0YCMck6i0QQ,424
|
27
27
|
account/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
28
28
|
account/models/__init__.py,sha256=cV_lMnT2vL_mjiYtT4hlcIHo52ocFbGSNVkOIHHLXZY,385
|
29
|
-
account/models/device.py,sha256=
|
29
|
+
account/models/device.py,sha256=idOe88sRkGn3U3DJS7WizFWOGCm-D-nWPqIdBpX4M7Q,6072
|
30
30
|
account/models/feeds.py,sha256=vI7fG4ASY1M0Zjke24RdnfDcuWeATl_yR_25jPmT64g,2011
|
31
31
|
account/models/group.py,sha256=N9Ow7AtV4xN5zSE9E5-msthJy0G5-3DEr2MTmvFO1kU,22887
|
32
32
|
account/models/legacy.py,sha256=zYdtv4LC0ooxPVqWM-uToPwV-lYWQLorSE6p6yn1xDw,2720
|
33
33
|
account/models/member.py,sha256=qmLCOVbNTRr4L-E7BbOMtv4V64QN7K-0pXDgnuB-AbY,54722
|
34
34
|
account/models/membership.py,sha256=90EpAhOsGaqphDAkONP6j_qQ0OWSRaQsI8H7E7fgMkE,9249
|
35
35
|
account/models/notify.py,sha256=YKYEXT56i98b7-ydLt5UuEVOqW7lipQMi-KuiPhcSwY,15627
|
36
|
-
account/models/passkeys.py,sha256=
|
36
|
+
account/models/passkeys.py,sha256=lObapudvL--ABSTZTIELmYvHE3dPF0tO_KmuYk0ZJXc,1699
|
37
37
|
account/models/session.py,sha256=ELkWjB_2KXQvPtRPrvuGJpJsqrxCQX_4J53SbqGz_2U,3737
|
38
38
|
account/models/settings.py,sha256=gOyRWBVd3BQpjfj_hJPtqX3H46ztyRAFxBrPbv11lQg,2137
|
39
39
|
account/oauth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -355,7 +355,7 @@ metrics/migrations/0003_metrics_expires.py,sha256=_g4oRv4NHW-4iCQx2s1SiF38LLyFf8
|
|
355
355
|
metrics/migrations/0004_eodmetrics.py,sha256=Ky6ZVMZqa0F_SUp_QFWY7ZKBgVhy9CS4wZcsEhrkSgc,3271
|
356
356
|
metrics/migrations/0005_alter_metrics_v1_alter_metrics_v10_alter_metrics_v11_and_more.py,sha256=pmwJfpPJ1RUX_CqM66l6vvV-nrAUPo_GIan0Pc9mQHs,2358
|
357
357
|
metrics/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
358
|
-
metrics/models.py,sha256
|
358
|
+
metrics/models.py,sha256=-bIEvhamfZZKweMEswBcBoZDOQhPqJHbCKyUuH6WjFc,14052
|
359
359
|
metrics/periodic.py,sha256=IayBLLat40D8FB-A3bYBW9lxm9-IzcugQunojThQ_OU,661
|
360
360
|
metrics/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
361
361
|
metrics/providers/aws.py,sha256=dIBGFE1Fvszy6rmVrn_Fm1zUDv345q4dBsg9Iit-XCc,8358
|
@@ -378,7 +378,7 @@ pushit/utils.py,sha256=IeTCGa-164nmB1jIsK1lu1O1QzUhS3BKfuXHGjCW-ck,2121
|
|
378
378
|
rest/.gitignore,sha256=TbEvWRMnAiajCTOdhiNrd9eeCAaIjRp9PRjE_VkMM5g,118
|
379
379
|
rest/README.md,sha256=V3ETc-cJu8PZIbKr9xSe_pA4JEUpC8Dhw4bQeVCDJPw,5460
|
380
380
|
rest/RemoteEvents.py,sha256=nL46U7AuxIrlw2JunphR1tsXyqi-ep_gD9CYGpYbNgE,72
|
381
|
-
rest/__init__.py,sha256=
|
381
|
+
rest/__init__.py,sha256=57t2eatlfwKDKM2SiFPDYudiC2k1CEhng7M_5-v1wwc,122
|
382
382
|
rest/arc4.py,sha256=y644IbF1ec--e4cUJ3KEYsewTCITK0gmlwa5mJruFC0,1967
|
383
383
|
rest/cache.py,sha256=1Qg0rkaCJCaVP0-l5hZg2CIblTdeBSlj_0fP6vlKUpU,83
|
384
384
|
rest/crypto/__init__.py,sha256=Tl0U11rgj1eBYqd6OXJ2_XSdNLumW_JkBZnaJqI6Ldw,72
|
@@ -470,7 +470,7 @@ taskqueue/transports/http.py,sha256=AzliUnw_LuyO2zZZOoUAJGFcTV-Gxt1iE3hCVnIiyGQ,
|
|
470
470
|
taskqueue/transports/s3.py,sha256=fMosL893u1iQdo6Y1djwb7KEoNo6TTsDPJl13OJdJP8,1913
|
471
471
|
taskqueue/transports/sftp.py,sha256=jT1_krjTHA7DCAukD85aGYRCg9m0cEH9EWzOC-wJGdk,1891
|
472
472
|
taskqueue/transports/sms.py,sha256=H1-LIGEMfbUNqJD9amRcsvKUSwtz9yBj1QNfB7EHjHE,142
|
473
|
-
taskqueue/worker.py,sha256=
|
473
|
+
taskqueue/worker.py,sha256=U_WGw3pJx9-I8loCQyfj3kyWScXOVb45g-6U9uyCH-c,15700
|
474
474
|
telephony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
475
475
|
telephony/admin.py,sha256=iOdsBfFFbBisdqKSZ36bIrh_z5sU0Wx_PkaFi8wd1iA,243
|
476
476
|
telephony/decorators.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -514,7 +514,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
|
|
514
514
|
ws4redis/settings.py,sha256=KKq00EwoGnz1yLwCZr5Dfoq2izivmAdsNEEM4EhZwN4,1610
|
515
515
|
ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
|
516
516
|
ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
|
517
|
-
django_restit-4.2.
|
518
|
-
django_restit-4.2.
|
519
|
-
django_restit-4.2.
|
520
|
-
django_restit-4.2.
|
517
|
+
django_restit-4.2.160.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
|
518
|
+
django_restit-4.2.160.dist-info/METADATA,sha256=WJGuAy2t6eDz8FyKruY6DebHJ1MpVFbY_fKUeKlnQnA,7663
|
519
|
+
django_restit-4.2.160.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
520
|
+
django_restit-4.2.160.dist-info/RECORD,,
|
metrics/models.py
CHANGED
@@ -13,7 +13,7 @@ from .eod import EODMetrics
|
|
13
13
|
# THIS IS IN DAYS
|
14
14
|
METRICS_EXPIRE_HOURLY = settings.get("METRICS_EXPIRE_HOURLY", 90)
|
15
15
|
METRICS_EXPIRE_DAILY = settings.get("METRICS_EXPIRE_DAILY", 360)
|
16
|
-
|
16
|
+
METRICS_EXPIRE_WEEKLY = settings.get("METRICS_EXPIRE_WEEKLY", 360)
|
17
17
|
|
18
18
|
def metric(
|
19
19
|
slug, keys, data, min_granularity="hourly",
|
@@ -38,6 +38,8 @@ def metric(
|
|
38
38
|
expires = datetime.now() + timedelta(days=METRICS_EXPIRE_HOURLY)
|
39
39
|
elif granularity == "daily":
|
40
40
|
expires = datetime.now() + timedelta(days=METRICS_EXPIRE_DAILY)
|
41
|
+
elif granularity == "weekly":
|
42
|
+
expires = datetime.now() + timedelta(days=METRICS_EXPIRE_WEEKLY)
|
41
43
|
m, created = Metrics.objects.get_or_create(
|
42
44
|
uuid=key,
|
43
45
|
defaults=dict(
|
rest/__init__.py
CHANGED
taskqueue/worker.py
CHANGED
@@ -227,6 +227,7 @@ class WorkManager(object):
|
|
227
227
|
elif action == "get_stats":
|
228
228
|
data = nobjict(action="stats", hostname=settings.HOSTNAME)
|
229
229
|
data.uptime = time.time() - self.started_at
|
230
|
+
data.workers = self.worker_count
|
230
231
|
data.subscribed = self.subscribe_to
|
231
232
|
data.running = self._running_count
|
232
233
|
data.pending = self._pending_count
|
File without changes
|
File without changes
|