django-restit 4.2.173__tar.gz → 4.2.174__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (522) hide show
  1. {django_restit-4.2.173 → django_restit-4.2.174}/PKG-INFO +1 -1
  2. {django_restit-4.2.173 → django_restit-4.2.174}/account/models/group.py +16 -19
  3. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/models.py +3 -2
  4. {django_restit-4.2.173 → django_restit-4.2.174}/incident/models/event.py +8 -9
  5. {django_restit-4.2.173 → django_restit-4.2.174}/incident/models/incident.py +6 -6
  6. {django_restit-4.2.173 → django_restit-4.2.174}/incident/models/ossec.py +2 -2
  7. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/models.py +11 -10
  8. {django_restit-4.2.173 → django_restit-4.2.174}/pyproject.toml +1 -1
  9. {django_restit-4.2.173 → django_restit-4.2.174}/rest/__init__.py +1 -1
  10. {django_restit-4.2.173 → django_restit-4.2.174}/rest/models/base.py +19 -7
  11. {django_restit-4.2.173 → django_restit-4.2.174}/rest/requestex.py +3 -4
  12. {django_restit-4.2.173 → django_restit-4.2.174}/rest/serializers/response.py +37 -5
  13. django_restit-4.2.174/rest/service.py +135 -0
  14. {django_restit-4.2.173 → django_restit-4.2.174}/rest/urls.py +0 -4
  15. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/worker.py +23 -23
  16. {django_restit-4.2.173 → django_restit-4.2.174}/LICENSE.md +0 -0
  17. {django_restit-4.2.173 → django_restit-4.2.174}/README.md +0 -0
  18. {django_restit-4.2.173 → django_restit-4.2.174}/account/__init__.py +0 -0
  19. {django_restit-4.2.173 → django_restit-4.2.174}/account/admin.py +0 -0
  20. {django_restit-4.2.173 → django_restit-4.2.174}/account/fcm/__init__.py +0 -0
  21. {django_restit-4.2.173 → django_restit-4.2.174}/account/fcm/legacy.py +0 -0
  22. {django_restit-4.2.173 → django_restit-4.2.174}/account/fcm/v1.py +0 -0
  23. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0001_initial.py +0 -0
  24. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0003_member_phone_number.py +0 -0
  25. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0004_group_modified_alter_group_created.py +0 -0
  26. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0005_member_auth_code_expires.py +0 -0
  27. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0006_member_security_token.py +0 -0
  28. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0007_authtoken_signature_authsession.py +0 -0
  29. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0008_memberdevice_memberdevicemetadata.py +0 -0
  30. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0009_alter_member_phone_number.py +0 -0
  31. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0010_delete_authtoken.py +0 -0
  32. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0011_authtoken.py +0 -0
  33. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0012_settings_settingsmetadata.py +0 -0
  34. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0013_memberdevice_ip.py +0 -0
  35. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0014_alter_notificationmemberrecord_member.py +0 -0
  36. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0015_memberdevice_buid.py +0 -0
  37. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0016_authsession_buid.py +0 -0
  38. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0017_rename_requires_topt_member_requires_totp.py +0 -0
  39. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0018_userpasskey.py +0 -0
  40. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0019_group_location.py +0 -0
  41. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0020_cloudcredentials_cloudcredentialsmetadata.py +0 -0
  42. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0021_alter_cloudcredentials_group.py +0 -0
  43. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/0022_alter_memberdevice_modified.py +0 -0
  44. {django_restit-4.2.173 → django_restit-4.2.174}/account/migrations/__init__.py +0 -0
  45. {django_restit-4.2.173 → django_restit-4.2.174}/account/models/__init__.py +0 -0
  46. {django_restit-4.2.173 → django_restit-4.2.174}/account/models/device.py +0 -0
  47. {django_restit-4.2.173 → django_restit-4.2.174}/account/models/feeds.py +0 -0
  48. {django_restit-4.2.173 → django_restit-4.2.174}/account/models/legacy.py +0 -0
  49. {django_restit-4.2.173 → django_restit-4.2.174}/account/models/member.py +0 -0
  50. {django_restit-4.2.173 → django_restit-4.2.174}/account/models/membership.py +0 -0
  51. {django_restit-4.2.173 → django_restit-4.2.174}/account/models/notify.py +0 -0
  52. {django_restit-4.2.173 → django_restit-4.2.174}/account/models/passkeys.py +0 -0
  53. {django_restit-4.2.173 → django_restit-4.2.174}/account/models/session.py +0 -0
  54. {django_restit-4.2.173 → django_restit-4.2.174}/account/models/settings.py +0 -0
  55. {django_restit-4.2.173 → django_restit-4.2.174}/account/oauth/__init__.py +0 -0
  56. {django_restit-4.2.173 → django_restit-4.2.174}/account/oauth/google.py +0 -0
  57. {django_restit-4.2.173 → django_restit-4.2.174}/account/passkeys/__init__.py +0 -0
  58. {django_restit-4.2.173 → django_restit-4.2.174}/account/passkeys/core.py +0 -0
  59. {django_restit-4.2.173 → django_restit-4.2.174}/account/periodic.py +0 -0
  60. {django_restit-4.2.173 → django_restit-4.2.174}/account/rpc/__init__.py +0 -0
  61. {django_restit-4.2.173 → django_restit-4.2.174}/account/rpc/auth.py +0 -0
  62. {django_restit-4.2.173 → django_restit-4.2.174}/account/rpc/device.py +0 -0
  63. {django_restit-4.2.173 → django_restit-4.2.174}/account/rpc/group.py +0 -0
  64. {django_restit-4.2.173 → django_restit-4.2.174}/account/rpc/member.py +0 -0
  65. {django_restit-4.2.173 → django_restit-4.2.174}/account/rpc/notify.py +0 -0
  66. {django_restit-4.2.173 → django_restit-4.2.174}/account/rpc/oauth.py +0 -0
  67. {django_restit-4.2.173 → django_restit-4.2.174}/account/rpc/passkeys.py +0 -0
  68. {django_restit-4.2.173 → django_restit-4.2.174}/account/rpc/settings.py +0 -0
  69. {django_restit-4.2.173 → django_restit-4.2.174}/account/settings.py +0 -0
  70. {django_restit-4.2.173 → django_restit-4.2.174}/account/templates/email/base.html +0 -0
  71. {django_restit-4.2.173 → django_restit-4.2.174}/account/templates/email/invite.html +0 -0
  72. {django_restit-4.2.173 → django_restit-4.2.174}/account/templates/email/plain/base.html +0 -0
  73. {django_restit-4.2.173 → django_restit-4.2.174}/account/templates/email/plain/invite.html +0 -0
  74. {django_restit-4.2.173 → django_restit-4.2.174}/account/templates/email/plain/reset_code.html +0 -0
  75. {django_restit-4.2.173 → django_restit-4.2.174}/account/templates/email/reset_code.html +0 -0
  76. {django_restit-4.2.173 → django_restit-4.2.174}/account/templates/email/simple/invite.html +0 -0
  77. {django_restit-4.2.173 → django_restit-4.2.174}/account/templates/email/simple/reset_code.html +0 -0
  78. {django_restit-4.2.173 → django_restit-4.2.174}/account/templates/unsubscribed.html +0 -0
  79. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/README +0 -0
  80. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/__init__.py +0 -0
  81. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/admin.py +0 -0
  82. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/cloudwatch.py +0 -0
  83. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/decorators.py +0 -0
  84. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/middleware.py +0 -0
  85. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/migrations/0001_initial.py +0 -0
  86. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/migrations/0002_alter_persistentlog_session.py +0 -0
  87. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/migrations/__init__.py +0 -0
  88. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/periodic.py +0 -0
  89. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/rpc.py +0 -0
  90. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/tq.py +0 -0
  91. {django_restit-4.2.173 → django_restit-4.2.174}/auditlog/urls.py +0 -0
  92. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/README.md +0 -0
  93. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/__init__.py +0 -0
  94. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/admin.py +0 -0
  95. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/handlers.py +0 -0
  96. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/migrations/0001_initial.py +0 -0
  97. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/migrations/0002_alter_message_cc.py +0 -0
  98. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/migrations/0003_attachment_content_type.py +0 -0
  99. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/migrations/0004_mailtemplate.py +0 -0
  100. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/migrations/0005_alter_mailbox_state.py +0 -0
  101. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/migrations/__init__.py +0 -0
  102. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/models/__init__.py +0 -0
  103. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/models/bounce.py +0 -0
  104. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/models/complaint.py +0 -0
  105. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/models/message.py +0 -0
  106. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/models/template.py +0 -0
  107. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/rpc.py +0 -0
  108. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/utils/__init__.py +0 -0
  109. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/utils/parsing.py +0 -0
  110. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/utils/render.py +0 -0
  111. {django_restit-4.2.173 → django_restit-4.2.174}/inbox/utils/sending.py +0 -0
  112. {django_restit-4.2.173 → django_restit-4.2.174}/incident/README.md +0 -0
  113. {django_restit-4.2.173 → django_restit-4.2.174}/incident/__init__.py +0 -0
  114. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0001_initial.py +0 -0
  115. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0002_event_component_event_component_id.py +0 -0
  116. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0003_rule_action.py +0 -0
  117. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0004_serverossecalert_ssh_sig_alter_rulecheck_parent.py +0 -0
  118. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0005_incident_component_alter_incident_state.py +0 -0
  119. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0006_delete_eventmetadata.py +0 -0
  120. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0007_event_metadata.py +0 -0
  121. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0008_incident_action_sent_incident_hostname_and_more.py +0 -0
  122. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0009_incident_reporter_ip.py +0 -0
  123. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0010_incident_category_incident_component_id.py +0 -0
  124. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0011_ticket.py +0 -0
  125. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0012_rule_match_by.py +0 -0
  126. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0013_rulecheck_is_required.py +0 -0
  127. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0014_event_group_alter_rulecheck_index.py +0 -0
  128. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0015_rule_title_template_alter_incident_state.py +0 -0
  129. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/0016_rule_notify_template.py +0 -0
  130. {django_restit-4.2.173 → django_restit-4.2.174}/incident/migrations/__init__.py +0 -0
  131. {django_restit-4.2.173 → django_restit-4.2.174}/incident/models/__init__.py +0 -0
  132. {django_restit-4.2.173 → django_restit-4.2.174}/incident/models/rules.py +0 -0
  133. {django_restit-4.2.173 → django_restit-4.2.174}/incident/models/ticket.py +0 -0
  134. {django_restit-4.2.173 → django_restit-4.2.174}/incident/parsers/__init__.py +0 -0
  135. {django_restit-4.2.173 → django_restit-4.2.174}/incident/parsers/ossec.py +0 -0
  136. {django_restit-4.2.173 → django_restit-4.2.174}/incident/periodic.py +0 -0
  137. {django_restit-4.2.173 → django_restit-4.2.174}/incident/rpc.py +0 -0
  138. {django_restit-4.2.173 → django_restit-4.2.174}/incident/templates/email/incident_change.html +0 -0
  139. {django_restit-4.2.173 → django_restit-4.2.174}/incident/templates/email/incident_msg.html +0 -0
  140. {django_restit-4.2.173 → django_restit-4.2.174}/incident/templates/email/incident_new.html +0 -0
  141. {django_restit-4.2.173 → django_restit-4.2.174}/incident/templates/email/incident_plain.html +0 -0
  142. {django_restit-4.2.173 → django_restit-4.2.174}/incident/tq.py +0 -0
  143. {django_restit-4.2.173 → django_restit-4.2.174}/location/__init__.py +0 -0
  144. {django_restit-4.2.173 → django_restit-4.2.174}/location/admin.py +0 -0
  145. {django_restit-4.2.173 → django_restit-4.2.174}/location/geolocate.py +0 -0
  146. {django_restit-4.2.173 → django_restit-4.2.174}/location/migrations/0001_initial.py +0 -0
  147. {django_restit-4.2.173 → django_restit-4.2.174}/location/migrations/0002_geoip_subnet_alter_geoip_ip.py +0 -0
  148. {django_restit-4.2.173 → django_restit-4.2.174}/location/migrations/0003_address_postalcode_suffix.py +0 -0
  149. {django_restit-4.2.173 → django_restit-4.2.174}/location/migrations/0004_remove_address_modified_by_address_group_and_more.py +0 -0
  150. {django_restit-4.2.173 → django_restit-4.2.174}/location/migrations/__init__.py +0 -0
  151. {django_restit-4.2.173 → django_restit-4.2.174}/location/models/__init__.py +0 -0
  152. {django_restit-4.2.173 → django_restit-4.2.174}/location/models/address.py +0 -0
  153. {django_restit-4.2.173 → django_restit-4.2.174}/location/models/ip.py +0 -0
  154. {django_restit-4.2.173 → django_restit-4.2.174}/location/models/legacy.py +0 -0
  155. {django_restit-4.2.173 → django_restit-4.2.174}/location/models/location.py +0 -0
  156. {django_restit-4.2.173 → django_restit-4.2.174}/location/models/track.py +0 -0
  157. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/__init__.py +0 -0
  158. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/iplookup/__init__.py +0 -0
  159. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/iplookup/abstractapi.py +0 -0
  160. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/iplookup/abuse.py +0 -0
  161. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/iplookup/extremeip.py +0 -0
  162. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/iplookup/geoplugin.py +0 -0
  163. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/iplookup/ipapi.py +0 -0
  164. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/iplookup/ipinfo.py +0 -0
  165. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/iplookup/restit.py +0 -0
  166. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/location/__init__.py +0 -0
  167. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/location/google.py +0 -0
  168. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/timezones/__init__.py +0 -0
  169. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/timezones/google.py +0 -0
  170. {django_restit-4.2.173 → django_restit-4.2.174}/location/providers/zillow.py +0 -0
  171. {django_restit-4.2.173 → django_restit-4.2.174}/location/rpc/__init__.py +0 -0
  172. {django_restit-4.2.173 → django_restit-4.2.174}/location/rpc/address.py +0 -0
  173. {django_restit-4.2.173 → django_restit-4.2.174}/location/rpc/ip.py +0 -0
  174. {django_restit-4.2.173 → django_restit-4.2.174}/location/rpc/location.py +0 -0
  175. {django_restit-4.2.173 → django_restit-4.2.174}/location/rpc/track.py +0 -0
  176. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/__init__.py +0 -0
  177. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/admin.py +0 -0
  178. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/caching.py +0 -0
  179. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/cvutil/__init__.py +0 -0
  180. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/cvutil/contours.py +0 -0
  181. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/cvutil/images.py +0 -0
  182. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/cvutil/misc.py +0 -0
  183. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/cvutil/text.py +0 -0
  184. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/fixtures/initial_data.json +0 -0
  185. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/fixtures/medialib.json +0 -0
  186. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/fixtures/medialib_test_fixture.json +0 -0
  187. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/forms.py +0 -0
  188. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/migrations/0001_initial.py +0 -0
  189. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/migrations/0002_alter_mediaitemrendition_bytes.py +0 -0
  190. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/migrations/__init__.py +0 -0
  191. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/models.py +0 -0
  192. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/ocr.py +0 -0
  193. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/pdf.py +0 -0
  194. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/qrcode.py +0 -0
  195. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/__init__.py +0 -0
  196. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/engines/__init__.py +0 -0
  197. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/engines/anigif.py +0 -0
  198. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/engines/ffmpeg.py +0 -0
  199. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/engines/gifsicle.py +0 -0
  200. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/engines/hls.py +0 -0
  201. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/engines/mp4box.py +0 -0
  202. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/engines/rtmp/Makefile +0 -0
  203. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/engines/rtmp/__init__.py +0 -0
  204. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/engines/rtmp/rtmp.i +0 -0
  205. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/engines/rtmpdump.py +0 -0
  206. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/engines/rtmpsink.py +0 -0
  207. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/engines/video_getinfo.py +0 -0
  208. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/engines/websnap.py +0 -0
  209. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/exceptions.py +0 -0
  210. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/presets/__init__.py +0 -0
  211. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/presets/akamai.py +0 -0
  212. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/presets/animated_thumbnail.py +0 -0
  213. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/presets/ffmpeg.py +0 -0
  214. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/presets/flv.py +0 -0
  215. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/presets/hls.py +0 -0
  216. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/presets/image_transcode.py +0 -0
  217. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/presets/image_validate.py +0 -0
  218. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/presets/mp4.py +0 -0
  219. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/presets/video_still.py +0 -0
  220. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/presets/video_validate.py +0 -0
  221. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/presets/websnap.py +0 -0
  222. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/presets/youtube.py +0 -0
  223. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/render_utils.py +0 -0
  224. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/render/schedule.py +0 -0
  225. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/rpc/__init__.py +0 -0
  226. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/rpc/legacy.py +0 -0
  227. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/rpc/media.py +0 -0
  228. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/rpc/tools.py +0 -0
  229. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/scripts/init_config +0 -0
  230. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/css/base_medialibui.css +0 -0
  231. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/css/base_widgets.css +0 -0
  232. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/css/jquery.jcrop.css +0 -0
  233. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/arrow-down-white.png +0 -0
  234. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/bg-body.gif +0 -0
  235. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/cancel.gif +0 -0
  236. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/icon-generic.gif +0 -0
  237. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/icon-image.gif +0 -0
  238. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/icon-media.gif +0 -0
  239. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/icon-zip.gif +0 -0
  240. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/loading.gif +0 -0
  241. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/noimage.gif +0 -0
  242. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/render_err.gif +0 -0
  243. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/rendering.gif +0 -0
  244. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/star_off.png +0 -0
  245. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/star_on.png +0 -0
  246. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/img/unknown.gif +0 -0
  247. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/lib/caman.full.js +0 -0
  248. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/lib/hammer.min.js +0 -0
  249. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/lib/jquery.Jcrop.js +0 -0
  250. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/lib/jquery.hammer.js +0 -0
  251. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/lib/load-image.min.js +0 -0
  252. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/lib/swiper.js +0 -0
  253. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/lib/tinymce/plugins/medialib/editor_plugin.js +0 -0
  254. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/lib/tinymce/plugins/medialib/editor_plugin_src.js +0 -0
  255. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/lib/tinymce/plugins/medialib/js/dialog.js +0 -0
  256. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/static/lib/tinymce/plugins/medialib/medialib.html +0 -0
  257. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/__init__.py +0 -0
  258. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/apiclient/__init__.py +0 -0
  259. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/apiclient/channel.py +0 -0
  260. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/apiclient/discovery.py +0 -0
  261. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/apiclient/errors.py +0 -0
  262. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/apiclient/http.py +0 -0
  263. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/apiclient/mimeparse.py +0 -0
  264. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/apiclient/model.py +0 -0
  265. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/apiclient/sample_tools.py +0 -0
  266. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/apiclient/schema.py +0 -0
  267. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/filestore.py +0 -0
  268. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/httplib2/__init__.py +0 -0
  269. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/httplib2/cacerts.txt +0 -0
  270. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/httplib2/iri2uri.py +0 -0
  271. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/httplib2/socks.py +0 -0
  272. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/httpstore.py +0 -0
  273. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/nullstore.py +0 -0
  274. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/__init__.py +0 -0
  275. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/anyjson.py +0 -0
  276. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/appengine.py +0 -0
  277. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/client.py +0 -0
  278. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/clientsecrets.py +0 -0
  279. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/crypt.py +0 -0
  280. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/django_orm.py +0 -0
  281. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/file.py +0 -0
  282. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/gce.py +0 -0
  283. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/keyring_storage.py +0 -0
  284. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/locked_file.py +0 -0
  285. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/multistore_file.py +0 -0
  286. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/old_run.py +0 -0
  287. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/tools.py +0 -0
  288. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/util.py +0 -0
  289. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/oauth2client/xsrfutil.py +0 -0
  290. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/rtmpstore.py +0 -0
  291. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/s3.py +0 -0
  292. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/s3store.py +0 -0
  293. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/uritemplate/__init__.py +0 -0
  294. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/stores/youtubestore.py +0 -0
  295. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/base.html +0 -0
  296. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/instances.html +0 -0
  297. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/items.html +0 -0
  298. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/library.html +0 -0
  299. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/notify_error.subject +0 -0
  300. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/notify_error.to +0 -0
  301. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/notify_error.txt +0 -0
  302. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/notify_ready.subject +0 -0
  303. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/notify_ready.to +0 -0
  304. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/notify_ready.txt +0 -0
  305. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/notify_render_error.subject +0 -0
  306. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/notify_render_error.to +0 -0
  307. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/notify_render_error.txt +0 -0
  308. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/notify_validate_error.subject +0 -0
  309. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/notify_validate_error.to +0 -0
  310. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/notify_validate_error.txt +0 -0
  311. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/smil +0 -0
  312. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/test.html +0 -0
  313. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/templates/medialib/testpicker.html +0 -0
  314. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/tests.py +0 -0
  315. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/tq.py +0 -0
  316. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/urls.py +0 -0
  317. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/utils.py +0 -0
  318. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/views.py +0 -0
  319. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/__init__.py +0 -0
  320. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/apiclient/__init__.py +0 -0
  321. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/apiclient/channel.py +0 -0
  322. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/apiclient/discovery.py +0 -0
  323. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/apiclient/errors.py +0 -0
  324. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/apiclient/http.py +0 -0
  325. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/apiclient/mimeparse.py +0 -0
  326. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/apiclient/model.py +0 -0
  327. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/apiclient/sample_tools.py +0 -0
  328. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/apiclient/schema.py +0 -0
  329. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/httplib2/__init__.py +0 -0
  330. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/httplib2/cacerts.txt +0 -0
  331. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/httplib2/iri2uri.py +0 -0
  332. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/httplib2/socks.py +0 -0
  333. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/__init__.py +0 -0
  334. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/anyjson.py +0 -0
  335. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/appengine.py +0 -0
  336. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/client.py +0 -0
  337. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/clientsecrets.py +0 -0
  338. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/crypt.py +0 -0
  339. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/django_orm.py +0 -0
  340. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/file.py +0 -0
  341. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/gce.py +0 -0
  342. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/keyring_storage.py +0 -0
  343. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/locked_file.py +0 -0
  344. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/multistore_file.py +0 -0
  345. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/old_run.py +0 -0
  346. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/tools.py +0 -0
  347. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/util.py +0 -0
  348. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/oauth2client/xsrfutil.py +0 -0
  349. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/upload.py +0 -0
  350. {django_restit-4.2.173 → django_restit-4.2.174}/medialib/youtube/uritemplate/__init__.py +0 -0
  351. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/README.md +0 -0
  352. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/__init__.py +0 -0
  353. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/client.py +0 -0
  354. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/eod.py +0 -0
  355. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/examples/eod_example.py +0 -0
  356. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/management/__init__.py +0 -0
  357. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/management/commands/__init__.py +0 -0
  358. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/management/commands/delete_gauge.py +0 -0
  359. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/management/commands/delete_metric.py +0 -0
  360. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/management/commands/fix_redis_metrics_keys.py +0 -0
  361. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/management/commands/generate_test_metrics.py +0 -0
  362. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/management/commands/redis_metrics_send_mail.py +0 -0
  363. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/management/commands/reset_weekly_metrics.py +0 -0
  364. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/management/commands/system_metric.py +0 -0
  365. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/migrations/0001_initial.py +0 -0
  366. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/migrations/0002_metrics_k11_metrics_k12_metrics_k13_metrics_k14_and_more.py +0 -0
  367. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/migrations/0003_metrics_expires.py +0 -0
  368. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/migrations/0004_eodmetrics.py +0 -0
  369. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/migrations/0005_alter_metrics_v1_alter_metrics_v10_alter_metrics_v11_and_more.py +0 -0
  370. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/migrations/__init__.py +0 -0
  371. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/periodic.py +0 -0
  372. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/providers/__init__.py +0 -0
  373. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/providers/aws.py +0 -0
  374. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/rpc.py +0 -0
  375. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/settings.py +0 -0
  376. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/tq.py +0 -0
  377. {django_restit-4.2.173 → django_restit-4.2.174}/metrics/utils.py +0 -0
  378. {django_restit-4.2.173 → django_restit-4.2.174}/pushit/__init__.py +0 -0
  379. {django_restit-4.2.173 → django_restit-4.2.174}/pushit/admin.py +0 -0
  380. {django_restit-4.2.173 → django_restit-4.2.174}/pushit/migrations/0001_initial.py +0 -0
  381. {django_restit-4.2.173 → django_restit-4.2.174}/pushit/migrations/__init__.py +0 -0
  382. {django_restit-4.2.173 → django_restit-4.2.174}/pushit/models.py +0 -0
  383. {django_restit-4.2.173 → django_restit-4.2.174}/pushit/rpc/__init__.py +0 -0
  384. {django_restit-4.2.173 → django_restit-4.2.174}/pushit/rpc/githooks.py +0 -0
  385. {django_restit-4.2.173 → django_restit-4.2.174}/pushit/rpc/legacy.py +0 -0
  386. {django_restit-4.2.173 → django_restit-4.2.174}/pushit/rpc/products.py +0 -0
  387. {django_restit-4.2.173 → django_restit-4.2.174}/pushit/static/js/models_pushit.js +0 -0
  388. {django_restit-4.2.173 → django_restit-4.2.174}/pushit/tq.py +0 -0
  389. {django_restit-4.2.173 → django_restit-4.2.174}/pushit/utils.py +0 -0
  390. {django_restit-4.2.173 → django_restit-4.2.174}/rest/.gitignore +0 -0
  391. {django_restit-4.2.173 → django_restit-4.2.174}/rest/README.md +0 -0
  392. {django_restit-4.2.173 → django_restit-4.2.174}/rest/RemoteEvents.py +0 -0
  393. {django_restit-4.2.173 → django_restit-4.2.174}/rest/arc4.py +0 -0
  394. {django_restit-4.2.173 → django_restit-4.2.174}/rest/cache.py +0 -0
  395. {django_restit-4.2.173 → django_restit-4.2.174}/rest/crypto/__init__.py +0 -0
  396. {django_restit-4.2.173 → django_restit-4.2.174}/rest/crypto/aes.py +0 -0
  397. {django_restit-4.2.173 → django_restit-4.2.174}/rest/crypto/privpub.py +0 -0
  398. {django_restit-4.2.173 → django_restit-4.2.174}/rest/crypto/util.py +0 -0
  399. {django_restit-4.2.173 → django_restit-4.2.174}/rest/datem.py +0 -0
  400. {django_restit-4.2.173 → django_restit-4.2.174}/rest/decorators.py +0 -0
  401. {django_restit-4.2.173 → django_restit-4.2.174}/rest/encryption.py +0 -0
  402. {django_restit-4.2.173 → django_restit-4.2.174}/rest/errors.py +0 -0
  403. {django_restit-4.2.173 → django_restit-4.2.174}/rest/extra/__init__.py +0 -0
  404. {django_restit-4.2.173 → django_restit-4.2.174}/rest/extra/hostinfo.py +0 -0
  405. {django_restit-4.2.173 → django_restit-4.2.174}/rest/extra/json_metadata.py +0 -0
  406. {django_restit-4.2.173 → django_restit-4.2.174}/rest/fields.py +0 -0
  407. {django_restit-4.2.173 → django_restit-4.2.174}/rest/forms.py +0 -0
  408. {django_restit-4.2.173 → django_restit-4.2.174}/rest/helpers.py +0 -0
  409. {django_restit-4.2.173 → django_restit-4.2.174}/rest/joke.py +0 -0
  410. {django_restit-4.2.173 → django_restit-4.2.174}/rest/jwtoken.py +0 -0
  411. {django_restit-4.2.173 → django_restit-4.2.174}/rest/log.py +0 -0
  412. {django_restit-4.2.173 → django_restit-4.2.174}/rest/mail.py +0 -0
  413. {django_restit-4.2.173 → django_restit-4.2.174}/rest/mailman.py +0 -0
  414. {django_restit-4.2.173 → django_restit-4.2.174}/rest/management/__init__.py +0 -0
  415. {django_restit-4.2.173 → django_restit-4.2.174}/rest/management/commands/__init__.py +0 -0
  416. {django_restit-4.2.173 → django_restit-4.2.174}/rest/management/commands/rpc.py +0 -0
  417. {django_restit-4.2.173 → django_restit-4.2.174}/rest/middleware/__init__.py +0 -0
  418. {django_restit-4.2.173 → django_restit-4.2.174}/rest/middleware/cors.py +0 -0
  419. {django_restit-4.2.173 → django_restit-4.2.174}/rest/middleware/db_router.py +0 -0
  420. {django_restit-4.2.173 → django_restit-4.2.174}/rest/middleware/jwt.py +0 -0
  421. {django_restit-4.2.173 → django_restit-4.2.174}/rest/middleware/request.py +0 -0
  422. {django_restit-4.2.173 → django_restit-4.2.174}/rest/middleware/session.py +0 -0
  423. {django_restit-4.2.173 → django_restit-4.2.174}/rest/middleware/session_store.py +0 -0
  424. {django_restit-4.2.173 → django_restit-4.2.174}/rest/models/__init__.py +0 -0
  425. {django_restit-4.2.173 → django_restit-4.2.174}/rest/models/cacher.py +0 -0
  426. {django_restit-4.2.173 → django_restit-4.2.174}/rest/models/metadata.py +0 -0
  427. {django_restit-4.2.173 → django_restit-4.2.174}/rest/net.py +0 -0
  428. {django_restit-4.2.173 → django_restit-4.2.174}/rest/regexes.yaml +0 -0
  429. {django_restit-4.2.173 → django_restit-4.2.174}/rest/rpc.py +0 -0
  430. {django_restit-4.2.173 → django_restit-4.2.174}/rest/search.py +0 -0
  431. {django_restit-4.2.173 → django_restit-4.2.174}/rest/serializers/__init__.py +0 -0
  432. {django_restit-4.2.173 → django_restit-4.2.174}/rest/serializers/collection.py +0 -0
  433. {django_restit-4.2.173 → django_restit-4.2.174}/rest/serializers/csv.py +0 -0
  434. {django_restit-4.2.173 → django_restit-4.2.174}/rest/serializers/excel.py +0 -0
  435. {django_restit-4.2.173 → django_restit-4.2.174}/rest/serializers/json.py +0 -0
  436. {django_restit-4.2.173 → django_restit-4.2.174}/rest/serializers/legacy.py +0 -0
  437. {django_restit-4.2.173 → django_restit-4.2.174}/rest/serializers/localizers.py +0 -0
  438. {django_restit-4.2.173 → django_restit-4.2.174}/rest/serializers/model.py +0 -0
  439. {django_restit-4.2.173 → django_restit-4.2.174}/rest/serializers/profiler.py +0 -0
  440. {django_restit-4.2.173 → django_restit-4.2.174}/rest/serializers/util.py +0 -0
  441. {django_restit-4.2.173 → django_restit-4.2.174}/rest/settings_helper.py +0 -0
  442. {django_restit-4.2.173 → django_restit-4.2.174}/rest/ssl_check.py +0 -0
  443. {django_restit-4.2.173 → django_restit-4.2.174}/rest/static/lib/jquery.js +0 -0
  444. {django_restit-4.2.173 → django_restit-4.2.174}/rest/static/rest/app.css +0 -0
  445. {django_restit-4.2.173 → django_restit-4.2.174}/rest/static/rest/app.js +0 -0
  446. {django_restit-4.2.173 → django_restit-4.2.174}/rest/static/rest/rest.js +0 -0
  447. {django_restit-4.2.173 → django_restit-4.2.174}/rest/static/rest/rest.scss +0 -0
  448. {django_restit-4.2.173 → django_restit-4.2.174}/rest/templates/email/error.html +0 -0
  449. {django_restit-4.2.173 → django_restit-4.2.174}/rest/templates/email/error.subject +0 -0
  450. {django_restit-4.2.173 → django_restit-4.2.174}/rest/templates/rest_docs.html +0 -0
  451. {django_restit-4.2.173 → django_restit-4.2.174}/rest/templates/rest_html.html +0 -0
  452. {django_restit-4.2.173 → django_restit-4.2.174}/rest/ua.py +0 -0
  453. {django_restit-4.2.173 → django_restit-4.2.174}/rest/uberdict.py +0 -0
  454. {django_restit-4.2.173 → django_restit-4.2.174}/rest/url_docs.py +0 -0
  455. {django_restit-4.2.173 → django_restit-4.2.174}/rest/views.py +0 -0
  456. {django_restit-4.2.173 → django_restit-4.2.174}/sessionlog/.gitignore +0 -0
  457. {django_restit-4.2.173 → django_restit-4.2.174}/sessionlog/README.md +0 -0
  458. {django_restit-4.2.173 → django_restit-4.2.174}/sessionlog/__init__.py +0 -0
  459. {django_restit-4.2.173 → django_restit-4.2.174}/sessionlog/admin.py +0 -0
  460. {django_restit-4.2.173 → django_restit-4.2.174}/sessionlog/migrations/0001_initial.py +0 -0
  461. {django_restit-4.2.173 → django_restit-4.2.174}/sessionlog/migrations/__init__.py +0 -0
  462. {django_restit-4.2.173 → django_restit-4.2.174}/sessionlog/models.py +0 -0
  463. {django_restit-4.2.173 → django_restit-4.2.174}/sessionlog/tests.py +0 -0
  464. {django_restit-4.2.173 → django_restit-4.2.174}/sessionlog/views.py +0 -0
  465. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/README.md +0 -0
  466. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/__init__.py +0 -0
  467. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/admin.py +0 -0
  468. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/migrations/0001_initial.py +0 -0
  469. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/migrations/__init__.py +0 -0
  470. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/models.py +0 -0
  471. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/periodic.py +0 -0
  472. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/rpc.py +0 -0
  473. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/tq.py +0 -0
  474. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/transports/__init__.py +0 -0
  475. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/transports/email.py +0 -0
  476. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/transports/http.py +0 -0
  477. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/transports/s3.py +0 -0
  478. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/transports/sftp.py +0 -0
  479. {django_restit-4.2.173 → django_restit-4.2.174}/taskqueue/transports/sms.py +0 -0
  480. {django_restit-4.2.173 → django_restit-4.2.174}/telephony/__init__.py +0 -0
  481. {django_restit-4.2.173 → django_restit-4.2.174}/telephony/admin.py +0 -0
  482. {django_restit-4.2.173 → django_restit-4.2.174}/telephony/decorators.py +0 -0
  483. {django_restit-4.2.173 → django_restit-4.2.174}/telephony/migrations/0001_initial.py +0 -0
  484. {django_restit-4.2.173 → django_restit-4.2.174}/telephony/migrations/0002_alter_sms_sid.py +0 -0
  485. {django_restit-4.2.173 → django_restit-4.2.174}/telephony/migrations/__init__.py +0 -0
  486. {django_restit-4.2.173 → django_restit-4.2.174}/telephony/models.py +0 -0
  487. {django_restit-4.2.173 → django_restit-4.2.174}/telephony/phone_util.py +0 -0
  488. {django_restit-4.2.173 → django_restit-4.2.174}/telephony/rpc.py +0 -0
  489. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/__init__.py +0 -0
  490. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/migrations/0001_initial.py +0 -0
  491. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/migrations/0002_alter_pagemedia_entry.py +0 -0
  492. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/migrations/0003_page_perms.py +0 -0
  493. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/migrations/__init__.py +0 -0
  494. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/models/__init__.py +0 -0
  495. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/models/faq.py +0 -0
  496. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/models/page.py +0 -0
  497. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/models/revision.py +0 -0
  498. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/periodic.py +0 -0
  499. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/renderers/__init__.py +0 -0
  500. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/renderers/mistune/__init__.py +0 -0
  501. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/renderers/mistune/highlight.py +0 -0
  502. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/renderers/mistune/math.py +0 -0
  503. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/renderers/mistune/media.py +0 -0
  504. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/renderers/mistune/meta.py +0 -0
  505. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/renderers/mistune/task_list.py +0 -0
  506. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/renderers/mistune/toc.py +0 -0
  507. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/rpc/__init__.py +0 -0
  508. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/rpc/wiki.py +0 -0
  509. {django_restit-4.2.173 → django_restit-4.2.174}/wiki/tq.py +0 -0
  510. {django_restit-4.2.173 → django_restit-4.2.174}/ws4redis/README.md +0 -0
  511. {django_restit-4.2.173 → django_restit-4.2.174}/ws4redis/__init__.py +0 -0
  512. {django_restit-4.2.173 → django_restit-4.2.174}/ws4redis/client.py +0 -0
  513. {django_restit-4.2.173 → django_restit-4.2.174}/ws4redis/connection.py +0 -0
  514. {django_restit-4.2.173 → django_restit-4.2.174}/ws4redis/exceptions.py +0 -0
  515. {django_restit-4.2.173 → django_restit-4.2.174}/ws4redis/redis.py +0 -0
  516. {django_restit-4.2.173 → django_restit-4.2.174}/ws4redis/servers/__init__.py +0 -0
  517. {django_restit-4.2.173 → django_restit-4.2.174}/ws4redis/servers/base.py +0 -0
  518. {django_restit-4.2.173 → django_restit-4.2.174}/ws4redis/servers/django.py +0 -0
  519. {django_restit-4.2.173 → django_restit-4.2.174}/ws4redis/servers/uwsgi.py +0 -0
  520. {django_restit-4.2.173 → django_restit-4.2.174}/ws4redis/settings.py +0 -0
  521. {django_restit-4.2.173 → django_restit-4.2.174}/ws4redis/utf8validator.py +0 -0
  522. {django_restit-4.2.173 → django_restit-4.2.174}/ws4redis/websocket.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: django-restit
3
- Version: 4.2.173
3
+ Version: 4.2.174
4
4
  Summary: A Rest Framework for DJANGO
5
5
  License: MIT
6
6
  Author: Ian Starnes
@@ -118,6 +118,7 @@ class Group(models.Model, RestModel, MetaDataModel):
118
118
  "kind",
119
119
  ("metadata__timezone", "timezone"),
120
120
  ("metadata__eod", "end_of_day"),
121
+ ("parent__pk", "parent_id"),
121
122
  ("parent__name", "parent"),
122
123
  ("location.line1", "address_line1"),
123
124
  ("location.line2", "address_line2"),
@@ -171,7 +172,7 @@ class Group(models.Model, RestModel, MetaDataModel):
171
172
  if item:
172
173
  return item.thumbnail_url()
173
174
  return None
174
-
175
+
175
176
  @classmethod
176
177
  def on_rest_list_filter(cls, request, qset=None):
177
178
  if not request.member.hasPermission("view_all_groups"):
@@ -231,7 +232,7 @@ class Group(models.Model, RestModel, MetaDataModel):
231
232
  raise RestValidationError("cannot set self as parent", 1101)
232
233
  value = Group.objects.filter(pk=value).last()
233
234
  self.parent = value
234
-
235
+
235
236
  def set_child_of(self, value):
236
237
  # this is a helper to add this group to another group
237
238
  parent = Group.objects.filter(pk=value).last()
@@ -321,7 +322,7 @@ class Group(models.Model, RestModel, MetaDataModel):
321
322
  return True
322
323
  return False
323
324
 
324
- def notifyMembers(self, subject, message=None, template=None, context=None,
325
+ def notifyMembers(self, subject, message=None, template=None, context=None,
325
326
  email_only=False, sms_msg=None, perms=None, force=False,
326
327
  from_email=None, exclude_member=None):
327
328
  if perms is not None:
@@ -436,19 +437,19 @@ class Group(models.Model, RestModel, MetaDataModel):
436
437
  qset = self.memberships.filter(state__gte=-10)
437
438
  if perms:
438
439
  qset = qset.filter(
439
- Q(properties__category="permissions",
440
- properties__key__in=perms,
441
- properties__value__in=TRUE_VALUES) |
442
- Q(member__properties__category="permissions",
443
- member__properties__key__in=perms,
440
+ Q(properties__category="permissions",
441
+ properties__key__in=perms,
442
+ properties__value__in=TRUE_VALUES) |
443
+ Q(member__properties__category="permissions",
444
+ member__properties__key__in=perms,
444
445
  member__properties__value__in=TRUE_VALUES))
445
446
  if notify:
446
447
  qset = qset.filter(
447
- Q(properties__category="notify",
448
- properties__key__in=notify,
449
- properties__value__in=TRUE_VALUES) |
450
- Q(member__properties__category="notify",
451
- member__properties__key__in=notify,
448
+ Q(properties__category="notify",
449
+ properties__key__in=notify,
450
+ properties__value__in=TRUE_VALUES) |
451
+ Q(member__properties__category="notify",
452
+ member__properties__key__in=notify,
452
453
  member__properties__value__in=TRUE_VALUES))
453
454
 
454
455
  if role:
@@ -495,7 +496,7 @@ class Group(models.Model, RestModel, MetaDataModel):
495
496
  # enable again?
496
497
  ms.set_state(0)
497
498
  ms.save()
498
-
499
+
499
500
  if MEMBERSHIP_ROLES:
500
501
  perms = MEMBERSHIP_ROLES.get(role, [])
501
502
  for k in perms:
@@ -601,12 +602,8 @@ class Group(models.Model, RestModel, MetaDataModel):
601
602
  if credentials.kind == "member":
602
603
  if msg.pk is not None:
603
604
  return credentials.instance.isMemberOf(msg.pk)
604
- return False
605
+ return False
605
606
 
606
607
 
607
608
  class GroupMetaData(MetaDataBase):
608
609
  parent = models.ForeignKey(Group, related_name="properties", on_delete=models.CASCADE)
609
-
610
-
611
-
612
-
@@ -55,10 +55,11 @@ class PersistentLog(models.Model, RestModel):
55
55
  class RestMeta:
56
56
  DEFAULT_SORT = "-when"
57
57
  CAN_SAVE = False
58
+ ESTIMATE_COUNTS = True
58
59
  GROUP_FIELD = None # do this so when we sort by group it is always exact
59
60
  QUERY_FIELDS = [
60
- "level", "component", "pkey", "action",
61
- "request_method", "request_path",
61
+ "level", "component", "pkey", "action",
62
+ "request_method", "request_path",
62
63
  "session__ip", "user",
63
64
  "tid", "group", "user__username"]
64
65
  SEARCH_FIELDS = ["user__username", "user__last_name", "message", "session__ip", "request_path"]
@@ -18,8 +18,8 @@ INCIDENT_EVENT_GRANULARITY = settings.get("INCIDENT_EVENT_GRANULARITY", "hourly"
18
18
  EVENT_TO_INCIDENT_LEVEL = settings.get("EVENT_TO_INCIDENT_LEVEL", 4)
19
19
  EVENT_DETAIL_TEMPLATES = settings.get("EVENT_DETAIL_TEMPLATES", None)
20
20
  EVENT_META_KEYWORDS = settings.get("EVENT_META_KEYWORDS", [
21
- "path", "ip", "reporter_ip", "code",
22
- "reason", "buid", "merchant", "tid",
21
+ "path", "ip", "reporter_ip", "code",
22
+ "reason", "buid", "merchant", "tid",
23
23
  "group", "http_user_agent", "user_agent",
24
24
  "app_url", "isp", "city", "state", "country",
25
25
  "username"
@@ -28,7 +28,7 @@ EVENT_META_KEYWORDS = settings.get("EVENT_META_KEYWORDS", [
28
28
  logger = log.getLogger("incident", filename="incident.log")
29
29
 
30
30
  """
31
- very generic
31
+ very generic
32
32
  external system can post an event
33
33
  {
34
34
  "description": "Critical Test Event",
@@ -77,15 +77,15 @@ class Event(JSONMetaData, rm.RestModel):
77
77
  # code = models.IntegerField(default=0, db_index=True)
78
78
 
79
79
  group = models.ForeignKey(
80
- "account.Group", on_delete=models.SET_NULL,
80
+ "account.Group", on_delete=models.SET_NULL,
81
81
  related_name="+", null=True, default=None)
82
-
82
+
83
83
  component = models.SlugField(max_length=250, null=True, blank=True, default=None)
84
84
  component_id = models.IntegerField(null=True, blank=True, default=None)
85
85
 
86
86
  # this allows us to bundle multiple events to an incident
87
87
  incident = models.ForeignKey(
88
- Incident, null=True, default=None,
88
+ Incident, null=True, default=None,
89
89
  related_name="events", on_delete=models.SET_NULL)
90
90
 
91
91
  def runRules(self):
@@ -170,14 +170,14 @@ class Event(JSONMetaData, rm.RestModel):
170
170
  # logger.info(f"ignore event {self.pk} {self.description}")
171
171
  return
172
172
 
173
- # always create an incident
173
+ # always create an incident
174
174
  if incident is None:
175
175
  incident = Incident(
176
176
  rule=hit_rule, priority=priority,
177
177
  reporter_ip=self.reporter_ip,
178
178
  category=self.category,
179
179
  group=self.group,
180
- component=self.component,
180
+ component=self.component,
181
181
  component_id=self.component_id,
182
182
  hostname=self.hostname)
183
183
  if self.group is None and hit_rule is not None:
@@ -211,4 +211,3 @@ class Event(JSONMetaData, rm.RestModel):
211
211
  incident.triggerAction()
212
212
  except Exception:
213
213
  logger.exception()
214
-
@@ -92,7 +92,7 @@ class Incident(models.Model, rm.RestModel, rm.MetaDataModel):
92
92
 
93
93
  group = models.ForeignKey("account.Group", on_delete=models.SET_NULL, null=True, default=None)
94
94
  assigned_to = models.ForeignKey("account.Member", on_delete=models.SET_NULL, null=True, default=None)
95
-
95
+
96
96
  priority = models.IntegerField(default=0) # 1-10, 1 being the highest
97
97
  # 0=new, 1=opened, 2=paused, 3=ignore, 4=resolved, 5=pending
98
98
  state = models.IntegerField(default=0, choices=INCIDENT_STATES)
@@ -160,7 +160,7 @@ class Incident(models.Model, rm.RestModel, rm.MetaDataModel):
160
160
 
161
161
  if event.details:
162
162
  self.setProperty("details", event.details)
163
-
163
+
164
164
  if event.metadata.geoip and event.metadata.geoip.city:
165
165
  self.setProperty("city", event.metadata.geoip.city)
166
166
  self.setProperty("state", event.metadata.geoip.state)
@@ -209,7 +209,7 @@ class Incident(models.Model, rm.RestModel, rm.MetaDataModel):
209
209
  self.save()
210
210
  elif self.rule.action.startswith("firewall_block"):
211
211
  if settings.FIREWALL_GLOBAL_BLOCK:
212
- Task.Publish("incident", "firewall_block",
212
+ Task.Publish("incident", "firewall_block",
213
213
  dict(ip=self.reporter_ip),
214
214
  channel="tq_broadcast")
215
215
 
@@ -348,7 +348,7 @@ class Incident(models.Model, rm.RestModel, rm.MetaDataModel):
348
348
  member.sendSMS(sms_msg)
349
349
  members = group.getMembers(perms=email_perms, as_member=True)
350
350
  for member in members:
351
- member.sendEmail(subject, body)
351
+ member.sendEmail(subject, body)
352
352
 
353
353
  def notifyWith(self, perm):
354
354
  # logger.info("notifyWith", perm)
@@ -407,7 +407,7 @@ class Incident(models.Model, rm.RestModel, rm.MetaDataModel):
407
407
  if request != None and "DATA" in request and "note" in request.DATA:
408
408
  self.logHistory(kind="note", note=request.DATA.get("note"), request=request)
409
409
 
410
- def logHistory(self, kind="history", note=None, media=None,
410
+ def logHistory(self, kind="history", note=None, media=None,
411
411
  request=None, member=None, notify=True):
412
412
  if request is None:
413
413
  request = self.getActiveRequest()
@@ -493,7 +493,7 @@ class Incident(models.Model, rm.RestModel, rm.MetaDataModel):
493
493
  email_only=True,
494
494
  from_email=INCIDENT_EMAIL_FROM)
495
495
  else:
496
- # notitfy everyone but the sender
496
+ # notitfy everyone but the sender
497
497
  if history.by is None:
498
498
  members = Member.GetWithPermission(perm, ignore_disabled_email=True).exclude(pk=history.by.pk)
499
499
  if members.count() == 0:
@@ -46,8 +46,8 @@ class ServerOssecAlert(models.Model, rm.RestModel):
46
46
  level = models.IntegerField(default=0)
47
47
  title = models.CharField(max_length=200, blank=True, null=True, default=None)
48
48
  geoip = models.ForeignKey("location.GeoIP", blank=True, null=True, default=None, on_delete=models.DO_NOTHING)
49
-
49
+
50
50
  metadata = None
51
-
51
+
52
52
  def __str__(self):
53
53
  return f'{self.hostname}: {self.title}'
@@ -43,14 +43,14 @@ def metric(
43
43
  elif granularity in ["minutes", "seconds"]:
44
44
  expires = datetime.now() + timedelta(days=7)
45
45
  m, created = Metrics.objects.get_or_create(
46
- uuid=key,
46
+ uuid=key,
47
47
  defaults=dict(
48
48
  granularity=granularity, slug=slug, expires=expires,
49
49
  group=group, start=utils.date_for_granulatiry(date, granularity)))
50
50
  m.updateMetrics(keys, data, created)
51
51
 
52
52
 
53
- def gauge(slug, keys, data, granularity="daily", group=None, date=None,
53
+ def gauge(slug, keys, data, granularity="daily", group=None, date=None,
54
54
  timezone=None, slug_append=None, max_granularity=None):
55
55
  # guage does not accumulate but just stores the data like a cache
56
56
  # if calledf on the same time period it will just update the current numbers
@@ -72,7 +72,7 @@ def gauge(slug, keys, data, granularity="daily", group=None, date=None,
72
72
  elif gran == "daily":
73
73
  expires = datetime.now() + timedelta(days=METRICS_EXPIRE_DAILY)
74
74
  m, created = Metrics.objects.get_or_create(
75
- uuid=key,
75
+ uuid=key,
76
76
  defaults=dict(
77
77
  granularity=gran, slug=slug, expires=expires,
78
78
  group=group, start=utils.date_for_granulatiry(date, gran)))
@@ -99,7 +99,7 @@ def get_qset(slug, granularity, start=None, end=None,
99
99
  start = group.getLocalTime(start)
100
100
  elif settings.METRICS_TIMEZONE:
101
101
  start = date_util.convertToLocalTime(settings.METRICS_TIMEZONE, start)
102
-
102
+
103
103
  start = utils.date_for_granulatiry(start, granularity)
104
104
  if end is None:
105
105
  if granularity == "hourly":
@@ -133,7 +133,7 @@ def get_totals(slug, keys, granularity, start=None, end=None, group=None):
133
133
  start = group.getLocalTime(start)
134
134
  elif settings.METRICS_TIMEZONE:
135
135
  start = date_util.convertToLocalTime(settings.METRICS_TIMEZONE, start)
136
-
136
+
137
137
  start = utils.date_for_granulatiry(start, granularity)
138
138
  if end is None:
139
139
  end = start + timedelta(minutes=5)
@@ -141,7 +141,7 @@ def get_totals(slug, keys, granularity, start=None, end=None, group=None):
141
141
  end = group.getLocalTime(end)
142
142
  elif settings.METRICS_TIMEZONE:
143
143
  end = date_util.convertToLocalTime(settings.METRICS_TIMEZONE, end)
144
-
144
+
145
145
  qset = Metrics.objects.filter(
146
146
  slug=slug, granularity=granularity,
147
147
  group=group, start__gte=start, start__lte=end)
@@ -162,7 +162,7 @@ def get_metric(slug, granularity, start, group=None):
162
162
  start = group.getLocalTime(start)
163
163
  elif settings.METRICS_TIMEZONE:
164
164
  start = date_util.convertToLocalTime(settings.METRICS_TIMEZONE, start)
165
-
165
+
166
166
  start = utils.date_for_granulatiry(start, granularity)
167
167
  qset = Metrics.objects.filter(
168
168
  slug=slug, granularity=granularity, start__gte=start, start__lte=start, group=group)
@@ -226,7 +226,7 @@ def get_metrics(slug, granularity, start, end=None, group=None, samples=None):
226
226
  for k in keys:
227
227
  data[k].append(0)
228
228
  continue
229
- for k in keys:
229
+ for k in keys:
230
230
  data[k].append(result["values"].get(k, 0))
231
231
  period_values.remove(result)
232
232
  return objict(periods=periods, data=data)
@@ -241,7 +241,7 @@ def get_chart_periods(slug, granularity, start, end=None, group=None):
241
241
  periods.append(period)
242
242
  if granularity != "weekly":
243
243
  periods.reverse()
244
- return periods
244
+ return periods
245
245
 
246
246
 
247
247
  def get_adjusted_date_range(granularity, start, end, group=None, samples=None):
@@ -282,6 +282,7 @@ def generate_uuid(slug, group, slug_append=None):
282
282
  class Metrics(models.Model, rm.RestModel):
283
283
  class RestMeta:
284
284
  QUERY_FIELDS = ["group__kind", "all_fields"]
285
+ ESTIMATE_COUNTS = True
285
286
  GRAPHS = {
286
287
  "detailed": {
287
288
  "fields": [
@@ -310,7 +311,7 @@ class Metrics(models.Model, rm.RestModel):
310
311
  # allow to group metrics by a group
311
312
  group = models.ForeignKey("account.Group", related_name="+", on_delete=models.CASCADE, null=True, default=None)
312
313
 
313
- # now we create a set of k/v
314
+ # now we create a set of k/v
314
315
  k1 = models.SlugField(max_length=64, null=True, default=None)
315
316
  v1 = models.BigIntegerField(default=0)
316
317
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "django-restit"
3
- version = "4.2.173"
3
+ version = "4.2.174"
4
4
  description = "A Rest Framework for DJANGO"
5
5
  authors = ["Ian Starnes <ians@311labs.com>"]
6
6
  license = "MIT"
@@ -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.173"
4
+ __version__ = "4.2.174"
@@ -7,6 +7,7 @@ import importlib
7
7
  from django.db import models as dm
8
8
  from django.db.transaction import atomic
9
9
  from django.apps import apps
10
+ from django.db import connection
10
11
 
11
12
  from rest import helpers as rh
12
13
  from rest import errors as re
@@ -876,7 +877,7 @@ class RestModel(object):
876
877
  if not graph and request is not None:
877
878
  graph = request.DATA.get("graph", "default")
878
879
  return GRAPH_HELPERS.restList(
879
- request, qset, sort=sort, totals=totals,
880
+ request, qset, sort=sort, totals=totals,
880
881
  return_httpresponse=return_httpresponse,
881
882
  response_params=dict(graph=graph),
882
883
  **cls.getGraph(graph))
@@ -896,6 +897,17 @@ class RestModel(object):
896
897
  request = cls.getActiveRequest()
897
898
  return cls.restList(request, qset, graph, totals, False)
898
899
 
900
+ @classmethod
901
+ def restListEstimatedCount(cls, request, qset):
902
+ # TODO attempt to make this work with the qset,
903
+ # right now it gets an estimated count of the entire table
904
+ if getattr(cls.RestMeta, "ESTIMATE_COUNTS", False):
905
+ if connection.vendor == 'postgresql':
906
+ with connection.cursor() as cursor:
907
+ cursor.execute(f"SELECT reltuples::bigint FROM pg_class WHERE relname = '{cls._meta.db_table}'")
908
+ return cursor.fetchone()[0]
909
+ return qset.count()
910
+
899
911
  def restStatus(self, request, status, **kwargs):
900
912
  RestModel._setupGraphHelpers()
901
913
  return GRAPH_HELPERS.restStatus(request, status, **kwargs)
@@ -959,7 +971,7 @@ class RestModel(object):
959
971
  has_perms = True
960
972
  if perms is not None:
961
973
  has_perms = cls.on_rest_list_has_perms(request, perms, qset)
962
-
974
+
963
975
  if request.group:
964
976
  qset = cls.on_rest_filter_children(request, qset)
965
977
  if not has_perms:
@@ -1040,7 +1052,7 @@ class RestModel(object):
1040
1052
  elif dr_offset > 0:
1041
1053
  dr_start = dr_start + timedelta(minutes=dr_offset)
1042
1054
  dr_end = dr_end + timedelta(minutes=dr_offset)
1043
-
1055
+
1044
1056
  rh.debug("tr_end changing", str(dr_start), str(dr_end))
1045
1057
  dr_field = request.DATA.get("dr_field", getattr(cls.RestMeta, "DATE_RANGE_FIELD", "created"))
1046
1058
  q = dict()
@@ -1145,7 +1157,7 @@ class RestModel(object):
1145
1157
  cls._boundRest()
1146
1158
  if format.startswith("json"):
1147
1159
  return GRAPH_HELPERS.views.restJSON(
1148
- request, qset, fields,
1160
+ request, qset, fields,
1149
1161
  name, format_size, localize=localize)
1150
1162
  elif format.startswith("csv"):
1151
1163
  return GRAPH_HELPERS.views.restCSV(
@@ -1159,7 +1171,7 @@ class RestModel(object):
1159
1171
  return GRAPH_HELPERS.views.restFlat(
1160
1172
  request, qset, fields,
1161
1173
  name, format_size, localize=localize)
1162
-
1174
+
1163
1175
  @classmethod
1164
1176
  def on_rest_list_summary(cls, request, qset):
1165
1177
  cls._boundRest()
@@ -1589,7 +1601,7 @@ class RestModel(object):
1589
1601
  "group": "group__kind"
1590
1602
  }
1591
1603
 
1592
- QUERY_FIELDS can be used to restrict what fields can be queried
1604
+ QUERY_FIELDS can be used to restrict what fields can be queried
1593
1605
  and add special fields:
1594
1606
 
1595
1607
  ?group__kind=iso
@@ -1600,7 +1612,7 @@ class RestModel(object):
1600
1612
  or
1601
1613
  <field_name>__<operator>=value
1602
1614
 
1603
- You cannot do <field_name>__<sub_field>__<operator> unless
1615
+ You cannot do <field_name>__<sub_field>__<operator> unless
1604
1616
  <field_name>__<sub_field> is
1605
1617
 
1606
1618
  allowed <operator>s
@@ -18,12 +18,12 @@ SAFE_ASCII = set(string.printable)
18
18
  def createFakeRequest(method="GET", **kwargs):
19
19
  member = kwargs.get("member", objict(is_authenticated=True, is_staff=True, is_superuser=True))
20
20
  return objict(
21
- META={},
21
+ META={},
22
22
  user=member,
23
23
  member=member,
24
24
  group=kwargs.get("group", None),
25
- method=method,
26
- _started=0,
25
+ method=method,
26
+ _started=0,
27
27
  DATA=RequestData(data=kwargs))
28
28
 
29
29
 
@@ -284,7 +284,6 @@ class RequestData(object):
284
284
  if value == '':
285
285
  if field_type in [int, float]:
286
286
  return field_type(0)
287
-
288
287
  if field_type in [int, str, float, str]:
289
288
  value = field_type(value)
290
289
  elif field_type is datetime:
@@ -1,6 +1,8 @@
1
1
  from django.http import HttpResponse
2
2
  from django.shortcuts import render
3
3
  from django.db.models.query import QuerySet
4
+ from django.core.cache import cache
5
+ import hashlib
4
6
 
5
7
  from rest import settings
6
8
  from version import VERSION
@@ -13,6 +15,27 @@ from . import csv
13
15
  from . import excel
14
16
  # from . import profiler
15
17
  STATUS_ON_PERM_DENIED = settings.get("STATUS_ON_PERM_DENIED", 403)
18
+ REST_LIST_CACHE_COUNT = settings.get("REST_LIST_CACHE_COUNT", True)
19
+
20
+
21
+ def get_query_hash(queryset):
22
+ """Generate a unique hash based on the queryset's SQL query and params."""
23
+ sql_query = str(queryset.query)
24
+ return hashlib.sha256(sql_query.encode()).hexdigest()
25
+
26
+
27
+ def get_cached_count(queryset, hash=None, timeout=1800):
28
+ """
29
+ Retrieves the cached count for a queryset or calculates & caches it.
30
+ """
31
+ if hash is None:
32
+ hash = get_query_hash(queryset)
33
+ cache_key = f"rest_hash_{hash}"
34
+ count = cache.get(cache_key)
35
+ if count is None:
36
+ count = queryset.count()
37
+ cache.set(cache_key, count, timeout=timeout)
38
+ return count
16
39
 
17
40
 
18
41
  def restStatus(request, status, data={}, **kwargs):
@@ -41,13 +64,20 @@ def restGet(request, obj, fields=None, extra=[], exclude=[], recurse_into=[], **
41
64
  data["elapsed"] = get_request_elapsed(request)
42
65
  return restResult(request, data)
43
66
 
67
+
44
68
  # @profiler.timeit
45
69
  def restList(request, qset, size=25, start=0, sort=None, fields=None, extra=[], exclude=[], recurse_into=[], **kwargs):
46
- count = 0
47
- if isinstance(qset, QuerySet):
48
- count = qset.count()
49
- elif isinstance(qset, list):
50
- count = len(qset)
70
+ count = kwargs.get('count', 0)
71
+ hash = None
72
+ if count == 0:
73
+ if isinstance(qset, QuerySet):
74
+ if REST_LIST_CACHE_COUNT and not request.DATA.get("no_cache", False):
75
+ hash = get_query_hash(qset)
76
+ count = get_cached_count(qset, hash)
77
+ else:
78
+ count = qset.count()
79
+ elif isinstance(qset, list):
80
+ count = len(qset)
51
81
  start = request.DATA.get("start", start, field_type=int)
52
82
  size = request.DATA.get("size", size, field_type=int)
53
83
  sort = request.DATA.get("sort", sort)
@@ -56,6 +86,8 @@ def restList(request, qset, size=25, start=0, sort=None, fields=None, extra=[],
56
86
  data["datetime"] = int(time.time())
57
87
  data["elapsed"] = get_request_elapsed(request)
58
88
  data["count"] = count
89
+ if hash is not None:
90
+ data["hash"] = hash
59
91
  if "response_params" in kwargs:
60
92
  for k, v in kwargs.get("response_params").items():
61
93
  data[k] = v
@@ -0,0 +1,135 @@
1
+ import os
2
+ import signal
3
+ import time
4
+ import argparse
5
+ import logging
6
+ import daemon
7
+ from daemon import pidfile
8
+ from watchdog.observers import Observer
9
+ from watchdog.events import FileSystemEventHandler
10
+
11
+
12
+ class Service(FileSystemEventHandler):
13
+ def __init__(self, name, pid_file, watch_file=None, require_user=None, logger=None):
14
+ self.name = name
15
+ self.pid_file = pid_file
16
+ self.watch_file = os.path.realpath(watch_file) if watch_file else None
17
+ self.require_user = require_user
18
+ self.observer = None
19
+
20
+ def log_info(self, *args):
21
+ if self.logger:
22
+ self.log_info(*args)
23
+
24
+ def start(self):
25
+ if self.is_running():
26
+ self.log_info("Service is already running.")
27
+ return
28
+
29
+ self.log_info(f"Starting {self.name}...")
30
+
31
+ with daemon.DaemonContext(
32
+ pidfile=pidfile.TimeoutPIDLockFile(self.pid_file),
33
+ stdout=open('/tmp/service.log', 'a+'),
34
+ stderr=open('/tmp/service_error.log', 'a+'),
35
+ signal_map={
36
+ signal.SIGTERM: self.stop,
37
+ signal.SIGHUP: self.restart
38
+ }
39
+ ):
40
+ self.run()
41
+
42
+ def stop(self, *args):
43
+ pid = self.get_pid()
44
+ if not pid:
45
+ self.log_info("Service is not running.")
46
+ return
47
+
48
+ self.log_info(f"Stopping {self.name} (PID: {pid})...")
49
+ try:
50
+ os.kill(pid, signal.SIGTERM)
51
+ time.sleep(1)
52
+ if self.is_running():
53
+ os.kill(pid, signal.SIGKILL)
54
+ if os.path.exists(self.pid_file):
55
+ os.remove(self.pid_file)
56
+ self.log_info("Service stopped.")
57
+ except OSError:
58
+ self.logger.error(f"Failed to stop process {pid}")
59
+
60
+ def restart(self, *args):
61
+ self.log_info("Restarting service...")
62
+ self.stop()
63
+ time.sleep(1)
64
+ self.start()
65
+
66
+ def status(self):
67
+ if self.is_running():
68
+ print(f"{self.name} is running (PID: {self.get_pid()})")
69
+ else:
70
+ print(f"{self.name} is not running")
71
+
72
+ def is_running(self):
73
+ """Check if the process is running using os.kill(pid, 0)"""
74
+ pid = self.get_pid()
75
+ if pid:
76
+ try:
77
+ os.kill(pid, 0) # Does not kill, just checks if process exists
78
+ return True
79
+ except OSError:
80
+ return False
81
+ return False
82
+
83
+ def get_pid(self):
84
+ if os.path.exists(self.pid_file):
85
+ try:
86
+ with open(self.pid_file, "r") as f:
87
+ pid = int(f.read().strip())
88
+ return pid
89
+ except ValueError:
90
+ return None
91
+ return None
92
+
93
+ def run(self):
94
+ """Main daemon loop"""
95
+ self.log_info(f"{self.name} is running in background.")
96
+ if self.watch_file:
97
+ self.start_watcher()
98
+ self.on_run()
99
+
100
+ def on_run(self):
101
+ while True:
102
+ time.sleep(5)
103
+
104
+ def start_watcher(self):
105
+ self.log_info(f"Watching file: {self.watch_file}")
106
+ self.observer = Observer()
107
+ self.observer.schedule(self, path=os.path.dirname(self.watch_file), recursive=False)
108
+ self.observer.start()
109
+
110
+ def on_modified(self, event):
111
+ if self.watch_file and event.src_path == self.watch_file:
112
+ self.log_info("Config file changed, restarting service...")
113
+ self.restart()
114
+
115
+
116
+ def main():
117
+ parser = argparse.ArgumentParser(description="Manage the service daemon")
118
+ parser.add_argument("command", choices=["start", "stop", "restart", "status", "run"])
119
+ args = parser.parse_args()
120
+
121
+ service = Service(name="MyDaemon", pid_file="/tmp/mydaemon.pid")
122
+
123
+ if args.command == "start":
124
+ service.start()
125
+ elif args.command == "stop":
126
+ service.stop()
127
+ elif args.command == "restart":
128
+ service.restart()
129
+ elif args.command == "status":
130
+ service.status()
131
+ elif args.command == "run":
132
+ service.run()
133
+
134
+ if __name__ == "__main__":
135
+ main()
@@ -63,7 +63,3 @@ for app in settings.INSTALLED_APPS:
63
63
  sub_modules = getattr(module, "RPC_MODULES")
64
64
  for m in sub_modules:
65
65
  load_app(m, module)
66
-
67
-
68
-
69
-