aa-structures 2.8.0__py3-none-any.whl → 2.9.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. {aa_structures-2.8.0.dist-info → aa_structures-2.9.1.dist-info}/METADATA +2 -2
  2. {aa_structures-2.8.0.dist-info → aa_structures-2.9.1.dist-info}/RECORD +62 -61
  3. structures/__init__.py +1 -1
  4. structures/admin.py +3 -3
  5. structures/app_settings.py +88 -69
  6. structures/core/notification_embeds/billing_embeds.py +40 -7
  7. structures/core/notification_embeds/{character_embeds.py → corporate_embeds.py} +23 -13
  8. structures/core/notification_embeds/main.py +76 -38
  9. structures/core/notification_embeds/moonmining_embeds.py +12 -17
  10. structures/core/notification_embeds/orbital_embeds.py +3 -8
  11. structures/core/notification_embeds/sov_embeds.py +21 -19
  12. structures/core/notification_embeds/structures_embeds.py +19 -26
  13. structures/core/notification_embeds/tower_embeds.py +2 -2
  14. structures/core/notification_embeds/war_embeds.py +298 -92
  15. structures/core/notification_types.py +63 -44
  16. structures/forms.py +0 -1
  17. structures/helpers.py +13 -0
  18. structures/locale/de/LC_MESSAGES/django.po +488 -302
  19. structures/locale/django.pot +494 -308
  20. structures/locale/en/LC_MESSAGES/django.po +494 -308
  21. structures/locale/es/LC_MESSAGES/django.po +488 -302
  22. structures/locale/fr_FR/LC_MESSAGES/django.po +494 -308
  23. structures/locale/it_IT/LC_MESSAGES/django.po +494 -308
  24. structures/locale/ja/LC_MESSAGES/django.po +494 -308
  25. structures/locale/ko_KR/LC_MESSAGES/django.po +488 -302
  26. structures/locale/ru/LC_MESSAGES/django.mo +0 -0
  27. structures/locale/ru/LC_MESSAGES/django.po +532 -349
  28. structures/locale/uk/LC_MESSAGES/django.po +488 -302
  29. structures/locale/zh_Hans/LC_MESSAGES/django.po +488 -302
  30. structures/migrations/0005_add_notification_types.py +135 -0
  31. structures/models/eveuniverse.py +0 -1
  32. structures/models/notifications.py +1 -1
  33. structures/models/owners.py +3 -1
  34. structures/tests/core/notification_embeds/test_main.py +29 -27
  35. structures/tests/core/test_notification_structuretimers.py +2 -1
  36. structures/tests/core/test_notifications_timerboard.py +2 -1
  37. structures/tests/core/test_serializers.py +4 -2
  38. structures/tests/core/test_starbases.py +4 -2
  39. structures/tests/integration/test_tasks.py +2 -1
  40. structures/tests/integration/test_views.py +6 -3
  41. structures/tests/models/test_eveuniverse.py +2 -1
  42. structures/tests/models/test_notifications_1.py +16 -21
  43. structures/tests/models/test_notifications_2.py +4 -2
  44. structures/tests/models/test_notifications_3.py +6 -3
  45. structures/tests/models/test_notifications_discord.py +2 -1
  46. structures/tests/models/test_owners_1.py +28 -4
  47. structures/tests/models/test_owners_2.py +2 -1
  48. structures/tests/models/test_owners_3.py +2 -1
  49. structures/tests/models/test_owners_4.py +2 -1
  50. structures/tests/models/test_owners_5.py +8 -4
  51. structures/tests/models/test_structures.py +16 -8
  52. structures/tests/test_helpers.py +23 -3
  53. structures/tests/test_managers_1.py +16 -8
  54. structures/tests/test_managers_2.py +2 -1
  55. structures/tests/test_tasks.py +12 -6
  56. structures/tests/testdata/entities.json +150 -0
  57. structures/tests/testdata/helpers.py +1 -0
  58. structures/tests/views/test_public.py +2 -1
  59. structures/tests/views/test_statistics.py +2 -1
  60. structures/tests/views/test_structures.py +20 -10
  61. {aa_structures-2.8.0.dist-info → aa_structures-2.9.1.dist-info}/LICENSE +0 -0
  62. {aa_structures-2.8.0.dist-info → aa_structures-2.9.1.dist-info}/WHEEL +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aa-structures
3
- Version: 2.8.0
3
+ Version: 2.9.1
4
4
  Summary: App for managing Eve Online structures with Alliance Auth.
5
5
  Author-email: Erik Kalkoken <kalkoken87@gmail.com>
6
6
  Requires-Python: >=3.8
@@ -106,7 +106,7 @@ This is an example for a notification posted on Discord:
106
106
 
107
107
  ![Notification example](https://i.imgur.com/oqBqeFy.png)
108
108
 
109
- ## Installation
109
+ ## Documentation
110
110
 
111
111
  Please see the [operation manual](https://aa-structures.readthedocs.io/en/latest/operations.html#installation) for the installation guide.
112
112
 
@@ -1,53 +1,53 @@
1
- structures/__init__.py,sha256=PFHURRAAwRO2isL71Yh4tt5zh27lozWI4fTy0d3LUYI,203
2
- structures/admin.py,sha256=2i08sj8vIOaSWq3sT_lHJi9YpWKtMtrL4Pg2V-Ly7OM,38634
3
- structures/app_settings.py,sha256=nNERL_qmuaa8EkzvT3rzVD8KhKeajS0fRaTPK4suArM,6267
1
+ structures/__init__.py,sha256=JDqVcTEi8eCaAdMSvOph_y7iv7PQbntaqVFeo0pFNS0,203
2
+ structures/admin.py,sha256=cn6AtcSDI6bJROhBnvE2iQwOkm1t3NVabrpTVphxbTk,38662
3
+ structures/app_settings.py,sha256=7BFWl1Q4tqTuj3CV6BmEctIFKJx9QIUfm2tjKzme2jM,6526
4
4
  structures/apps.py,sha256=MNZH9l3qWCwuS7OGiKGkBVrDzKoOFlqwDdEgyEFzxVA,195
5
5
  structures/auth_hooks.py,sha256=JI9dCNpYdRAPmD2fbiFqhc3ODxqvvyrgQQSmDyrZ3Fk,915
6
6
  structures/constants.py,sha256=R7sC5esaWJayJpTDbug7dTKxkkXDKXQ-U6M9Qb0GH5s,967
7
- structures/forms.py,sha256=DflDFDkyMIeu4hfL72I4SlK2DcFBnRQ9-vXjB8XuHsI,392
8
- structures/helpers.py,sha256=7Q3Kjk_1z9ckvikJ2rchV5fKdnGPzXV4k_Rf8t2m8VM,1890
7
+ structures/forms.py,sha256=kXs-SGIIj-D9xtFCILKe_PMRU4eHl3-HLNWRhaZKmnQ,391
8
+ structures/helpers.py,sha256=_dw7j7yobpcV70VwWxoQiptk69b3ksvaDlRQKHg8Kmg,2344
9
9
  structures/managers.py,sha256=Th_nPY8GNcdBPqqfqjtTriYdsZWFAWknbNqI8QG17vo,19225
10
10
  structures/providers.py,sha256=9QYHd8X5HwBhrbgbX3LUrXXV1KGM3hFhcxK6qIJjJtg,317
11
11
  structures/tasks.py,sha256=INZ3soMYHYfxrQsyTO-ozoxbVX6lpMnF3AUo8ybWIoA,9083
12
12
  structures/urls.py,sha256=rBOv84nMX6WcZEnTZxASrSUhGaqubs4eRLyibDovrUs,1396
13
13
  structures/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  structures/core/notification_timers.py,sha256=G-QwpqP9HFv_Y7KsID9bLF-GluEJ1-duSJQN-zqJtM0,14977
15
- structures/core/notification_types.py,sha256=CL5f8NUdn6hXqW9JEvKpch-2VSgczC3mpjIXlFwwaXQ,11199
15
+ structures/core/notification_types.py,sha256=0SExh-VuImRz05jatnCu9lAfIFORUZ-kon9rjF4SXfI,12279
16
16
  structures/core/serializers.py,sha256=4W6kA7mhVvc-1OSiTl_w0rSio_HUsjIBm9qbkEr9vCY,20965
17
17
  structures/core/sovereignty.py,sha256=XKgjAFO4BfLpEEUz_hBr2DVDnvWBq9sL9EEQiT4T0n0,730
18
18
  structures/core/starbases.py,sha256=nw7skHYATrnAV-zuPAuxmhM5E4Aqjc_DHSU2TYWgBng,1757
19
19
  structures/core/notification_embeds/__init__.py,sha256=30cpjKLZ5_OFtXDACDcjvWQAYszM2BrYxUYb5PRQoTA,131
20
- structures/core/notification_embeds/billing_embeds.py,sha256=PGCdBDfi8JABv5WR0uyNgsAA922mAP3O-y7mQ-yhGH0,3780
21
- structures/core/notification_embeds/character_embeds.py,sha256=BCGser4iZb4di6DOfRAeQLhPydCvA6-kBOjXwlUmRUw,5635
20
+ structures/core/notification_embeds/billing_embeds.py,sha256=d9XkTyYH7U3UDZaqXu0WoN0wvlrT2S68Rfn2jEpVtM4,5164
21
+ structures/core/notification_embeds/corporate_embeds.py,sha256=mfm6dDrgzupyRZ9TZGXML-UGoY_PymNj9LuR8EthdDA,6098
22
22
  structures/core/notification_embeds/helpers.py,sha256=0SlrLLFyV0IrdOYfIOLQs0xZgzK8bO7Iroqh7dZnm98,2974
23
- structures/core/notification_embeds/main.py,sha256=ZIaziWVP9kG0uAPZbwjJK2sBwCM_1pS7JFlfn6iLxqA,13536
24
- structures/core/notification_embeds/moonmining_embeds.py,sha256=65psg46D2jGgtC-TIjkBtPUHhjSdqYKZaO5GPwenJCQ,7313
25
- structures/core/notification_embeds/orbital_embeds.py,sha256=0By9aYJx2hInazvMx5eVJvDkSXcND5ztURfKVPuWZjQ,2961
26
- structures/core/notification_embeds/sov_embeds.py,sha256=3UI2xcfrfBJYizxJLX16MSx57rbAlHWdGhcZx34gh38,9007
27
- structures/core/notification_embeds/structures_embeds.py,sha256=MksPSYMeydDPUKNeOdhzXaNO539aJGwYlS7Zj-z9kdo,13476
28
- structures/core/notification_embeds/tower_embeds.py,sha256=etUR9I0VTtAyLX3EWqUZAzte1MaXasLYIgFqCQ1qjnI,5869
29
- structures/core/notification_embeds/war_embeds.py,sha256=Qc-RUuuSmT1EBkV9D-_vZQ5QX30UGLow2PonC-wBO6U,9050
30
- structures/locale/django.pot,sha256=QLXQt2otX5j-UhWbwtze2pNFrgfDyLBm6hBuJgjeIVE,63403
23
+ structures/core/notification_embeds/main.py,sha256=N-l9PJYxgsBvcPOG1WQ2OgxC6hCAQnxgx2V1gWUsSMc,15233
24
+ structures/core/notification_embeds/moonmining_embeds.py,sha256=5OJtfwoLE18mB62iwyHTcMo9eOPBC2vQFSjQlDnTcTY,7130
25
+ structures/core/notification_embeds/orbital_embeds.py,sha256=ovAnTqrc2X0s-HhQS-UleI8J5-gJEO361HYJzcoAdeQ,2864
26
+ structures/core/notification_embeds/sov_embeds.py,sha256=_r4U5zN3MfEag9FCeN0my2d4qfMBUwYUGWW-oGftjn8,8901
27
+ structures/core/notification_embeds/structures_embeds.py,sha256=YOLCnfxIaui7C8HXbWh3grq3eC6TwmdwC4h5ACd05U4,13236
28
+ structures/core/notification_embeds/tower_embeds.py,sha256=n76URsS5xUOCXSYQMNzXeNk_msV08-0eNokeku1TDNs,5848
29
+ structures/core/notification_embeds/war_embeds.py,sha256=Wj5SuTP1jGRug8_x7qy8oyRCv9CjlZON7-RpJ2k57I4,18333
30
+ structures/locale/django.pot,sha256=t4voMGKIXRUW7sYx7Rmut2tVyBtg2rUcIB5BK_POWTM,68368
31
31
  structures/locale/de/LC_MESSAGES/django.mo,sha256=Ok2o1b-v0o7uGfARfS6dmXLGMUHRjEp9nEjf0IJEYvM,3997
32
- structures/locale/de/LC_MESSAGES/django.po,sha256=ILzz6mr0xJXXTkyhhcLBeJPa1RhiLbDIdhmay8q6Yew,64660
32
+ structures/locale/de/LC_MESSAGES/django.po,sha256=8Ozlf0TZ8l9KQf9U_DKZiEFOwpflxA0gF5mjd-NzXY0,69625
33
33
  structures/locale/en/LC_MESSAGES/django.mo,sha256=N1pb17IfLd0ASiKO8d68-B4ygSpDkhKOCs8YTzMXQo0,380
34
- structures/locale/en/LC_MESSAGES/django.po,sha256=YF_18UZtnsjwgxsCalFvp8XBkS5kDAWuhcEmvEvUvpg,63450
34
+ structures/locale/en/LC_MESSAGES/django.po,sha256=9sS0l0uUCWEjWk7ESI6_eIR2C4vdtqRWVBUodMGvMOc,68415
35
35
  structures/locale/es/LC_MESSAGES/django.mo,sha256=htEILnvb29fbtfWUHaalRhIU1kx7ylRarFNgXjNYBuk,871
36
- structures/locale/es/LC_MESSAGES/django.po,sha256=dCXIF-N7AnluNsHdVEBk_TAmLRhGcb90cX9N_7kQrkQ,63668
36
+ structures/locale/es/LC_MESSAGES/django.po,sha256=lkbJ7h1WY811SabgkldzlfYkTkg6lMscntsXUNDRoTs,68633
37
37
  structures/locale/fr_FR/LC_MESSAGES/django.mo,sha256=UXCQbz2AxBvh-IQ7bGgjoBnijo8h9DfE9107A-2Mgkk,337
38
- structures/locale/fr_FR/LC_MESSAGES/django.po,sha256=QLXQt2otX5j-UhWbwtze2pNFrgfDyLBm6hBuJgjeIVE,63403
38
+ structures/locale/fr_FR/LC_MESSAGES/django.po,sha256=t4voMGKIXRUW7sYx7Rmut2tVyBtg2rUcIB5BK_POWTM,68368
39
39
  structures/locale/it_IT/LC_MESSAGES/django.mo,sha256=UXCQbz2AxBvh-IQ7bGgjoBnijo8h9DfE9107A-2Mgkk,337
40
- structures/locale/it_IT/LC_MESSAGES/django.po,sha256=QLXQt2otX5j-UhWbwtze2pNFrgfDyLBm6hBuJgjeIVE,63403
40
+ structures/locale/it_IT/LC_MESSAGES/django.po,sha256=t4voMGKIXRUW7sYx7Rmut2tVyBtg2rUcIB5BK_POWTM,68368
41
41
  structures/locale/ja/LC_MESSAGES/django.mo,sha256=XMj5I8Aah7EGpU-KfFOr25hoOxxLT5dfmjror1-uc8g,373
42
- structures/locale/ja/LC_MESSAGES/django.po,sha256=fvioFZuvDBwQNMACEcZaNr0ELEa_YaYBzBXPwyP6lOA,63443
42
+ structures/locale/ja/LC_MESSAGES/django.po,sha256=iSKJtTo_vwoxpXWUc7KWSi9KYU53wuY3d-UW1EQOmDI,68408
43
43
  structures/locale/ko_KR/LC_MESSAGES/django.mo,sha256=Oq6yqHS8xGE_0aqbnmLnzZaLWWbLiapC0_S4tmdLDqA,391
44
- structures/locale/ko_KR/LC_MESSAGES/django.po,sha256=K-palcKQJmh8e0QGPzB-TH6AxxL_Ihq0KemRCMvxcHA,63400
45
- structures/locale/ru/LC_MESSAGES/django.mo,sha256=yWbXPXh3O35tJdiZ3yw52a3kyWmJNeqBdNwcF6TdS6Q,72146
46
- structures/locale/ru/LC_MESSAGES/django.po,sha256=l1keORn5T6JdnBbvFlJWJlGgMMkFeXK2XSuvQY10wFw,101110
44
+ structures/locale/ko_KR/LC_MESSAGES/django.po,sha256=WGI_8JvcFzUNBDGe2qFZtF0Tmuz3cU9Uuziy1jnBHio,68365
45
+ structures/locale/ru/LC_MESSAGES/django.mo,sha256=jZn0km-0U_9Ptoa1Pd86W1AKelHm-6AVsLHNhq00kPc,71503
46
+ structures/locale/ru/LC_MESSAGES/django.po,sha256=n0Lrghbqn7knai4Ge8B49RzxKsu8J-k08iR8m9Gnp7c,105690
47
47
  structures/locale/uk/LC_MESSAGES/django.mo,sha256=WJ7UMXi2qaLIrpvAm-c-O78ZBcbnQfTzQAK0Xp1LIak,609
48
- structures/locale/uk/LC_MESSAGES/django.po,sha256=ucqBeiR1gLrmMigCforS-CnywMW4ThHzInaJp5UBOuw,63618
48
+ structures/locale/uk/LC_MESSAGES/django.po,sha256=_JVzKfnE7xp5EYMq_E54uzmy7O3XcrVgWBrGKJz5lIQ,68583
49
49
  structures/locale/zh_Hans/LC_MESSAGES/django.mo,sha256=V_JgRtRNO3MiIwq46ZnFuXT2vDGpwAEJVdpp6KUOQ2g,2869
50
- structures/locale/zh_Hans/LC_MESSAGES/django.po,sha256=MR8po2_Ov1jHKd2OoQgr89ytnR9dVUmAJva2EHLQEbg,64210
50
+ structures/locale/zh_Hans/LC_MESSAGES/django.po,sha256=UYQenfsOa57622q7Dp39ukwZATqBpJksFD9xG9uUGEw,69175
51
51
  structures/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  structures/management/commands/structures_load_eve.py,sha256=UIGjeOchZr5eM8LtRpRp6-328tphQ11uITfriCtXjzM,1507
53
53
  structures/management/commands/structures_preload_eveuniverse.py,sha256=oYf4OILhQmTodMGV_01b96aqouP5FmWmvbTxi9v0xa0,2489
@@ -56,11 +56,12 @@ structures/migrations/0001_initial_new.py,sha256=gTOP7WzToi3gYprjLPdPfrHgQLcEaFq
56
56
  structures/migrations/0002_remove_eveuniverse_relation_names.py,sha256=yXOFSolB0R3ONp0jaWJjJG3M3kDDBYQIVRrZzFIXlLY,2274
57
57
  structures/migrations/0003_add_localization_and_unique_key.py,sha256=ZxJMfUtgUH2W8Z0zbN-iqMzjC3-1pvsbywJFyFMxWGA,44042
58
58
  structures/migrations/0004_improve_localization.py,sha256=R29j2Ki9I_yOvEQTxEu_zMnZrR7JkSGpmvMTpp9XjqM,14014
59
+ structures/migrations/0005_add_notification_types.py,sha256=aIgNZN4Gsvh9GiJ0i4XmXopT0qqjZTQrdVjZaVIJKP8,7087
59
60
  structures/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
61
  structures/models/__init__.py,sha256=Da0-Z4BtsZ_mlnI6XtyvoE0UtTuOA0psGCuVhVPVKrM,916
61
- structures/models/eveuniverse.py,sha256=CifvydjKeci7bS20RYdkcn-J9YUUdrUwt6tI4EvPln4,2214
62
- structures/models/notifications.py,sha256=3pwkZXW_tMalcanSzJWKsR3R-FhDCZasEqnC_TSNUMA,35169
63
- structures/models/owners.py,sha256=ryePMT-91krq2XLxIINFFGNhCj4vef-zyrwzwF26Pjw,53885
62
+ structures/models/eveuniverse.py,sha256=vTIfzZL9guEDuZHQvRdG6pI4zSEdMqfVE-2SkHdqbRo,2213
63
+ structures/models/notifications.py,sha256=tznJo2prNjhk9C7S4cDrQxftIvuLcidB6vSkvFfb4mw,35146
64
+ structures/models/owners.py,sha256=8tw8mR2ti9MpPs5ajeV5AONY53cvO5XnucrfIOQXEA4,53953
64
65
  structures/models/structures_1.py,sha256=e1sI-2zMSKcPi2PyYA--fcc8rn-yQwODzlUHKjeWgLI,29778
65
66
  structures/models/structures_2.py,sha256=g5Pct5jNmZC-n7fnpLs5UyiP9JLrGdI1vjYucHTV_wQ,10371
66
67
  structures/static/structures/css/global.css,sha256=R4LEH9PwLoN77qkqBK7u2y_vzRC3fq8X_zKnAW7yhiA,1165
@@ -156,52 +157,52 @@ structures/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
156
157
  structures/templatetags/structures.py,sha256=vSt5AnfYuo11q1SxiskT4oshSMsZ9ZgM0nYpYiMl8bA,1637
157
158
  structures/tests/__init__.py,sha256=9MrJzKr8DdsQY3-79v188pTpwqT4TDQ46vKnBJAGqic,75
158
159
  structures/tests/test_admin.py,sha256=_kV4giMVn-Pp77er0V5Pu10eBBohzT_oEdnl6D6q5bM,24333
159
- structures/tests/test_helpers.py,sha256=vYjUXWFcFzavbiRzQgq0Tcvix7AuCoe-BxVVS-BToM8,4291
160
- structures/tests/test_managers_1.py,sha256=mCOZLGLhHWPIEObdy194_VgkB6pdshhu4SNOPeYFwOM,34339
161
- structures/tests/test_managers_2.py,sha256=2jAkjVBu4CA7irFRp3oqPJneJbMON1ixznS4wZXGOTk,2916
162
- structures/tests/test_tasks.py,sha256=1gGG9Nm4ofV4YBjjgt7OT35vuh1vU9ri24NaBul5lqY,17113
160
+ structures/tests/test_helpers.py,sha256=BQC-4H-9-v5qW4nugqy0bkxuGlA3UO2clYY2lI2LjoY,4893
161
+ structures/tests/test_managers_1.py,sha256=ruKq5VRYHdStDQe3uzVhcxF0seQQfmdudJEUYXzi8bY,34539
162
+ structures/tests/test_managers_2.py,sha256=COF4DO67ejHueNwmVj5mtj9ps-FCq9uJQYTmWwpQW7Y,2942
163
+ structures/tests/test_tasks.py,sha256=reL1rPv_kvTgsC4lq5SXulkbEHaJrw5B1-hFI4tiDWY,17269
163
164
  structures/tests/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
164
- structures/tests/core/test_notification_structuretimers.py,sha256=ByE9pH2MuuEr-RcelzqCsvHqGxFWsCDng1fGx2NMb4Y,10827
165
+ structures/tests/core/test_notification_structuretimers.py,sha256=OvldjgIHmRVsqoC9C6VJRqwS9WeRFMgpyutRc69PjAU,10857
165
166
  structures/tests/core/test_notification_types.py,sha256=WNJGXoxO3LbgxPgCH416IJElREWFBtwx5pw8IulsmYo,9881
166
- structures/tests/core/test_notifications_timerboard.py,sha256=1Elr89cu-1ySVSeYcEb69sXJSG-v1NMNmA3YK0Xwl5g,5553
167
- structures/tests/core/test_serializers.py,sha256=A6W74qTaPPIDhTetafuhvtR_xs2D-DfSMhX_dFELVvw,7004
167
+ structures/tests/core/test_notifications_timerboard.py,sha256=OMkAWH_jWXzCwotp6W2qWG6GpSGisyunZYOoy1UZomU,5583
168
+ structures/tests/core/test_serializers.py,sha256=ACs6x1IhesoJBFG76RmlglDWqaMlOuqq5kPyzvjGeKI,7056
168
169
  structures/tests/core/test_sovereignty.py,sha256=SGgNw6NxmaU3jV-EDhKJRLfHnRnqDCwm4oCoO-8gt9w,821
169
- structures/tests/core/test_starbases.py,sha256=5T8Sp6DO9kOjSQullF0VTri_NqQ3EfxmjQ1hKyk9t3c,3134
170
+ structures/tests/core/test_starbases.py,sha256=Q3EZVIKZGzxUUvvn0TvZYOL9YQ-baiTRTT83xWqTAhQ,3186
170
171
  structures/tests/core/notification_embeds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
171
172
  structures/tests/core/notification_embeds/test_helpers.py,sha256=HG20TC8Bz7NqpaQWo6uvrsxfNIwTL2Zi_NRkh3UyN2Y,1776
172
- structures/tests/core/notification_embeds/test_main.py,sha256=fMoyTl0tt9Wo0o1-RNxrD8Du29wGxjY1JA09IVMPXao,14114
173
+ structures/tests/core/notification_embeds/test_main.py,sha256=vTDByjxxVCA6KMcr5XH4f4QsMgcDI_YDd-fjZfHztng,13808
173
174
  structures/tests/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
174
- structures/tests/integration/test_tasks.py,sha256=6CxJ0lmRWr_Li-8egLrZp1hvlB6k6mPucMolw1Twjgo,23562
175
- structures/tests/integration/test_views.py,sha256=2X_Hg5zJVYI0IZGwgsi-2QzjNlBn30pI51vvifmEYEI,4253
175
+ structures/tests/integration/test_tasks.py,sha256=nb2HjS31ArQfoD2FIjQN-QHGGR4Xcqs9J1ICshmJVDA,23588
176
+ structures/tests/integration/test_views.py,sha256=iA3chzZXhrnZzyBGmpRm-rQsKa6ru7y34fdB7CBtKDw,4331
176
177
  structures/tests/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
177
- structures/tests/models/test_eveuniverse.py,sha256=kAWiNtWfalrrx_vz_hcDls1wtNHYrGYkctilu2Nw9ck,1597
178
- structures/tests/models/test_notifications_1.py,sha256=j1k-r23XPhFR5UxWpXCphGFKOOip74hZvvCjukNHcMQ,30498
179
- structures/tests/models/test_notifications_2.py,sha256=tgkcxKmmomDs3gE7jzEdt_w9wS-Sz0QkH6b1CiSQTZA,31937
180
- structures/tests/models/test_notifications_3.py,sha256=WaJKtlfV05-djV8F-R44jWRFu1dpT3hP9rIEpQ_gNO0,7179
181
- structures/tests/models/test_notifications_discord.py,sha256=XUCrgPQATEHEo2BicbioRdBNT6VoibLcK1U9CoRK3yI,5521
182
- structures/tests/models/test_owners_1.py,sha256=dOnsxXbRQeExOtGY5jbNVvT7QBdKZh3YWFxwE3VXieU,21692
183
- structures/tests/models/test_owners_2.py,sha256=n-0aEeyM8n3SXQrwhvs425zNvO-wU3TvOFgNdjeNlCg,21885
184
- structures/tests/models/test_owners_3.py,sha256=fVCxgBgDOf5mjoq7h8Ty2UfzVL5pbQdT99wk9sc-bdw,16921
185
- structures/tests/models/test_owners_4.py,sha256=SrYYr5GNsu5DWfKhA0hAmouv1YgFuTXk9uM5iAGRzOw,18805
186
- structures/tests/models/test_owners_5.py,sha256=8dJItqYGmwbgXaFSxgT_jlnNwIWVmzTH7R39LIMZ9-E,31503
187
- structures/tests/models/test_structures.py,sha256=jRfW27yRkxPFrkgSRapSMbm_MnRtRJkGaBdCG2FBNU8,41269
178
+ structures/tests/models/test_eveuniverse.py,sha256=bQ1upOLfoivfaa9KCrzjWvSH_EvL2STuvfFfZ9saIMY,1623
179
+ structures/tests/models/test_notifications_1.py,sha256=xVX4an54sZM8WLUdsAGUG2Nb4Rl7W5FBzhI0hBhJo5g,30300
180
+ structures/tests/models/test_notifications_2.py,sha256=wBoB6lHMK4yrd63DSkZ570yXW6coevDtI0pl1ttgB1o,31989
181
+ structures/tests/models/test_notifications_3.py,sha256=u11s0k9EmtFgL3kyb4zDyLVliQLOps701ZgEA2T2i0Y,7257
182
+ structures/tests/models/test_notifications_discord.py,sha256=9_42lcrb2lUUMRqgdRJAub9cJ4QZI71OyoORwK0LEvg,5551
183
+ structures/tests/models/test_owners_1.py,sha256=Xpac4P0xpJUmU8Jz5Ebxu0oSvhGcaW9a6UI7Jxhgmz4,22600
184
+ structures/tests/models/test_owners_2.py,sha256=gkTXpSibPWs1XfZtPvyeEvVebyYZcKERD9GQSYSClYk,21911
185
+ structures/tests/models/test_owners_3.py,sha256=cpDkfFkVvC1v4uuXha1vGUmWZ163huYTUDuZyed9Rdc,16947
186
+ structures/tests/models/test_owners_4.py,sha256=1tLHxeQTE4RacEdckwwQCocWyy0tVYuDDrHnHtQTNlA,18831
187
+ structures/tests/models/test_owners_5.py,sha256=lTSfVY3rPOLyF-IhlKPT4mbRqvuN_NA-kyU0Vzzp9qY,31607
188
+ structures/tests/models/test_structures.py,sha256=6HktwBOsmRtRq5MnRlZnvNixUsWUpRni_XnPjNpMN0Y,41469
188
189
  structures/tests/testdata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
189
190
  structures/tests/testdata/create_eveuniverse.py,sha256=E-Fh-dmuHmLZcqgK2U6mwt9W6dI7H99bG7DaETfcVQY,2129
190
- structures/tests/testdata/entities.json,sha256=GW5EFYLbLFLv2kScLL51x10yLph7RvBj26YrXnr_ehE,26348
191
+ structures/tests/testdata/entities.json,sha256=kmcmmbHG_igHwvkpAJGHQEztEXjlo8McDuojpEBmgqU,32147
191
192
  structures/tests/testdata/esi_data.json,sha256=DX47oSlRZIPxlPueMfiNElbZbAip2cp3LAUmv8GAPJ0,13864
192
193
  structures/tests/testdata/eveuniverse.json,sha256=Z8_EXOF8XNvls9RfBYIHhoNX0rj0NqcjInTU6tZuwhI,993284
193
194
  structures/tests/testdata/factories.py,sha256=I-NQI9c6yakWzvYWg48QyX3-6h2bxoymcvPM0RyiEJw,24718
194
195
  structures/tests/testdata/generate_notifications.py,sha256=nE077mVHVmOVudKIGMtHUfBIcV5Ch5Z0IngD1gp5yQk,5746
195
196
  structures/tests/testdata/generate_notifications_2.py,sha256=mdoGXd9vgy_opmrwTr9MfGe-QieHV4BHtRA7VFzxFKM,1413
196
197
  structures/tests/testdata/generate_structures.py,sha256=4p2ypDj-goniBnraTP2KfWzEX3YLj0qhKPNTfCXy05g,9134
197
- structures/tests/testdata/helpers.py,sha256=tmcpir7rkz4hfAIUKnYVgFwV2in9K9QRaTQnVf35858,6182
198
+ structures/tests/testdata/helpers.py,sha256=nUecEhe9NqP70zMo8gbAZaWIm2NvzvnF4w9doMtFPY8,6183
198
199
  structures/tests/testdata/load_eveuniverse.py,sha256=e3XQNYZXwmhfLQdvO4D1dfbSwhF1Zwr3ag9nG9E3XDM,395
199
200
  structures/tests/testdata/tasks_loadtest.py,sha256=Hn0UVeaMfdi5S4W12lsb6g_xwjQcNYDmeXvQdTsPfBM,963
200
201
  structures/tests/testdata/test_generate_structures.py,sha256=vpReGRROduZsGB99Dq7yPKNKSkSLFdLM_esdf5TTnnI,414
201
202
  structures/tests/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
202
- structures/tests/views/test_public.py,sha256=kGKtUCHICUYfB-M_iAum9b0m-PJqD0eeB5ifcI_uXto,1346
203
- structures/tests/views/test_statistics.py,sha256=HpmWio5LdGZKVr2SuPiNNUUE4KNa8MYObhh7xBIAcPY,2600
204
- structures/tests/views/test_structures.py,sha256=NYIpLRWF8IrA_sBaazqYSvtzW8iXxzfP74U07etjOTY,28744
203
+ structures/tests/views/test_public.py,sha256=FTaT3VUOnoT4t9rCCTCGyDrberpa8CRJHsXuqAw2PQE,1372
204
+ structures/tests/views/test_statistics.py,sha256=MHt31AIX9_jt8-yP8XsbsiRRUKEtY8mQJbk11saFYZc,2626
205
+ structures/tests/views/test_structures.py,sha256=foTvuaI8x36wwTLiwsfAE1ofVPTJVrnXuBT39sWLBOs,29004
205
206
  structures/tests/views/utils.py,sha256=0ALPjL8d0vcIWa_Pl4_gDl1qtBp71oDqyZLJyvDj-Uc,247
206
207
  structures/views/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
207
208
  structures/views/common.py,sha256=Z_hcpEpkGrhwFdMAAMON_DqsfQ_lMyRwOMl5ROo_aSk,818
@@ -215,7 +216,7 @@ structures/webhooks/models.py,sha256=kUkt9rnRQIJIrU9Bjcs34rvkb-TMbUubHdn-kny08kI
215
216
  structures/webhooks/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
216
217
  structures/webhooks/tests/test_core.py,sha256=4NcEAQgK2KhQkFOxYh2ad0S-qUWh1DNGDmLo5Mo5opI,6762
217
218
  structures/webhooks/tests/test_utils.py,sha256=ekADFv0JOEtXeqdiejbeqrABO__Q1flJHzVieQ7L9e0,459
218
- aa_structures-2.8.0.dist-info/LICENSE,sha256=XZiwB_S_40_HhnvLg5xvtBb3g1oGjPrk0rpFwk8iInE,1070
219
- aa_structures-2.8.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
220
- aa_structures-2.8.0.dist-info/METADATA,sha256=gk_3PCb8cSvayCxZpRb8R0J78-88_w2EKNCvQq0Qv7g,5970
221
- aa_structures-2.8.0.dist-info/RECORD,,
219
+ aa_structures-2.9.1.dist-info/LICENSE,sha256=XZiwB_S_40_HhnvLg5xvtBb3g1oGjPrk0rpFwk8iInE,1070
220
+ aa_structures-2.9.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
221
+ aa_structures-2.9.1.dist-info/METADATA,sha256=yvzawtDxsWgorHAKcQRjx1WJFOc8GbVlvPQcYcL8q50,5971
222
+ aa_structures-2.9.1.dist-info/RECORD,,
structures/__init__.py CHANGED
@@ -3,5 +3,5 @@
3
3
  # pylint: disable = invalid-name
4
4
  default_app_config = "structures.apps.StructuresConfig"
5
5
 
6
- __version__ = "2.8.0"
6
+ __version__ = "2.9.1"
7
7
  __title__ = "Structures"
structures/admin.py CHANGED
@@ -1040,9 +1040,9 @@ class WebhookAdmin(admin.ModelAdmin):
1040
1040
 
1041
1041
  def get_form(self, *args, **kwargs):
1042
1042
  form = super().get_form(*args, **kwargs)
1043
- form.base_fields[
1044
- "notification_types"
1045
- ].choices = NotificationType.choices_enabled()
1043
+ form.base_fields["notification_types"].choices = sorted(
1044
+ NotificationType.choices_enabled(), key=lambda k: k[1]
1045
+ )
1046
1046
  return form
1047
1047
 
1048
1048
  def get_queryset(self, request):
@@ -2,119 +2,157 @@
2
2
 
3
3
  from app_utils.app_settings import clean_setting
4
4
 
5
- # Whether to automatically add timers for certain notifications
6
- # on the timerboard (will have no effect if aa-timerboard app is not installed)
7
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.
10
+ """
8
11
 
9
- # whether admins will get notifications about import events like
10
- # when someone adds a structure owner
11
12
  STRUCTURES_ADMIN_NOTIFICATIONS_ENABLED = clean_setting(
12
13
  "STRUCTURES_ADMIN_NOTIFICATIONS_ENABLED", True
13
14
  )
15
+ """Whether admins will get notifications about import events
16
+ like when someone adds a structure owner and when services for an owner are down.
17
+ """
14
18
 
15
- # Sets the default language to be used in case no language can be determined
16
- # e.g. this language will be used when creating timers
17
- # Please use the language codes as defined in the base.py settings file
18
19
  STRUCTURES_DEFAULT_LANGUAGE = clean_setting("STRUCTURES_DEFAULT_LANGUAGE", "en")
20
+ """Sets the default language to be used in case no language can be determined
21
+ e.g. this language will be used when creating timers
22
+ Please use the language codes as defined in the base.py settings file.
23
+ """
19
24
 
20
- # whether the structure list has default tags filter enabled by default
21
25
  STRUCTURES_DEFAULT_TAGS_FILTER_ENABLED = clean_setting(
22
26
  "STRUCTURES_DEFAULT_TAGS_FILTER_ENABLED", False
23
27
  )
28
+ """Whether the structure list has default tags filter enabled by default."""
24
29
 
25
- # Enables features for developers
26
- # e.g. write access to all models in admin and writing raw data received from ESI
27
- # UNDOCUMENTED SETTING
28
30
  STRUCTURES_DEVELOPER_MODE = clean_setting("STRUCTURES_DEVELOPER_MODE", False)
31
+ """Enables features for developers e.g. write access to all models in admin
32
+ and writing raw data received from ESI.
33
+
34
+ :meta private:
35
+ """
36
+
37
+ STRUCTURES_DEFAULT_PAGE_LENGTH = clean_setting("STRUCTURES_DEFAULT_PAGE_LENGTH", 10)
38
+ """Default page size for structure list.
39
+ Must be an integer value from the current options as seen in the app.
40
+ """
29
41
 
30
- # Whether the customs offices feature is active
31
42
  STRUCTURES_FEATURE_CUSTOMS_OFFICES = clean_setting(
32
43
  "STRUCTURES_FEATURE_CUSTOMS_OFFICES", True
33
44
  )
45
+ """Enable / disable custom offices feature."""
46
+
47
+ STRUCTURES_FEATURE_REFUELED_NOTIFICATIONS = clean_setting(
48
+ "STRUCTURES_FEATURE_REFUELED_NOTIFICATIONS", True
49
+ )
50
+ """Enable / disable refueled notifications feature."""
34
51
 
35
- # Whether the starbases / POSes feature is active
36
52
  STRUCTURES_FEATURE_STARBASES = clean_setting("STRUCTURES_FEATURE_STARBASES", True)
53
+ """Enable / disable starbases feature."""
54
+
55
+ STRUCTURES_ESI_DIRECTOR_ERROR_MAX_RETRIES = clean_setting(
56
+ "STRUCTURES_ESI_DIRECTOR_ERROR_MAX_RETRIES", 3
57
+ )
58
+ """Max retries before a character is deleted when ESI claims the character
59
+ is not a director (Since this sometimes is reported wrongly by ESI).
60
+ """
61
+
62
+ STRUCTURES_ESI_TIMEOUT_ENABLED = clean_setting("STRUCTURES_ESI_TIMEOUT_ENABLED", True)
63
+ """Whether ESI timeout is enabled."""
37
64
 
38
65
 
39
- # defines after how many hours a notification becomes stale
40
- # stale notification will no longer be sent automatically
41
66
  STRUCTURES_HOURS_UNTIL_STALE_NOTIFICATION = clean_setting(
42
67
  "STRUCTURES_HOURS_UNTIL_STALE_NOTIFICATION", 24
43
68
  )
69
+ """Defines after how many hours a notification becomes stale.
70
+ Stale notification will no longer be sent automatically.
71
+ """
44
72
 
45
- # whether to create / remove timers from moon extraction notifications
46
73
  STRUCTURES_MOON_EXTRACTION_TIMERS_ENABLED = clean_setting(
47
74
  "STRUCTURES_MOON_EXTRACTION_TIMERS_ENABLED", True
48
75
  )
76
+ """Whether to create / remove timers from moon extraction notifications."""
49
77
 
50
- # Max number of retries for sending a notification if an error occurred
51
- # e.g. rate limiting
52
78
  STRUCTURES_NOTIFICATION_MAX_RETRIES = clean_setting(
53
79
  "STRUCTURES_NOTIFICATION_MAX_RETRIES", 3
54
80
  )
81
+ """Max number of retries for sending a notification
82
+ if an error occurred e.g. rate limiting.
83
+ """
84
+
85
+ STRUCTURES_NOTIFICATION_SET_AVATAR = clean_setting(
86
+ "STRUCTURES_NOTIFICATION_SET_AVATAR", True
87
+ )
88
+ """Wether structures sets the name and avatar icon of a webhook.
89
+ When ``False`` the webhook will use it's own values as set on the platform.
90
+ """
91
+
92
+ STRUCTURES_NOTIFICATION_SHOW_MOON_ORE = clean_setting(
93
+ "STRUCTURES_NOTIFICATION_SHOW_MOON_ORE", True
94
+ )
95
+ """Wether ore details are shown on moon timers."""
96
+
55
97
 
56
- # Max time in minutes since last successful notification sync
57
- # before service is reported as down
58
98
  STRUCTURES_NOTIFICATION_SYNC_GRACE_MINUTES = clean_setting(
59
99
  "STRUCTURES_NOTIFICATION_SYNC_GRACE_MINUTES", 40
60
100
  )
101
+ """Max time in minutes since last successful notification sync
102
+ before service is reported as down.
103
+ """
61
104
 
62
- # Default wait time in seconds before retrying to send a notification
63
- # to Discord after an error occurred
64
105
  STRUCTURES_NOTIFICATION_WAIT_SEC = clean_setting("STRUCTURES_NOTIFICATION_WAIT_SEC", 5)
106
+ """Default wait time in seconds before retrying to send a notification
107
+ to Discord after an error occurred.
108
+ """
65
109
 
66
- # Enables archiving of all notifications received from ESI to files
67
- # notifications will by stored into one continuous file per corporations
68
- # UNDOCUMENTED SETTING
69
110
  STRUCTURES_NOTIFICATIONS_ARCHIVING_ENABLED = clean_setting(
70
111
  "STRUCTURES_NOTIFICATIONS_ARCHIVING_ENABLED", False
71
112
  )
113
+ """Enables archiving of all notifications received from ESI to files
114
+ notifications will by stored into one continuous file per corporations.
72
115
 
73
- # Wether structures sets the name and avatar icon of a webhook
74
- # else the webhook will show it's default names as set when defining the webhook
75
- STRUCTURES_NOTIFICATION_SET_AVATAR = clean_setting(
76
- "STRUCTURES_NOTIFICATION_SET_AVATAR", True
77
- )
116
+ :meta private:
117
+ """
78
118
 
79
- # Wether ore details are shown on moon timers
80
- STRUCTURES_NOTIFICATION_SHOW_MOON_ORE = clean_setting(
81
- "STRUCTURES_NOTIFICATION_SHOW_MOON_ORE", True
82
- )
119
+ STRUCTURES_PAGING_ENABLED = clean_setting("STRUCTURES_PAGING_ENABLED", True)
120
+ """Whether paging is enabled for the structure list"""
83
121
 
84
- # how to handle notification about NPC attacks
85
122
  STRUCTURES_REPORT_NPC_ATTACKS = clean_setting("STRUCTURES_REPORT_NPC_ATTACKS", True)
123
+ """Enable / disable sending notifications for attacks by NPCs
124
+ (structure reinforcements are still reported).
125
+ """
86
126
 
87
- # whether fuel expires in structures browser is shown as absolute value
88
127
  STRUCTURES_SHOW_FUEL_EXPIRES_RELATIVE = clean_setting(
89
128
  "STRUCTURES_SHOW_FUEL_EXPIRES_RELATIVE", True
90
129
  )
130
+ """Whether fuel expires in structures browser is shown as absolute value."""
91
131
 
92
- # Whether to show the jump gates tab
93
132
  STRUCTURES_SHOW_JUMP_GATES = clean_setting("STRUCTURES_SHOW_JUMP_GATES", True)
133
+ """Whether to show the jump gates tab."""
94
134
 
95
- # Max time in minutes since last successful structures sync
96
- # before service is reported as down
97
135
  STRUCTURES_STRUCTURE_SYNC_GRACE_MINUTES = clean_setting(
98
136
  "STRUCTURES_STRUCTURE_SYNC_GRACE_MINUTES", 120
99
137
  )
138
+ """Max time in minutes since last successful structures sync
139
+ before service is reported as down.
140
+ """
100
141
 
101
- # Hard timeout for tasks in seconds to reduce task accumulation during outages
102
142
  STRUCTURES_TASKS_TIME_LIMIT = clean_setting("STRUCTURES_TASKS_TIME_LIMIT", 7200)
143
+ """Hard timeout for tasks in seconds to reduce task accumulation during outages."""
103
144
 
104
- # whether created timers are corp restricted on the timerboard
105
145
  STRUCTURES_TIMERS_ARE_CORP_RESTRICTED = clean_setting(
106
146
  "STRUCTURES_TIMERS_ARE_CORP_RESTRICTED", False
107
147
  )
148
+ """Whether created timers are corp restricted on the timerboard."""
108
149
 
109
- # whether ESI timeout is enabled
110
- STRUCTURES_ESI_TIMEOUT_ENABLED = clean_setting("STRUCTURES_ESI_TIMEOUT_ENABLED", True)
111
-
112
- # Default page size for structure list.
113
- # Must be an integer value from the current options as seen in the app.
114
- STRUCTURES_DEFAULT_PAGE_LENGTH = clean_setting("STRUCTURES_DEFAULT_PAGE_LENGTH", 10)
115
-
116
- # Wether paging is enabled for the structure list
117
- STRUCTURES_PAGING_ENABLED = clean_setting("STRUCTURES_PAGING_ENABLED", True)
150
+ STRUCTURES_NOTIFICATION_DISABLE_ESI_FUEL_ALERTS = clean_setting(
151
+ "STRUCTURES_NOTIFICATION_DISABLE_ESI_FUEL_ALERTS", False
152
+ )
153
+ """This allows you to turn off ESI fuel alert notifications
154
+ to use the Structure's generated fuel notifications exclusively.
155
+ """
118
156
 
119
157
  # INTERNAL SETTINGS
120
158
 
@@ -143,22 +181,3 @@ STRUCTURES_NOTIFICATION_TURNAROUND_MAX_VALID = clean_setting(
143
181
  STRUCTURES_NOTIFY_THROTTLED_TIMEOUT = clean_setting(
144
182
  "STRUCTURES_NOTIFY_THROTTLED_TIMEOUT", 86400
145
183
  )
146
-
147
- # This allows you to turn off ESI fuel alert notifications
148
- # to use the Structure's generated fuel notifications exclusively.
149
- STRUCTURES_NOTIFICATION_DISABLE_ESI_FUEL_ALERTS = clean_setting(
150
- "STRUCTURES_NOTIFICATION_DISABLE_ESI_FUEL_ALERTS", False
151
- )
152
-
153
- # Feature flag to enable refueled notifications
154
- STRUCTURES_FEATURE_REFUELED_NOTIFICATIONS = clean_setting(
155
- "STRUCTURES_FEATURE_REFUELED_NOTIFICATIONS", True
156
- )
157
-
158
-
159
- STRUCTURES_ESI_DIRECTOR_ERROR_MAX_RETRIES = clean_setting(
160
- "STRUCTURES_ESI_DIRECTOR_ERROR_MAX_RETRIES", 3
161
- )
162
- """Max retries before a character is deleted when ESI claims the character
163
- is not a director (Since this sometimes is reported wrongly by ESI).
164
- """
@@ -7,15 +7,19 @@ import dhooks_lite
7
7
 
8
8
  from django.db import models
9
9
  from django.utils.translation import gettext as _
10
- from eveuniverse.models import EveType
11
10
 
12
11
  from app_utils.datetime import ldap_time_2_datetime
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_esi_obj
15
+ from structures.helpers import get_or_create_eve_entity, get_or_create_eve_type
16
16
  from structures.models import Notification, Webhook
17
17
 
18
- from .helpers import gen_solar_system_text, target_datetime_formatted
18
+ from .helpers import (
19
+ gen_eve_entity_link,
20
+ gen_solar_system_text,
21
+ target_datetime_formatted,
22
+ )
19
23
  from .main import NotificationBaseEmbed
20
24
 
21
25
 
@@ -37,9 +41,9 @@ class BillType(models.IntegerChoices):
37
41
  class NotificationBillingBillOutOfMoneyMsg(NotificationBaseEmbed):
38
42
  def __init__(self, notification: Notification) -> None:
39
43
  super().__init__(notification)
40
- bill_type_id = self._parsed_text["billTypeID"]
44
+ bill_type_id = self._data["billTypeID"]
41
45
  bill_type_str = BillType.to_enum(bill_type_id).label
42
- due_date = ldap_time_2_datetime(self._parsed_text["dueDate"])
46
+ due_date = ldap_time_2_datetime(self._data["dueDate"])
43
47
  self._title = _("Insufficient Funds for Bill")
44
48
  self._description = _(
45
49
  "The selected corporation wallet division for automatic payments "
@@ -58,7 +62,7 @@ class NotificationBillingIHubBillAboutToExpire(NotificationBaseEmbed):
58
62
  def __init__(self, notification: Notification) -> None:
59
63
  super().__init__(notification)
60
64
  solar_system_link = gen_solar_system_text(self._notification.eve_solar_system())
61
- due_date = ldap_time_2_datetime(self._parsed_text.get("dueDate"))
65
+ due_date = ldap_time_2_datetime(self._data.get("dueDate"))
62
66
  self._title = _("IHub Bill About to Expire")
63
67
  self._description = _(
64
68
  "Maintenance bill for Infrastructure Hub in %(solar_system)s "
@@ -69,7 +73,7 @@ class NotificationBillingIHubBillAboutToExpire(NotificationBaseEmbed):
69
73
  "due_date": target_datetime_formatted(due_date),
70
74
  }
71
75
  self._color = Webhook.Color.DANGER
72
- structure_type = get_or_create_esi_obj(EveType, id=EveTypeId.IHUB)
76
+ structure_type = get_or_create_eve_type(id=EveTypeId.IHUB)
73
77
  self._thumbnail = dhooks_lite.Thumbnail(
74
78
  structure_type.icon_url(size=self.ICON_DEFAULT_SIZE)
75
79
  )
@@ -92,3 +96,32 @@ class NotificationBillingIHubDestroyedByBillFailure(NotificationBaseEmbed):
92
96
  self._thumbnail = dhooks_lite.Thumbnail(
93
97
  structure_type.icon_url(size=self.ICON_DEFAULT_SIZE)
94
98
  )
99
+
100
+
101
+ class NotificationCorpAllBillMsg(NotificationBaseEmbed):
102
+ def __init__(self, notification: Notification) -> None:
103
+ super().__init__(notification)
104
+ amount = self._data["amount"]
105
+ bill_type_id = self._data["billTypeID"]
106
+ bill_type_str = BillType.to_enum(bill_type_id).label
107
+ current_date = ldap_time_2_datetime(self._data["currentDate"])
108
+ due_date = ldap_time_2_datetime(self._data["dueDate"])
109
+ creditor = get_or_create_eve_entity(id=self._data["creditorID"])
110
+ debtor = get_or_create_eve_entity(id=self._data["debtorID"])
111
+ self._title = _("Bill issued")
112
+ self._description = _(
113
+ "A bill of %(amount)s ISK, due %(due_date)s owed by %(debtor)s "
114
+ "to %(creditor)s was issued %(current_date)s. "
115
+ "This bill is for %(bill_type)s."
116
+ ) % {
117
+ "amount": humanize_number(amount),
118
+ "bill_type": bill_type_str,
119
+ "creditor": gen_eve_entity_link(creditor),
120
+ "debtor": gen_eve_entity_link(debtor),
121
+ "current_date": target_datetime_formatted(current_date),
122
+ "due_date": target_datetime_formatted(due_date),
123
+ }
124
+ self._color = Webhook.Color.WARNING
125
+ self._thumbnail = dhooks_lite.Thumbnail(
126
+ debtor.icon_url(size=self.ICON_DEFAULT_SIZE)
127
+ )
@@ -1,13 +1,12 @@
1
- """Character & corporation embeds."""
1
+ """Corporate embeds."""
2
2
 
3
3
  # pylint: disable=missing-class-docstring
4
4
 
5
5
  import dhooks_lite
6
6
 
7
7
  from django.utils.translation import gettext as _
8
- from eveuniverse.models import EveEntity
9
8
 
10
- from structures.helpers import get_or_create_esi_obj
9
+ from structures.helpers import get_or_create_eve_entity
11
10
  from structures.models import Notification, Webhook
12
11
 
13
12
  from .helpers import (
@@ -21,15 +20,11 @@ from .main import NotificationBaseEmbed
21
20
  class NotificationCorpCharEmbed(NotificationBaseEmbed):
22
21
  def __init__(self, notification: Notification) -> None:
23
22
  super().__init__(notification)
24
- self._character = get_or_create_esi_obj(
25
- EveEntity, id=self._parsed_text["charID"]
26
- )
27
- self._corporation = get_or_create_esi_obj(
28
- EveEntity, id=self._parsed_text["corpID"]
29
- )
23
+ self._character = get_or_create_eve_entity(id=self._data["charID"])
24
+ self._corporation = get_or_create_eve_entity(id=self._data["corpID"])
30
25
  self._character_link = gen_eve_entity_link(self._character)
31
26
  self._corporation_link = gen_corporation_link(self._corporation.name)
32
- self._application_text = self._parsed_text.get("applicationText", "")
27
+ self._application_text = self._data.get("applicationText", "")
33
28
  self._thumbnail = dhooks_lite.Thumbnail(
34
29
  self._character.icon_url(size=self.ICON_DEFAULT_SIZE)
35
30
  )
@@ -60,7 +55,7 @@ class NotificationCorpAppInvitedMsg(NotificationCorpCharEmbed):
60
55
  "character_name": self._character.name
61
56
  }
62
57
  inviting_character = gen_eve_entity_link_from_id(
63
- self._parsed_text.get("invokingCharID")
58
+ self._data.get("invokingCharID")
64
59
  )
65
60
  self._description = _(
66
61
  "%(character_name)s has been invited to join %(corporation_name)s "
@@ -77,6 +72,22 @@ class NotificationCorpAppInvitedMsg(NotificationCorpCharEmbed):
77
72
  self._color = Webhook.Color.INFO
78
73
 
79
74
 
75
+ class NotificationCharAppRejectMsg(NotificationCorpCharEmbed):
76
+ def __init__(self, notification: Notification) -> None:
77
+ super().__init__(notification)
78
+ self._title = _("%(character_name)s rejects invitation") % {
79
+ "character_name": self._character.name
80
+ }
81
+ self._description = _(
82
+ "Application from %(character_name)s to join %(corporation_name)s "
83
+ "has been rejected."
84
+ ) % {
85
+ "character_name": self._character_link,
86
+ "corporation_name": self._corporation_link,
87
+ }
88
+ self._color = Webhook.Color.INFO
89
+
90
+
80
91
  class NotificationCorpAppRejectCustomMsg(NotificationCorpCharEmbed):
81
92
  def __init__(self, notification: Notification) -> None:
82
93
  super().__init__(notification)
@@ -92,9 +103,8 @@ class NotificationCorpAppRejectCustomMsg(NotificationCorpCharEmbed):
92
103
  "character_name": self._character_link,
93
104
  "corporation_name": self._corporation_link,
94
105
  "application_text": self._application_text,
95
- "customMessage": self._parsed_text.get("customMessage", ""),
106
+ "customMessage": self._data.get("customMessage", ""),
96
107
  }
97
-
98
108
  self._color = Webhook.Color.INFO
99
109
 
100
110