aa-structures 4.0.2__tar.gz → 4.0.4__tar.gz

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.
Files changed (265) hide show
  1. {aa_structures-4.0.2 → aa_structures-4.0.4}/PKG-INFO +9 -8
  2. {aa_structures-4.0.2 → aa_structures-4.0.4}/README.md +5 -5
  3. {aa_structures-4.0.2 → aa_structures-4.0.4}/pyproject.toml +1 -1
  4. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/__init__.py +1 -1
  5. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/admin.py +3 -4
  6. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/app_settings.py +26 -9
  7. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/apps.py +2 -2
  8. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/auth_hooks.py +1 -1
  9. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_embeds/__init__.py +1 -1
  10. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_embeds/billing_embeds.py +4 -5
  11. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_embeds/corporate_embeds.py +21 -26
  12. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_embeds/main.py +14 -11
  13. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_embeds/moonmining_embeds.py +4 -5
  14. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_embeds/orbital_embeds.py +4 -5
  15. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_embeds/skyhook_embeds.py +7 -12
  16. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_embeds/sov_embeds.py +8 -9
  17. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_embeds/structures_embeds.py +18 -11
  18. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_embeds/tower_embeds.py +3 -4
  19. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_embeds/war_embeds.py +6 -4
  20. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_timers.py +47 -49
  21. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/serializers.py +4 -4
  22. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/forms.py +1 -1
  23. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/managers.py +27 -15
  24. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/models/__init__.py +5 -5
  25. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/models/notifications.py +30 -29
  26. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/models/owners.py +18 -7
  27. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/models/structures_1.py +4 -3
  28. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/models/structures_2.py +1 -2
  29. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/providers.py +1 -3
  30. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tasks.py +23 -16
  31. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/core/notification_embeds/test_main.py +68 -0
  32. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/helpers.py +7 -0
  33. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/models/test_notifications_1.py +52 -0
  34. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/models/test_notifications_2.py +10 -12
  35. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/models/test_notifications_3.py +35 -0
  36. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/models/test_owners_2.py +44 -0
  37. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/models/test_owners_5.py +22 -0
  38. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/test_admin.py +24 -2
  39. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/test_managers_1.py +24 -2
  40. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/test_managers_2.py +1 -2
  41. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/test_tasks.py +10 -2
  42. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/testdata/factories.py +1 -1
  43. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/testdata/helpers.py +1 -2
  44. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/views/test_public.py +17 -1
  45. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/views/test_statistics.py +1 -2
  46. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/views/test_structures.py +61 -4
  47. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/urls.py +1 -1
  48. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/views/public.py +5 -3
  49. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/views/statistics.py +1 -2
  50. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/views/structures.py +24 -13
  51. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/webhooks/core.py +25 -15
  52. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/webhooks/models.py +2 -2
  53. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/webhooks/tests/test_core.py +29 -1
  54. aa_structures-4.0.2/.coveragerc +0 -18
  55. aa_structures-4.0.2/.github/workflows/ci-cd.yaml +0 -130
  56. aa_structures-4.0.2/.gitignore +0 -24
  57. aa_structures-4.0.2/.pre-commit-config.yaml +0 -19
  58. aa_structures-4.0.2/.readthedocs.yml +0 -17
  59. aa_structures-4.0.2/.tx/config +0 -10
  60. aa_structures-4.0.2/CHANGELOG.md +0 -1676
  61. aa_structures-4.0.2/CONTRIBUTING.md +0 -14
  62. aa_structures-4.0.2/Makefile +0 -53
  63. aa_structures-4.0.2/aa-structures_models.png +0 -0
  64. aa_structures-4.0.2/codecov.yml +0 -16
  65. aa_structures-4.0.2/docs/Makefile +0 -20
  66. aa_structures-4.0.2/docs/_static/css/rtd_dark.css +0 -114
  67. aa_structures-4.0.2/docs/conf.py +0 -73
  68. aa_structures-4.0.2/docs/index.rst +0 -8
  69. aa_structures-4.0.2/docs/make.bat +0 -35
  70. aa_structures-4.0.2/docs/operations.md +0 -165
  71. aa_structures-4.0.2/docs/requirements.txt +0 -5
  72. aa_structures-4.0.2/docs/user.md +0 -246
  73. aa_structures-4.0.2/runtests.py +0 -20
  74. aa_structures-4.0.2/structures/tests/__init__.py +0 -5
  75. aa_structures-4.0.2/structures/tests/views/utils.py +0 -6
  76. aa_structures-4.0.2/testauth/__init__.py +0 -1
  77. aa_structures-4.0.2/testauth/celery.py +0 -39
  78. aa_structures-4.0.2/testauth/settings_aa4/base.py +0 -340
  79. aa_structures-4.0.2/testauth/settings_aa4/local.py +0 -98
  80. aa_structures-4.0.2/testauth/settings_aa5/__init__.py +0 -0
  81. aa_structures-4.0.2/testauth/settings_aa5/base.py +0 -352
  82. aa_structures-4.0.2/testauth/settings_aa5/local.py +0 -98
  83. aa_structures-4.0.2/testauth/urls.py +0 -13
  84. aa_structures-4.0.2/testauth/wsgi.py +0 -14
  85. aa_structures-4.0.2/tools/drop_tables.sql +0 -27
  86. aa_structures-4.0.2/tox.ini +0 -52
  87. {aa_structures-4.0.2 → aa_structures-4.0.4}/LICENSE +0 -0
  88. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/checks.py +0 -0
  89. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/constants.py +0 -0
  90. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/__init__.py +0 -0
  91. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_embeds/helpers.py +0 -0
  92. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/notification_types.py +0 -0
  93. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/sovereignty.py +0 -0
  94. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/core/starbases.py +0 -0
  95. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/helpers.py +0 -0
  96. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/de/LC_MESSAGES/django.mo +0 -0
  97. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/de/LC_MESSAGES/django.po +0 -0
  98. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/django.pot +0 -0
  99. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/en/LC_MESSAGES/django.mo +0 -0
  100. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/en/LC_MESSAGES/django.po +0 -0
  101. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/es/LC_MESSAGES/django.mo +0 -0
  102. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/es/LC_MESSAGES/django.po +0 -0
  103. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/fr_FR/LC_MESSAGES/django.mo +0 -0
  104. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/fr_FR/LC_MESSAGES/django.po +0 -0
  105. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/it_IT/LC_MESSAGES/django.mo +0 -0
  106. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/it_IT/LC_MESSAGES/django.po +0 -0
  107. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/ja/LC_MESSAGES/django.mo +0 -0
  108. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/ja/LC_MESSAGES/django.po +0 -0
  109. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/ko_KR/LC_MESSAGES/django.mo +0 -0
  110. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/ko_KR/LC_MESSAGES/django.po +0 -0
  111. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/ru/LC_MESSAGES/django.mo +0 -0
  112. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/ru/LC_MESSAGES/django.po +0 -0
  113. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/uk/LC_MESSAGES/django.mo +0 -0
  114. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/uk/LC_MESSAGES/django.po +0 -0
  115. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  116. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/locale/zh_Hans/LC_MESSAGES/django.po +0 -0
  117. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/management/commands/__init__.py +0 -0
  118. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/management/commands/structures_load_eve.py +0 -0
  119. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/management/commands/structures_preload_eveuniverse.py +0 -0
  120. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/management/commands/structures_update_poco_planets.py +0 -0
  121. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/migrations/0001_initial_new.py +0 -0
  122. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/migrations/0002_remove_eveuniverse_relation_names.py +0 -0
  123. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/migrations/0003_add_localization_and_unique_key.py +0 -0
  124. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/migrations/0004_improve_localization.py +0 -0
  125. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/migrations/0005_add_notification_types.py +0 -0
  126. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/migrations/0006_add_ownercharacter_disabled.py +0 -0
  127. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/migrations/0007_add_notificationtypes_skyhook_metenox.py +0 -0
  128. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/migrations/0008_add_notificationtypes_skyhook_metenox.py +0 -0
  129. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/migrations/0009_add_project_goal_notifications.py +0 -0
  130. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/migrations/__init__.py +0 -0
  131. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/models/eveuniverse.py +0 -0
  132. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/openapi_2025-12-16.json +0 -0
  133. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/css/global.css +0 -0
  134. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/css/main.css +0 -0
  135. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/css/public.css +0 -0
  136. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/css/statistics.css +0 -0
  137. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/css/structures.css +0 -0
  138. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/bars-rotate-fade-black-36.svg +0 -0
  139. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/bars-rotate-fade-white-36.svg +0 -0
  140. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/eve_symbol_128.png +0 -0
  141. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/0h.png +0 -0
  142. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/0l.png +0 -0
  143. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/0m.png +0 -0
  144. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/0r.png +0 -0
  145. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/0s.png +0 -0
  146. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/1h.png +0 -0
  147. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/1l.png +0 -0
  148. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/1m.png +0 -0
  149. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/1r.png +0 -0
  150. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/1s.png +0 -0
  151. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/2h.png +0 -0
  152. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/2l.png +0 -0
  153. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/2m.png +0 -0
  154. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/2r.png +0 -0
  155. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/2s.png +0 -0
  156. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/3h.png +0 -0
  157. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/3l.png +0 -0
  158. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/3m.png +0 -0
  159. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/3r.png +0 -0
  160. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/3s.png +0 -0
  161. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/4h.png +0 -0
  162. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/4l.png +0 -0
  163. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/4m.png +0 -0
  164. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/4s.png +0 -0
  165. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/5h.png +0 -0
  166. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/5l.png +0 -0
  167. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/5m.png +0 -0
  168. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/5s.png +0 -0
  169. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/6h.png +0 -0
  170. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/6l.png +0 -0
  171. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/6m.png +0 -0
  172. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/7h.png +0 -0
  173. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/7l.png +0 -0
  174. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/7m.png +0 -0
  175. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/8h.png +0 -0
  176. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/8l.png +0 -0
  177. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/8m.png +0 -0
  178. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/blank.png +0 -0
  179. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/circle.png +0 -0
  180. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/dustwheel.png +0 -0
  181. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/h.png +0 -0
  182. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/l.png +0 -0
  183. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/m.png +0 -0
  184. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/noship.png +0 -0
  185. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/r.png +0 -0
  186. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/tyrannis.png +0 -0
  187. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/tyrannis_blue.png +0 -0
  188. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/tyrannis_darkred.png +0 -0
  189. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/tyrannis_default.png +0 -0
  190. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/panel/tyrannis_revelations.png +0 -0
  191. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/img/structures_logo.png +0 -0
  192. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/js/global.js +0 -0
  193. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/js/public.js +0 -0
  194. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/js/statistics.js +0 -0
  195. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/js/structures.js +0 -0
  196. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/vendor/datatables/plugins/dataTables.rowGroup.min.js +0 -0
  197. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/vendor/datatables/plugins/datetime.js +0 -0
  198. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/vendor/datatables/plugins/filterDropDown.min.js +0 -0
  199. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/vendor/datatables/plugins/rowGroup.bootstrap.min.css +0 -0
  200. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/static/structures/vendor/datatables/plugins/rowGroup.dataTables.min.css +0 -0
  201. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/base.html +0 -0
  202. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/modals/fitting_assets.html +0 -0
  203. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/modals/fitting_gfx.html +0 -0
  204. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/modals/poco_details.html +0 -0
  205. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/modals/starbase_detail.html +0 -0
  206. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/modals/structure_details.html +0 -0
  207. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/modals/tab_general_detail.html +0 -0
  208. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/modals/tab_services_detail.html +0 -0
  209. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/partials/menu.html +0 -0
  210. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/partials/public/poco_list.html +0 -0
  211. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/partials/statistics/structure_summary.html +0 -0
  212. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/partials/structures/active_tags.html +0 -0
  213. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/partials/structures/jump_gate_list.html +0 -0
  214. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/partials/structures/orbital_list.html +0 -0
  215. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/partials/structures/starbase_list.html +0 -0
  216. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/partials/structures/structure_list.html +0 -0
  217. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/public.html +0 -0
  218. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/statistics.html +0 -0
  219. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/structures.html +0 -0
  220. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/templatetags/detail_title.html +0 -0
  221. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/templatetags/list_asset.html +0 -0
  222. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/templatetags/list_item.html +0 -0
  223. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/templatetags/list_tax_item.html +0 -0
  224. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templates/structures/templatetags/list_title.html +0 -0
  225. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templatetags/__init__.py +0 -0
  226. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/templatetags/structures.py +0 -0
  227. {aa_structures-4.0.2/structures/tests/core → aa_structures-4.0.4/structures/tests}/__init__.py +0 -0
  228. {aa_structures-4.0.2/structures/tests/core/notification_embeds → aa_structures-4.0.4/structures/tests/core}/__init__.py +0 -0
  229. {aa_structures-4.0.2/structures/tests/integration → aa_structures-4.0.4/structures/tests/core/notification_embeds}/__init__.py +0 -0
  230. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/core/notification_embeds/test_helpers.py +0 -0
  231. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/core/test_notification_structuretimers.py +0 -0
  232. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/core/test_notification_types.py +0 -0
  233. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/core/test_notifications_timers.py +0 -0
  234. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/core/test_serializers.py +0 -0
  235. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/core/test_sovereignty.py +0 -0
  236. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/core/test_starbases.py +0 -0
  237. {aa_structures-4.0.2/structures/tests/models → aa_structures-4.0.4/structures/tests/integration}/__init__.py +0 -0
  238. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/integration/test_tasks.py +0 -0
  239. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/integration/test_views.py +0 -0
  240. {aa_structures-4.0.2/structures/tests/testdata → aa_structures-4.0.4/structures/tests/models}/__init__.py +0 -0
  241. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/models/test_eveuniverse.py +0 -0
  242. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/models/test_notifications_discord.py +0 -0
  243. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/models/test_owners_1.py +0 -0
  244. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/models/test_owners_3.py +0 -0
  245. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/models/test_owners_4.py +0 -0
  246. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/models/test_owners_6.py +0 -0
  247. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/models/test_structures.py +0 -0
  248. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/test_helpers.py +0 -0
  249. {aa_structures-4.0.2/structures/tests/views → aa_structures-4.0.4/structures/tests/testdata}/__init__.py +0 -0
  250. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/testdata/constants.py +0 -0
  251. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/testdata/generate_notifications.py +0 -0
  252. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/testdata/generate_notifications_2.py +0 -0
  253. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/testdata/generate_structures.py +0 -0
  254. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/testdata/notifications.json +0 -0
  255. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/testdata/tasks_loadtest.py +0 -0
  256. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/testdata/test_generate_structures.py +0 -0
  257. {aa_structures-4.0.2/structures → aa_structures-4.0.4/structures/tests}/views/__init__.py +0 -0
  258. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/tests/views/test_service_status.py +0 -0
  259. {aa_structures-4.0.2/structures/webhooks → aa_structures-4.0.4/structures/views}/__init__.py +0 -0
  260. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/views/common.py +0 -0
  261. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/views/status.py +0 -0
  262. {aa_structures-4.0.2/structures/webhooks/tests → aa_structures-4.0.4/structures/webhooks}/__init__.py +0 -0
  263. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/webhooks/managers.py +0 -0
  264. {aa_structures-4.0.2/testauth/settings_aa4 → aa_structures-4.0.4/structures/webhooks/tests}/__init__.py +0 -0
  265. {aa_structures-4.0.2 → aa_structures-4.0.4}/structures/webhooks/tests/test_utils.py +0 -0
@@ -1,8 +1,8 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: aa-structures
3
- Version: 4.0.2
3
+ Version: 4.0.4
4
4
  Summary: An app for managing Eve Online structures with Alliance Auth.
5
- Author-email: Erik Kalkoken <kalkoken87@gmail.com>
5
+ Author-email: Erik Kalkoken <erik.kalkoken@gmail.com>
6
6
  Requires-Python: >=3.10
7
7
  Description-Content-Type: text/markdown
8
8
  Classifier: Environment :: Web Environment
@@ -35,6 +35,7 @@ Requires-Dist: pook ; extra == "test"
35
35
  Project-URL: Documentation, https://aa-structures.readthedocs.io
36
36
  Project-URL: Homepage, https://github.com/AllianceAuth-Apps/aa-structures
37
37
  Provides-Extra: test
38
+ Import-Name: structures
38
39
 
39
40
  # Structures
40
41
 
@@ -53,7 +54,7 @@ An app for managing Eve Online structures with Alliance Auth.
53
54
 
54
55
  ## Overview
55
56
 
56
- This app is for managing Eve Online structures with [Alliance Auth](https://gitlab.com/allianceauth/allianceauth). It allows all member corporations to see a current list of all their structures in Auth. In addition it allows forwarding Eve Online notifications to Discord.
57
+ Built for [Alliance Auth](https://gitlab.com/allianceauth/allianceauth), it allows all member corporations to see a current list of all their structures in Auth. In addition it allows forwarding Eve Online notifications to Discord.
57
58
 
58
59
  ## Features
59
60
 
@@ -69,10 +70,10 @@ Structures adds the following main features to Alliance Auth:
69
70
  - Sovereignty
70
71
  - Wars
71
72
  - Corporation membership changes
72
- - Automatically adds timers from relevant notifications to [Alliance Auth Structure Timers](https://allianceauth.readthedocs.io/en/latest/features/apps/timerboard.html) or [Structure Timers II](https://gitlab.com/ErikKalkoken/aa-structuretimers) app (if installed)
73
+ - Automatically adds timers from relevant notifications to [Alliance Auth Structure Timers](https://allianceauth.readthedocs.io/en/latest/features/apps/timerboard.html) or [Structure Timers II](https://github.com/AllianceAuth-Apps/aa-structuretimers) app (if installed)
73
74
  - Fittings, contents of Upwell structures (e.g. fuel blocks and ammo) and current fuel usage
74
75
  - Additional structure notifications generated by the app:
75
- - Configurable alerts to warn about fuel running at in structures and POSes, and which can replace the ESI notifications
76
+ - Configurable alerts to warn about fuel running low in structures and POSes, and which can replace the ESI notifications
76
77
  - Notifications to inform when structures have been refueled (BETA)
77
78
  - Configurable alerts to warn about jump fuel (liquid ozone) running low in jump gates
78
79
  - POS reinforced (BETA)
@@ -80,7 +81,7 @@ Structures adds the following main features to Alliance Auth:
80
81
  - Permissions define which structures are visible to a user based on organization membership
81
82
  - Self-defined tags help to better organize structures
82
83
  - Ability to increase notification response time and sync resilience with multiple sync characters per structure owner
83
- - Automatically sends alerts to users and admin when token become invalid or sync from ESI fails
84
+ - Automatically sends alerts to users and admins when tokens become invalid or sync from ESI fails
84
85
  - Interface for 3rd party monitoring of the services status
85
86
  - Chinese :cn:, English :us:, German :de: and Russian :ru: localization
86
87
 
@@ -103,7 +104,7 @@ The tax rate and access configuration of customs offices is visible too:
103
104
 
104
105
  And you can see the configuration for starbases:
105
106
 
106
- ![Poco details](https://imgpile.com/images/GCxMPr.png)
107
+ ![Starbase details](https://imgpile.com/images/GCxMPr.png)
107
108
 
108
109
  This is an example for a notification posted on Discord:
109
110
 
@@ -15,7 +15,7 @@ An app for managing Eve Online structures with Alliance Auth.
15
15
 
16
16
  ## Overview
17
17
 
18
- This app is for managing Eve Online structures with [Alliance Auth](https://gitlab.com/allianceauth/allianceauth). It allows all member corporations to see a current list of all their structures in Auth. In addition it allows forwarding Eve Online notifications to Discord.
18
+ Built for [Alliance Auth](https://gitlab.com/allianceauth/allianceauth), it allows all member corporations to see a current list of all their structures in Auth. In addition it allows forwarding Eve Online notifications to Discord.
19
19
 
20
20
  ## Features
21
21
 
@@ -31,10 +31,10 @@ Structures adds the following main features to Alliance Auth:
31
31
  - Sovereignty
32
32
  - Wars
33
33
  - Corporation membership changes
34
- - Automatically adds timers from relevant notifications to [Alliance Auth Structure Timers](https://allianceauth.readthedocs.io/en/latest/features/apps/timerboard.html) or [Structure Timers II](https://gitlab.com/ErikKalkoken/aa-structuretimers) app (if installed)
34
+ - Automatically adds timers from relevant notifications to [Alliance Auth Structure Timers](https://allianceauth.readthedocs.io/en/latest/features/apps/timerboard.html) or [Structure Timers II](https://github.com/AllianceAuth-Apps/aa-structuretimers) app (if installed)
35
35
  - Fittings, contents of Upwell structures (e.g. fuel blocks and ammo) and current fuel usage
36
36
  - Additional structure notifications generated by the app:
37
- - Configurable alerts to warn about fuel running at in structures and POSes, and which can replace the ESI notifications
37
+ - Configurable alerts to warn about fuel running low in structures and POSes, and which can replace the ESI notifications
38
38
  - Notifications to inform when structures have been refueled (BETA)
39
39
  - Configurable alerts to warn about jump fuel (liquid ozone) running low in jump gates
40
40
  - POS reinforced (BETA)
@@ -42,7 +42,7 @@ Structures adds the following main features to Alliance Auth:
42
42
  - Permissions define which structures are visible to a user based on organization membership
43
43
  - Self-defined tags help to better organize structures
44
44
  - Ability to increase notification response time and sync resilience with multiple sync characters per structure owner
45
- - Automatically sends alerts to users and admin when token become invalid or sync from ESI fails
45
+ - Automatically sends alerts to users and admins when tokens become invalid or sync from ESI fails
46
46
  - Interface for 3rd party monitoring of the services status
47
47
  - Chinese :cn:, English :us:, German :de: and Russian :ru: localization
48
48
 
@@ -65,7 +65,7 @@ The tax rate and access configuration of customs offices is visible too:
65
65
 
66
66
  And you can see the configuration for starbases:
67
67
 
68
- ![Poco details](https://imgpile.com/images/GCxMPr.png)
68
+ ![Starbase details](https://imgpile.com/images/GCxMPr.png)
69
69
 
70
70
  This is an example for a notification posted on Discord:
71
71
 
@@ -8,7 +8,7 @@ dynamic = ["version", "description"]
8
8
  readme = "README.md"
9
9
  license = { file = "LICENSE" }
10
10
  requires-python = ">=3.10"
11
- authors = [{ name = "Erik Kalkoken", email = "kalkoken87@gmail.com" }]
11
+ authors = [{ name = "Erik Kalkoken", email = "erik.kalkoken@gmail.com" }]
12
12
  classifiers = [
13
13
  "Environment :: Web Environment",
14
14
  "Framework :: Django",
@@ -3,5 +3,5 @@
3
3
  # pylint: disable = invalid-name
4
4
  default_app_config = "structures.apps.StructuresConfig"
5
5
 
6
- __version__ = "4.0.2"
6
+ __version__ = "4.0.4"
7
7
  __title__ = "Structures"
@@ -19,9 +19,9 @@ from allianceauth.eveonline.models import EveAllianceInfo, EveCorporationInfo
19
19
  from allianceauth.services.hooks import get_extension_logger
20
20
  from app_utils.django import admin_boolean_icon_html
21
21
 
22
- from . import app_settings, tasks
23
- from .core.notification_types import NotificationType
24
- from .models import (
22
+ from structures import app_settings, tasks
23
+ from structures.core.notification_types import NotificationType
24
+ from structures.models import (
25
25
  FuelAlert,
26
26
  FuelAlertConfig,
27
27
  GeneratedNotification,
@@ -326,7 +326,6 @@ class NotificationBaseAdmin(admin.ModelAdmin):
326
326
  message = format_lazy("{first} {second}", first=first, second=second)
327
327
  else:
328
328
  message = first
329
- message = format_lazy(first)
330
329
  self.message_user(request, message)
331
330
 
332
331
 
@@ -3,10 +3,22 @@
3
3
  from app_utils.app_settings import clean_setting
4
4
 
5
5
  STRUCTURES_ADD_TIMERS = clean_setting("STRUCTURES_ADD_TIMERS", True)
6
- """Whether to automatically add timers for certain notifications on the timerboard
7
- (will have no effect if aa-timerboard app is not installed).
8
-
9
- Will create timers from anchoring, lost shield and lost armor notifications.
6
+ """Whether to automatically add timers for supported notification types
7
+ to Alliance Auth's Structure Timers or Erik's Structure Timers
8
+ (apps have to be installed for this setting to work).
9
+
10
+ Supported notification types are:
11
+
12
+ - moon mining extraction canceled
13
+ - moon mining extraction started
14
+ - orbital reinforced
15
+ - skyhook lost shield
16
+ - sov structure reinforced
17
+ - structure lost armor
18
+ - structure lost shield
19
+ - tower reinforced
20
+
21
+ Moon mining notifications can be disabled with `STRUCTURES_MOON_EXTRACTION_TIMERS_ENABLED`.
10
22
  """
11
23
 
12
24
  STRUCTURES_ADMIN_NOTIFICATIONS_ENABLED = clean_setting(
@@ -77,7 +89,10 @@ Stale notification will no longer be sent automatically.
77
89
  STRUCTURES_MOON_EXTRACTION_TIMERS_ENABLED = clean_setting(
78
90
  "STRUCTURES_MOON_EXTRACTION_TIMERS_ENABLED", True
79
91
  )
80
- """Whether to create / remove timers from moon extraction notifications."""
92
+ """Whether to include moon mining extraction notifications when adding timers.
93
+
94
+ Requires the "add timers" feature to be enabled with `STRUCTURES_ADD_TIMERS`
95
+ """
81
96
 
82
97
  STRUCTURES_NOTIFICATION_MAX_RETRIES = clean_setting(
83
98
  "STRUCTURES_NOTIFICATION_MAX_RETRIES", 3
@@ -89,14 +104,14 @@ if an error occurred e.g. rate limiting.
89
104
  STRUCTURES_NOTIFICATION_SET_AVATAR = clean_setting(
90
105
  "STRUCTURES_NOTIFICATION_SET_AVATAR", True
91
106
  )
92
- """Wether structures sets the name and avatar icon of a webhook.
107
+ """Whether structures sets the name and avatar icon of a webhook.
93
108
  When ``False`` the webhook will use it's own values as set on the platform.
94
109
  """
95
110
 
96
111
  STRUCTURES_NOTIFICATION_SHOW_MOON_ORE = clean_setting(
97
112
  "STRUCTURES_NOTIFICATION_SHOW_MOON_ORE", True
98
113
  )
99
- """Wether ore details are shown on moon timers."""
114
+ """Whether ore details are shown on moon timers."""
100
115
 
101
116
 
102
117
  STRUCTURES_NOTIFICATION_SYNC_GRACE_MINUTES = clean_setting(
@@ -131,7 +146,9 @@ STRUCTURES_REPORT_NPC_ATTACKS = clean_setting("STRUCTURES_REPORT_NPC_ATTACKS", T
131
146
  STRUCTURES_SHOW_FUEL_EXPIRES_RELATIVE = clean_setting(
132
147
  "STRUCTURES_SHOW_FUEL_EXPIRES_RELATIVE", True
133
148
  )
134
- """Whether fuel expires in structures browser is shown as absolute value."""
149
+ """Whether fuel expiration in the structures browser is shown as a relative value
150
+ (e.g., time remaining) instead of an absolute date.
151
+ """
135
152
 
136
153
  STRUCTURES_SHOW_JUMP_GATES = clean_setting("STRUCTURES_SHOW_JUMP_GATES", True)
137
154
  """Whether to show the jump gates tab."""
@@ -175,7 +192,7 @@ STRUCTURES_NOTIFICATION_TURNAROUND_LONG = clean_setting(
175
192
  "STRUCTURES_NOTIFICATION_TURNAROUND_LONG", 50
176
193
  )
177
194
 
178
- # Turnaround duration with more than x seconds are regarded as outliers
195
+ # Turnaround durations of more than x seconds are regarded as outliers
179
196
  # and will be ignored when calculating the averages
180
197
  STRUCTURES_NOTIFICATION_TURNAROUND_MAX_VALID = clean_setting(
181
198
  "STRUCTURES_NOTIFICATION_TURNAROUND_MAX_VALID", 3600
@@ -1,6 +1,6 @@
1
1
  from django.apps import AppConfig
2
2
 
3
- from . import __version__
3
+ from structures import __version__
4
4
 
5
5
 
6
6
  class StructuresConfig(AppConfig):
@@ -9,4 +9,4 @@ class StructuresConfig(AppConfig):
9
9
  verbose_name = f"Structures v{__version__}"
10
10
 
11
11
  def ready(self) -> None:
12
- from . import checks # noqa: F401 pylint: disable=unused-import
12
+ from structures import checks # noqa: F401 pylint: disable=unused-import
@@ -3,7 +3,7 @@ from django.utils.translation import gettext_lazy as _
3
3
  from allianceauth import hooks
4
4
  from allianceauth.services.hooks import MenuItemHook, UrlHook
5
5
 
6
- from . import __title__, urls
6
+ from structures import __title__, urls
7
7
 
8
8
 
9
9
  class StructuresMenuItem(MenuItemHook):
@@ -1,5 +1,5 @@
1
1
  """Generating notification embeds for Structures."""
2
2
 
3
- from .main import NotificationBaseEmbed
3
+ from structures.core.notification_embeds.main import NotificationBaseEmbed
4
4
 
5
5
  __all__ = ["NotificationBaseEmbed"]
@@ -12,15 +12,14 @@ from app_utils.datetime import ldap_time_2_datetime
12
12
  from app_utils.helpers import humanize_number
13
13
 
14
14
  from structures.constants import EveTypeId
15
- from structures.helpers import get_or_create_eve_entity, get_or_create_eve_type
16
- from structures.models import Notification, Webhook
17
-
18
- from .helpers import (
15
+ from structures.core.notification_embeds.helpers import (
19
16
  gen_eve_entity_link,
20
17
  gen_solar_system_text,
21
18
  target_datetime_formatted,
22
19
  )
23
- from .main import NotificationBaseEmbed
20
+ from structures.core.notification_embeds.main import NotificationBaseEmbed
21
+ from structures.helpers import get_or_create_eve_entity, get_or_create_eve_type
22
+ from structures.models import Notification, Webhook
24
23
 
25
24
 
26
25
  class BillType(models.IntegerChoices):
@@ -6,15 +6,14 @@ import dhooks_lite
6
6
 
7
7
  from django.utils.translation import gettext as _
8
8
 
9
- from structures.helpers import get_or_create_eve_entity
10
- from structures.models import Notification, Webhook
11
-
12
- from .helpers import (
9
+ from structures.core.notification_embeds.helpers import (
13
10
  gen_corporation_link,
14
11
  gen_eve_entity_link,
15
12
  gen_eve_entity_link_from_id,
16
13
  )
17
- from .main import NotificationBaseEmbed
14
+ from structures.core.notification_embeds.main import NotificationBaseEmbed
15
+ from structures.helpers import get_or_create_eve_entity
16
+ from structures.models import Notification, Webhook
18
17
 
19
18
 
20
19
  class NotificationCorpCharEmbed(NotificationBaseEmbed):
@@ -39,12 +38,11 @@ class NotificationCorpAppNewMsg(NotificationCorpCharEmbed):
39
38
  self._description = _(
40
39
  "New application from %(character_name)s to join %(corporation_name)s:\n"
41
40
  "> %(application_text)s"
42
- % {
43
- "character_name": self._character_link,
44
- "corporation_name": self._corporation_link,
45
- "application_text": self._application_text,
46
- }
47
- )
41
+ ) % {
42
+ "character_name": self._character_link,
43
+ "corporation_name": self._corporation_link,
44
+ "application_text": self._application_text,
45
+ }
48
46
  self._color = Webhook.Color.INFO
49
47
 
50
48
 
@@ -179,11 +177,10 @@ class NotificationCorpGoalClosed(NotificationCorpGoalEmbed):
179
177
  self._description = _(
180
178
  "Project **%(goal_name)s** has ben closed by %(closer)s "
181
179
  "and will not accept further contributions."
182
- % {
183
- "goal_name": self._goal_name,
184
- "closer": gen_eve_entity_link(closer),
185
- }
186
- )
180
+ ) % {
181
+ "goal_name": self._goal_name,
182
+ "closer": gen_eve_entity_link(closer),
183
+ }
187
184
  self._color = Webhook.Color.INFO
188
185
 
189
186
 
@@ -194,11 +191,10 @@ class NotificationCorpGoalCompleted(NotificationCorpGoalEmbed):
194
191
  self._description = _(
195
192
  "Project **%(goal_name)s** created by %(creator)s "
196
193
  "has been successfully completed after reaching it's target."
197
- % {
198
- "goal_name": self._goal_name,
199
- "creator": self._creator_link,
200
- }
201
- )
194
+ ) % {
195
+ "goal_name": self._goal_name,
196
+ "creator": self._creator_link,
197
+ }
202
198
  self._color = Webhook.Color.SUCCESS
203
199
 
204
200
 
@@ -209,9 +205,8 @@ class NotificationCorpGoalCreated(NotificationCorpGoalEmbed):
209
205
  self._description = _(
210
206
  "Project **%(goal_name)s** has been created by %(creator)s "
211
207
  "and is open for contributions."
212
- % {
213
- "goal_name": self._goal_name,
214
- "creator": self._creator_link,
215
- }
216
- )
208
+ ) % {
209
+ "goal_name": self._goal_name,
210
+ "creator": self._creator_link,
211
+ }
217
212
  self._color = Webhook.Color.INFO
@@ -14,12 +14,15 @@ from allianceauth.services.hooks import get_extension_logger
14
14
  from app_utils.urls import reverse_absolute, static_file_absolute_url
15
15
 
16
16
  from structures import __title__
17
+ from structures.core.notification_embeds.helpers import (
18
+ gen_alliance_link,
19
+ gen_corporation_link,
20
+ target_datetime_formatted,
21
+ )
17
22
  from structures.core.notification_types import NotificationType
18
23
  from structures.helpers import get_or_create_eve_entity, is_absolute_url
19
24
  from structures.models.notifications import Notification, NotificationBase, Webhook
20
25
 
21
- from .helpers import gen_alliance_link, gen_corporation_link, target_datetime_formatted
22
-
23
26
  logger = get_extension_logger(__name__)
24
27
 
25
28
 
@@ -183,13 +186,13 @@ class NotificationBaseEmbed:
183
186
  def create(notif: "NotificationBase") -> "NotificationBaseEmbed":
184
187
  """Creates a new instance of the respective subclass for given Notification."""
185
188
 
186
- from .billing_embeds import (
189
+ from structures.core.notification_embeds.billing_embeds import (
187
190
  NotificationBillingBillOutOfMoneyMsg,
188
191
  NotificationBillingIHubBillAboutToExpire,
189
192
  NotificationBillingIHubDestroyedByBillFailure,
190
193
  NotificationCorpAllBillMsg,
191
194
  )
192
- from .corporate_embeds import (
195
+ from structures.core.notification_embeds.corporate_embeds import (
193
196
  NotificationCharAppAcceptMsg,
194
197
  NotificationCharAppRejectMsg,
195
198
  NotificationCharAppWithdrawMsg,
@@ -201,25 +204,25 @@ class NotificationBaseEmbed:
201
204
  NotificationCorpGoalCompleted,
202
205
  NotificationCorpGoalCreated,
203
206
  )
204
- from .moonmining_embeds import (
207
+ from structures.core.notification_embeds.moonmining_embeds import (
205
208
  NotificationMoonminningAutomaticFracture,
206
209
  NotificationMoonminningExtractionCanceled,
207
210
  NotificationMoonminningExtractionFinished,
208
211
  NotificationMoonminningExtractionStarted,
209
212
  NotificationMoonminningLaserFired,
210
213
  )
211
- from .orbital_embeds import (
214
+ from structures.core.notification_embeds.orbital_embeds import (
212
215
  NotificationOrbitalAttacked,
213
216
  NotificationOrbitalReinforced,
214
217
  )
215
- from .skyhook_embeds import (
218
+ from structures.core.notification_embeds.skyhook_embeds import (
216
219
  NotificationSkyhookDeployed,
217
220
  NotificationSkyhookDestroyed,
218
221
  NotificationSkyhookLostShield,
219
222
  NotificationSkyhookOnline,
220
223
  NotificationSkyhookUnderAttack,
221
224
  )
222
- from .sov_embeds import (
225
+ from structures.core.notification_embeds.sov_embeds import (
223
226
  NotificationSovAllAnchoringMsg,
224
227
  NotificationSovAllClaimAcquiredMsg,
225
228
  NotificationSovAllClaimLostMsg,
@@ -228,7 +231,7 @@ class NotificationBaseEmbed:
228
231
  NotificationSovStructureDestroyed,
229
232
  NotificationSovStructureReinforced,
230
233
  )
231
- from .structures_embeds import (
234
+ from structures.core.notification_embeds.structures_embeds import (
232
235
  NotificationStructureAnchoring,
233
236
  NotificationStructureDestroyed,
234
237
  NotificationStructureFuelAlert,
@@ -247,13 +250,13 @@ class NotificationBaseEmbed:
247
250
  NotificationStructureWentHighPower,
248
251
  NotificationStructureWentLowPower,
249
252
  )
250
- from .tower_embeds import (
253
+ from structures.core.notification_embeds.tower_embeds import (
251
254
  NotificationTowerAlertMsg,
252
255
  NotificationTowerRefueledExtra,
253
256
  NotificationTowerReinforcedExtra,
254
257
  NotificationTowerResourceAlertMsg,
255
258
  )
256
- from .war_embeds import (
259
+ from structures.core.notification_embeds.war_embeds import (
257
260
  NotificationAcceptedAlly,
258
261
  NotificationAllWarCorpJoinedAllianceMsg,
259
262
  NotificationAllWarSurrenderMsg,
@@ -10,15 +10,14 @@ from django.utils.translation import gettext as _
10
10
  from app_utils.datetime import ldap_time_2_datetime
11
11
 
12
12
  from structures.app_settings import STRUCTURES_NOTIFICATION_SHOW_MOON_ORE
13
- from structures.helpers import get_or_create_eve_entity, get_or_create_eve_type
14
- from structures.models import Notification, Webhook
15
-
16
- from .helpers import (
13
+ from structures.core.notification_embeds.helpers import (
17
14
  gen_corporation_link,
18
15
  gen_solar_system_text,
19
16
  target_datetime_formatted,
20
17
  )
21
- from .main import NotificationBaseEmbed
18
+ from structures.core.notification_embeds.main import NotificationBaseEmbed
19
+ from structures.helpers import get_or_create_eve_entity, get_or_create_eve_type
20
+ from structures.models import Notification, Webhook
22
21
 
23
22
 
24
23
  class NotificationMoonminingEmbed(NotificationBaseEmbed):
@@ -9,15 +9,14 @@ from django.utils.translation import gettext as _
9
9
  from app_utils.datetime import ldap_time_2_datetime
10
10
 
11
11
  from structures.constants import EveTypeId
12
- from structures.helpers import get_or_create_eve_type
13
- from structures.models import Notification, Webhook
14
-
15
- from .helpers import (
12
+ from structures.core.notification_embeds.helpers import (
16
13
  gen_corporation_link,
17
14
  gen_solar_system_text,
18
15
  target_datetime_formatted,
19
16
  )
20
- from .main import NotificationBaseEmbed
17
+ from structures.core.notification_embeds.main import NotificationBaseEmbed
18
+ from structures.helpers import get_or_create_eve_type
19
+ from structures.models import Notification, Webhook
21
20
 
22
21
 
23
22
  class NotificationOrbitalEmbed(NotificationBaseEmbed):
@@ -8,14 +8,13 @@ from django.utils.translation import gettext as _
8
8
 
9
9
  from app_utils.datetime import ldap_time_2_datetime
10
10
 
11
- from structures.models import Notification, Webhook
12
-
13
- from .helpers import (
11
+ from structures.core.notification_embeds.helpers import (
14
12
  gen_corporation_link,
15
13
  gen_solar_system_text,
16
14
  target_datetime_formatted,
17
15
  )
18
- from .main import NotificationBaseEmbed
16
+ from structures.core.notification_embeds.main import NotificationBaseEmbed
17
+ from structures.models import Notification, Webhook
19
18
 
20
19
 
21
20
  class NotificationSkyhookEmbed(NotificationBaseEmbed):
@@ -78,12 +77,8 @@ class NotificationSkyhookUnderAttack(NotificationSkyhookEmbed):
78
77
  def __init__(self, n: Notification) -> None:
79
78
  super().__init__(n)
80
79
  self._title = _("Skyhook under attack")
81
- self._description += _(
82
- "is under attack by %(attacker)s.\n"
83
- "%(damage_text)s"
84
- % {
85
- "attacker": self.gen_attacker_link(),
86
- "damage_text": self.compile_damage_text("Percentage"),
87
- }
88
- )
80
+ self._description += _("is under attack by %(attacker)s.\n%(damage_text)s") % {
81
+ "attacker": self.gen_attacker_link(),
82
+ "damage_text": self.compile_damage_text("Percentage"),
83
+ }
89
84
  self._color = Webhook.Color.DANGER
@@ -11,21 +11,20 @@ from app_utils.datetime import ldap_time_2_datetime
11
11
 
12
12
  from structures.constants import EveTypeId
13
13
  from structures.core import sovereignty
14
- from structures.helpers import (
15
- get_or_create_esi_obj,
16
- get_or_create_eve_entity,
17
- get_or_create_eve_type,
18
- )
19
- from structures.models import Notification, Webhook
20
-
21
- from .helpers import (
14
+ from structures.core.notification_embeds.helpers import (
22
15
  gen_alliance_link,
23
16
  gen_corporation_link,
24
17
  gen_eve_entity_link,
25
18
  gen_solar_system_text,
26
19
  target_datetime_formatted,
27
20
  )
28
- from .main import NotificationBaseEmbed
21
+ from structures.core.notification_embeds.main import NotificationBaseEmbed
22
+ from structures.helpers import (
23
+ get_or_create_esi_obj,
24
+ get_or_create_eve_entity,
25
+ get_or_create_eve_type,
26
+ )
27
+ from structures.models import Notification, Webhook
29
28
 
30
29
 
31
30
  class NotificationSovEmbed(NotificationBaseEmbed):
@@ -10,16 +10,15 @@ from django.utils.translation import gettext as _
10
10
 
11
11
  from app_utils.datetime import ldap_time_2_datetime, ldap_timedelta_2_timedelta
12
12
 
13
- from structures.helpers import get_or_create_eve_entity, get_or_create_eve_type
14
- from structures.models import Notification, Structure, Webhook
15
-
16
- from .helpers import (
13
+ from structures.core.notification_embeds.helpers import (
17
14
  gen_corporation_link,
18
15
  gen_solar_system_text,
19
16
  target_datetime_formatted,
20
17
  timeuntil,
21
18
  )
22
- from .main import NotificationBaseEmbed
19
+ from structures.core.notification_embeds.main import NotificationBaseEmbed
20
+ from structures.helpers import get_or_create_eve_entity, get_or_create_eve_type
21
+ from structures.models import Notification, Structure, Webhook
23
22
 
24
23
 
25
24
  class NotificationStructureEmbed(NotificationBaseEmbed):
@@ -96,7 +95,9 @@ class NotificationStructureJumpFuelAlert(NotificationStructureEmbed):
96
95
  super().__init__(notification)
97
96
  self._title = _("Jump gate low on Liquid Ozone")
98
97
  threshold_str = f"{self._data['threshold']:,}"
99
- quantity_str = f"{self._structure.jump_fuel_quantity():,}"
98
+ quantity_str = (
99
+ f"{self._structure.jump_fuel_quantity():,}" if self._structure else "?"
100
+ )
100
101
  self._description += _(
101
102
  "is below %(threshold)s units on Liquid Ozone.\n"
102
103
  "Remaining units: %(remaining)s."
@@ -263,13 +264,19 @@ class NotificationStructureReinforceChange(NotificationBaseEmbed):
263
264
 
264
265
  def __init__(self, notification: Notification) -> None:
265
266
  super().__init__(notification)
267
+ structure_ids = [
268
+ structure_info[0] for structure_info in self._data["allStructureInfo"]
269
+ ]
270
+ structures_by_id = {
271
+ structure.id: structure
272
+ for structure in Structure.objects.select_related_defaults().filter(
273
+ id__in=structure_ids
274
+ )
275
+ }
266
276
  all_structure_info = []
267
277
  for structure_info in self._data["allStructureInfo"]:
268
- try:
269
- structure = Structure.objects.select_related_defaults().get(
270
- id=structure_info[0]
271
- )
272
- except Structure.DoesNotExist:
278
+ structure = structures_by_id.get(structure_info[0])
279
+ if structure is None:
273
280
  all_structure_info.append(
274
281
  self.StructureInfo(
275
282
  name=structure_info[1],
@@ -9,15 +9,14 @@ import dhooks_lite
9
9
  from django.utils.translation import gettext as _
10
10
 
11
11
  from structures.core import starbases
12
- from structures.models import GeneratedNotification, Notification, Structure, Webhook
13
-
14
- from .helpers import (
12
+ from structures.core.notification_embeds.helpers import (
15
13
  gen_corporation_link,
16
14
  gen_solar_system_text,
17
15
  target_datetime_formatted,
18
16
  timeuntil,
19
17
  )
20
- from .main import NotificationBaseEmbed
18
+ from structures.core.notification_embeds.main import NotificationBaseEmbed
19
+ from structures.models import GeneratedNotification, Notification, Structure, Webhook
21
20
 
22
21
 
23
22
  class NotificationTowerEmbed(NotificationBaseEmbed):
@@ -11,12 +11,14 @@ from django.utils.translation import gettext as _
11
11
  from app_utils.datetime import ldap_time_2_datetime
12
12
  from app_utils.helpers import humanize_number
13
13
 
14
+ from structures.core.notification_embeds.helpers import (
15
+ gen_eve_entity_link,
16
+ target_datetime_formatted,
17
+ )
18
+ from structures.core.notification_embeds.main import NotificationBaseEmbed
14
19
  from structures.helpers import get_or_create_eve_entity
15
20
  from structures.models import Notification, Webhook
16
21
 
17
- from .helpers import gen_eve_entity_link, target_datetime_formatted
18
- from .main import NotificationBaseEmbed
19
-
20
22
 
21
23
  class NotificationAcceptedAlly(NotificationBaseEmbed):
22
24
  def __init__(self, notification: Notification) -> None:
@@ -294,7 +296,7 @@ class NotificationCorpWarSurrenderMsg(NotificationWarBaseEmbed):
294
296
  class NotificationWarHQRemovedFromSpace(NotificationWarBaseEmbed):
295
297
  def __init__(self, notification: Notification) -> None:
296
298
  super().__init__(notification)
297
- war_hq = self._data["warHQ"]
299
+ war_hq = strip_tags(self._data["warHQ"])
298
300
  time_declared = ldap_time_2_datetime(self._data["timeDeclared"])
299
301
  self._title = _("WarHQ %s lost") % war_hq
300
302
  self._description = _(