aa-structures 2.2.0__tar.gz → 2.3.1b1__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.
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/PKG-INFO +1 -1
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/__init__.py +1 -1
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/admin.py +13 -13
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/core/notification_embeds.py +47 -47
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/locale/de/LC_MESSAGES/django.po +314 -305
- aa_structures-2.3.1b1/structures/locale/django.pot +2227 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/locale/en/LC_MESSAGES/django.po +312 -305
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/locale/es/LC_MESSAGES/django.po +314 -305
- aa_structures-2.3.1b1/structures/locale/fr_FR/LC_MESSAGES/django.po +2227 -0
- aa_structures-2.3.1b1/structures/locale/it_IT/LC_MESSAGES/django.po +2227 -0
- aa_structures-2.3.1b1/structures/locale/ja/LC_MESSAGES/django.po +2228 -0
- aa_structures-2.3.1b1/structures/locale/ko_KR/LC_MESSAGES/django.po +2227 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/locale/ru/LC_MESSAGES/django.po +312 -305
- aa_structures-2.3.1b1/structures/locale/uk/LC_MESSAGES/django.po +2231 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/locale/zh_Hans/LC_MESSAGES/django.po +314 -305
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/managers.py +12 -12
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/models/notifications.py +20 -17
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/models/owners.py +1 -3
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/models/structures.py +1 -1
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/core/test_notification_embeds.py +125 -36
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/models/test_notifications_1.py +38 -12
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/test_admin.py +48 -22
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/test_integration.py +88 -1
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/factories_2.py +34 -1
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/views.py +3 -2
- aa_structures-2.2.0/structures/tests/core/test_notification_embeds_2.py +0 -78
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/.gitignore +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/LICENSE +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/README.md +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/pyproject.toml +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/app_settings.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/apps.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/auth_hooks.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/checks.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/constants.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/core/__init__.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/core/notification_timers.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/core/serializers.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/core/sovereignty.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/core/starbases.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/forms.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/helpers/__init__.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/helpers/general.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/locale/de/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/locale/en/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/locale/es/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/locale/ko/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/locale/ko/LC_MESSAGES/django.po +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/locale/ru/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/management/commands/__init__.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/management/commands/structures_load_eve.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/management/commands/structures_preload_eveuniverse.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/migrations/0001_initial_new.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/migrations/0002_remove_eveuniverse_relation_names.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/migrations/0003_add_localization_and_unique_key.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/migrations/__init__.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/models/__init__.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/models/eveuniverse.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/providers.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/css/global.css +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/css/main.css +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/Spinner-1s-64px-dark.gif +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/Spinner-1s-64px-light.gif +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/eve_symbol_128.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/0h.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/0l.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/0m.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/0r.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/0s.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/1h.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/1l.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/1m.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/1r.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/2h.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/2l.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/2m.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/2r.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/3h.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/3l.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/3m.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/3r.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/4h.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/4l.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/4m.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/4s.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/5h.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/5l.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/5m.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/5s.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/6h.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/6l.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/6m.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/7h.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/7l.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/7m.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/8h.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/8l.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/8m.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/blank.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/circle.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/dustwheel.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/h.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/l.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/m.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/noship.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/r.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/tyrannis.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/tyrannis_blue.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/tyrannis_darkred.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/tyrannis_default.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/panel/tyrannis_revelations.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/static/structures/img/structures_logo.png +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/swagger.json +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tasks.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/base.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/main.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/modals/fitting_assets.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/modals/fitting_gfx.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/modals/poco_details.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/modals/starbase_detail.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/modals/structure_details.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/modals/tab_general_detail.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/partials/jump_gates_list.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/partials/poco_list.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/partials/structure_list.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/partials/structure_summary.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/templatetags/detail_title.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/templatetags/list_asset.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/templatetags/list_item.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/templatetags/list_tax_item.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templates/structures/templatetags/list_title.html +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templatetags/__init__.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/templatetags/structures.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/__init__.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/core/__init__.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/core/test_notification_structuretimers.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/core/test_notifications_timerboard.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/core/test_serializers.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/core/test_sovereignty.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/core/test_starbases.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/models/__init__.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/models/test_eveuniverse.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/models/test_notifications_2.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/models/test_notifications_3.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/models/test_notifications_discord.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/models/test_owners_1.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/models/test_owners_2.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/models/test_owners_3.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/models/test_structures.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/test_checks.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/test_helpers.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/test_managers_1.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/test_managers_3.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/test_tasks.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/test_views.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/__init__.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/create_eveuniverse.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/entities.json +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/esi_data.json +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/eveuniverse.json +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/factories.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/generate_notifications.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/generate_notifications_2.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/generate_structures.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/helpers.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/load_eveuniverse.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/tasks_loadtest.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/tests/testdata/test_generate_structures.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/urls.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/webhooks/__init__.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/webhooks/core.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/webhooks/managers.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/webhooks/models.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/webhooks/tests/__init__.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/webhooks/tests/test_core.py +0 -0
- {aa_structures-2.2.0 → aa_structures-2.3.1b1}/structures/webhooks/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: aa-structures
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.3.1b1
|
4
4
|
Summary: App for managing Eve Online structures with Alliance Auth
|
5
5
|
Project-URL: Homepage, https://gitlab.com/ErikKalkoken/aa-structures
|
6
6
|
Project-URL: Documentation, https://aa-structures.readthedocs.io/en/latest/
|
@@ -70,8 +70,8 @@ if settings.DEBUG:
|
|
70
70
|
|
71
71
|
@admin.register(FuelAlert)
|
72
72
|
class StructureFuelAlertAdmin(BaseFuelAlertAdmin):
|
73
|
-
list_display = BaseFuelAlertAdmin.list_display + ("hours",)
|
74
|
-
ordering = BaseFuelAlertAdmin.ordering + ("-hours",)
|
73
|
+
list_display = tuple(BaseFuelAlertAdmin.list_display) + ("hours",)
|
74
|
+
ordering = tuple(BaseFuelAlertAdmin.ordering) + ("-hours",)
|
75
75
|
|
76
76
|
@admin.register(JumpFuelAlert)
|
77
77
|
class JumpFuelAlertAdmin(BaseFuelAlertAdmin):
|
@@ -128,10 +128,10 @@ class StructureFuelAlertConfigAdmin(BaseFuelAlertConfigAdmin):
|
|
128
128
|
"start",
|
129
129
|
"end",
|
130
130
|
"repeat",
|
131
|
-
) + BaseFuelAlertConfigAdmin.list_display
|
131
|
+
) + tuple(BaseFuelAlertConfigAdmin.list_display)
|
132
132
|
fieldsets = (
|
133
133
|
(
|
134
|
-
"
|
134
|
+
"Timing",
|
135
135
|
{
|
136
136
|
"description": _(
|
137
137
|
"Timing configuration for sending fuel notifications. "
|
@@ -142,7 +142,7 @@ class StructureFuelAlertConfigAdmin(BaseFuelAlertConfigAdmin):
|
|
142
142
|
"fields": ("start", "end", "repeat"),
|
143
143
|
},
|
144
144
|
),
|
145
|
-
) + BaseFuelAlertConfigAdmin.fieldsets
|
145
|
+
) + tuple(BaseFuelAlertConfigAdmin.fieldsets)
|
146
146
|
|
147
147
|
|
148
148
|
@admin.register(JumpFuelAlertConfig)
|
@@ -150,7 +150,7 @@ class JumpFuelAlertConfigAdmin(BaseFuelAlertConfigAdmin):
|
|
150
150
|
list_display = (
|
151
151
|
"_id",
|
152
152
|
"_threshold",
|
153
|
-
) + BaseFuelAlertConfigAdmin.list_display
|
153
|
+
) + tuple(BaseFuelAlertConfigAdmin.list_display)
|
154
154
|
fieldsets = (
|
155
155
|
(
|
156
156
|
"Fuel levels",
|
@@ -159,7 +159,7 @@ class JumpFuelAlertConfigAdmin(BaseFuelAlertConfigAdmin):
|
|
159
159
|
"fields": ("threshold",),
|
160
160
|
},
|
161
161
|
),
|
162
|
-
) + BaseFuelAlertConfigAdmin.fieldsets
|
162
|
+
) + tuple(BaseFuelAlertConfigAdmin.fieldsets)
|
163
163
|
|
164
164
|
@admin.display(ordering="threshold")
|
165
165
|
def _threshold(self, obj) -> str:
|
@@ -473,7 +473,7 @@ class OwnerAdmin(admin.ModelAdmin):
|
|
473
473
|
@admin.display(description=_("Update all from EVE server for selected owners"))
|
474
474
|
def update_all(self, request, queryset):
|
475
475
|
for obj in queryset:
|
476
|
-
tasks.update_all_for_owner.delay(obj.pk, user_pk=request.user.pk)
|
476
|
+
tasks.update_all_for_owner.delay(obj.pk, user_pk=request.user.pk) # type: ignore
|
477
477
|
text = _(
|
478
478
|
"Started updating structures and notifications for %s. "
|
479
479
|
"You will receive a notification once it is completed." % obj
|
@@ -485,7 +485,7 @@ class OwnerAdmin(admin.ModelAdmin):
|
|
485
485
|
)
|
486
486
|
def update_structures(self, request, queryset):
|
487
487
|
for obj in queryset:
|
488
|
-
tasks.update_structures_for_owner.delay(obj.pk, user_pk=request.user.pk)
|
488
|
+
tasks.update_structures_for_owner.delay(obj.pk, user_pk=request.user.pk) # type: ignore
|
489
489
|
text = (
|
490
490
|
f"Started updating structures for {obj}. "
|
491
491
|
"You will receive a notification once it is completed."
|
@@ -497,7 +497,7 @@ class OwnerAdmin(admin.ModelAdmin):
|
|
497
497
|
)
|
498
498
|
def fetch_notifications(self, request, queryset):
|
499
499
|
for obj in queryset:
|
500
|
-
tasks.process_notifications_for_owner.delay(obj.pk, user_pk=request.user.pk)
|
500
|
+
tasks.process_notifications_for_owner.delay(obj.pk, user_pk=request.user.pk) # type: ignore
|
501
501
|
text = (
|
502
502
|
f"Started fetching notifications for {obj}. "
|
503
503
|
"You will receive a notification once it is completed."
|
@@ -509,7 +509,7 @@ class OwnerAdmin(admin.ModelAdmin):
|
|
509
509
|
|
510
510
|
def get_readonly_fields(self, request, obj=None):
|
511
511
|
if obj: # editing an existing object
|
512
|
-
return self.readonly_fields + (
|
512
|
+
return tuple(self.readonly_fields) + (
|
513
513
|
"assets_last_update_at",
|
514
514
|
"corporation",
|
515
515
|
"forwarding_last_update_at",
|
@@ -1048,7 +1048,7 @@ class WebhookAdmin(admin.ModelAdmin):
|
|
1048
1048
|
for obj in queryset:
|
1049
1049
|
tasks.send_test_notifications_to_webhook.delay(
|
1050
1050
|
obj.pk, user_pk=request.user.pk
|
1051
|
-
)
|
1051
|
+
) # type: ignore
|
1052
1052
|
self.message_user(
|
1053
1053
|
request,
|
1054
1054
|
'Initiated sending test notification to webhook "{}". '
|
@@ -1086,7 +1086,7 @@ class WebhookAdmin(admin.ModelAdmin):
|
|
1086
1086
|
def send_messages(self, request, queryset):
|
1087
1087
|
items_count = 0
|
1088
1088
|
for webhook in queryset:
|
1089
|
-
tasks.send_messages_for_webhook.delay(webhook.pk)
|
1089
|
+
tasks.send_messages_for_webhook.delay(webhook.pk) # type: ignore
|
1090
1090
|
items_count += 1
|
1091
1091
|
|
1092
1092
|
self.message_user(
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import datetime as dt
|
2
2
|
from collections import namedtuple
|
3
|
+
from typing import Optional
|
3
4
|
|
4
5
|
import dhooks_lite
|
5
6
|
|
@@ -19,10 +20,10 @@ from app_utils.datetime import (
|
|
19
20
|
)
|
20
21
|
from app_utils.urls import reverse_absolute, static_file_absolute_url
|
21
22
|
|
22
|
-
from
|
23
|
-
from
|
24
|
-
from
|
25
|
-
from
|
23
|
+
from structures import __title__
|
24
|
+
from structures.app_settings import STRUCTURES_NOTIFICATION_SHOW_MOON_ORE
|
25
|
+
from structures.constants import EveTypeId
|
26
|
+
from structures.models.notifications import (
|
26
27
|
EveEntity,
|
27
28
|
GeneratedNotification,
|
28
29
|
Notification,
|
@@ -30,7 +31,8 @@ from ..models.notifications import (
|
|
30
31
|
NotificationType,
|
31
32
|
Webhook,
|
32
33
|
)
|
33
|
-
from
|
34
|
+
from structures.models.structures import Structure
|
35
|
+
|
34
36
|
from . import sovereignty, starbases
|
35
37
|
|
36
38
|
|
@@ -46,7 +48,7 @@ class BillType(models.IntegerChoices):
|
|
46
48
|
return cls.UNKNOWN
|
47
49
|
|
48
50
|
|
49
|
-
def timeuntil(to_date: dt.datetime, from_date: dt.datetime = None) -> str:
|
51
|
+
def timeuntil(to_date: dt.datetime, from_date: Optional[dt.datetime] = None) -> str:
|
50
52
|
"""Render timeuntil template tag for given datetime to string."""
|
51
53
|
if not from_date:
|
52
54
|
from_date = now()
|
@@ -77,7 +79,7 @@ class NotificationBaseEmbed:
|
|
77
79
|
raise TypeError("notification must be of type Notification")
|
78
80
|
self._notification = notification
|
79
81
|
self._parsed_text = notification.parsed_text()
|
80
|
-
self._title =
|
82
|
+
self._title = ""
|
81
83
|
self._description = ""
|
82
84
|
self._color = None
|
83
85
|
self._thumbnail = None
|
@@ -94,7 +96,7 @@ class NotificationBaseEmbed:
|
|
94
96
|
return self._notification
|
95
97
|
|
96
98
|
@property
|
97
|
-
def ping_type(self) -> Webhook.PingType:
|
99
|
+
def ping_type(self) -> Optional[Webhook.PingType]:
|
98
100
|
return self._ping_type
|
99
101
|
|
100
102
|
def generate_embed(self) -> dhooks_lite.Embed:
|
@@ -107,10 +109,6 @@ class NotificationBaseEmbed:
|
|
107
109
|
property "ping_type_override" defined
|
108
110
|
|
109
111
|
"""
|
110
|
-
if self._title is None:
|
111
|
-
raise ValueError(f"title not defined for {type(self)}")
|
112
|
-
if self._description is None:
|
113
|
-
raise ValueError(f"description not defined for {type(self)}")
|
114
112
|
corporation = self.notification.owner.corporation
|
115
113
|
if self.notification.is_alliance_level and corporation.alliance:
|
116
114
|
author_name = corporation.alliance.alliance_name
|
@@ -158,7 +156,7 @@ class NotificationBaseEmbed:
|
|
158
156
|
)
|
159
157
|
|
160
158
|
@staticmethod
|
161
|
-
def create(notification:
|
159
|
+
def create(notification: "NotificationBase") -> "NotificationBaseEmbed":
|
162
160
|
"""Creates a new instance of the respective subclass for given Notification."""
|
163
161
|
if not isinstance(notification, NotificationBase):
|
164
162
|
raise TypeError("notification must be of type NotificationBase")
|
@@ -321,26 +319,27 @@ class NotificationBaseEmbed:
|
|
321
319
|
return Webhook.create_link(alliance_name, dotlan.alliance_url(alliance_name))
|
322
320
|
|
323
321
|
@staticmethod
|
324
|
-
def
|
322
|
+
def _gen_eve_entity_external_url(eve_entity: EveEntity) -> str:
|
325
323
|
if eve_entity.category == EveEntity.CATEGORY_ALLIANCE:
|
326
324
|
return dotlan.alliance_url(eve_entity.name)
|
327
325
|
elif eve_entity.category == EveEntity.CATEGORY_CORPORATION:
|
328
326
|
return dotlan.corporation_url(eve_entity.name)
|
329
327
|
elif eve_entity.category == EveEntity.CATEGORY_CHARACTER:
|
330
328
|
return evewho.character_url(eve_entity.id)
|
329
|
+
return ""
|
331
330
|
|
332
331
|
@classmethod
|
333
|
-
def
|
332
|
+
def _gen_eve_entity_link(cls, eve_entity: EveEntity) -> str:
|
334
333
|
return Webhook.create_link(
|
335
|
-
eve_entity.name, cls.
|
334
|
+
eve_entity.name, cls._gen_eve_entity_external_url(eve_entity)
|
336
335
|
)
|
337
336
|
|
338
337
|
@classmethod
|
339
|
-
def
|
338
|
+
def _gen_eve_entity_link_from_id(cls, id: int) -> str:
|
340
339
|
if not id:
|
341
340
|
return ""
|
342
341
|
entity, _ = EveEntity.objects.get_or_create_esi(id=id)
|
343
|
-
return cls.
|
342
|
+
return cls._gen_eve_entity_link(entity)
|
344
343
|
|
345
344
|
@staticmethod
|
346
345
|
def _gen_corporation_link(corporation_name: str) -> str:
|
@@ -732,7 +731,7 @@ class NotificationMoonminningExtractionStarted(NotificationMoonminingEmbed):
|
|
732
731
|
"belonging to %(owner_link)s. "
|
733
732
|
"Extraction was started by %(character)s.\n"
|
734
733
|
"The chunk will be ready on location at %(ready_time)s, "
|
735
|
-
"and will
|
734
|
+
"and will fracture automatically on %(auto_time)s.\n"
|
736
735
|
"%(ore_text)s"
|
737
736
|
) % {
|
738
737
|
"structure_name": Webhook.text_bold(self._structure_name),
|
@@ -781,7 +780,7 @@ class NotificationMoonminningAutomaticFracture(NotificationMoonminingEmbed):
|
|
781
780
|
super().__init__(notification)
|
782
781
|
self._title = gettext("Automatic Fracture")
|
783
782
|
self._description = gettext(
|
784
|
-
"The
|
783
|
+
"The moon drill fitted to %(structure_name)s at %(moon)s"
|
785
784
|
" in %(solar_system)s belonging to %(owner_link)s "
|
786
785
|
"has automatically been fired "
|
787
786
|
"and the moon products are ready to be harvested.\n"
|
@@ -828,9 +827,9 @@ class NotificationMoonminningLaserFired(NotificationMoonminingEmbed):
|
|
828
827
|
fired_by, _ = EveEntity.objects.get_or_create_esi(
|
829
828
|
id=self._parsed_text["firedBy"]
|
830
829
|
)
|
831
|
-
self._title = gettext("
|
830
|
+
self._title = gettext("Moon drill fired")
|
832
831
|
self._description = gettext(
|
833
|
-
"The
|
832
|
+
"The moon drill fitted to %(structure_name)s at %(moon)s "
|
834
833
|
"in %(solar_system)s belonging to %(owner_link)s "
|
835
834
|
"has been fired by %(character)s "
|
836
835
|
"and the moon products are ready to be harvested.\n"
|
@@ -1169,7 +1168,7 @@ class NotificationSovAllAnchoringMsg(NotificationBaseEmbed):
|
|
1169
1168
|
corporation, _ = EveEntity.objects.get_or_create_esi(
|
1170
1169
|
id=self._parsed_text.get("corpID")
|
1171
1170
|
)
|
1172
|
-
corp_link = self.
|
1171
|
+
corp_link = self._gen_eve_entity_link(corporation)
|
1173
1172
|
alliance_id = self._parsed_text.get("allianceID")
|
1174
1173
|
if alliance_id:
|
1175
1174
|
alliance, _ = EveEntity.objects.get_or_create_esi(id=alliance_id)
|
@@ -1216,7 +1215,7 @@ class NotificationCorpCharEmbed(NotificationBaseEmbed):
|
|
1216
1215
|
self._corporation, _ = EveEntity.objects.get_or_create_esi(
|
1217
1216
|
id=self._parsed_text["corpID"]
|
1218
1217
|
)
|
1219
|
-
self._character_link = self.
|
1218
|
+
self._character_link = self._gen_eve_entity_link(self._character)
|
1220
1219
|
self._corporation_link = self._gen_corporation_link(self._corporation.name)
|
1221
1220
|
self._application_text = self._parsed_text.get("applicationText", "")
|
1222
1221
|
self._thumbnail = dhooks_lite.Thumbnail(
|
@@ -1248,7 +1247,7 @@ class NotificationCorpAppInvitedMsg(NotificationCorpCharEmbed):
|
|
1248
1247
|
self._title = "%(character_name)s has been invited" % {
|
1249
1248
|
"character_name": self._character.name
|
1250
1249
|
}
|
1251
|
-
inviting_character = self.
|
1250
|
+
inviting_character = self._gen_eve_entity_link_from_id(
|
1252
1251
|
self._parsed_text.get("invokingCharID")
|
1253
1252
|
)
|
1254
1253
|
self._description = (
|
@@ -1356,9 +1355,9 @@ class NotificationAllyJoinedWarMsg(NotificationBaseEmbed):
|
|
1356
1355
|
"%(ally)s has joined %(defender)s in a war against %(aggressor)s. "
|
1357
1356
|
"Their participation in the war will start at %(start_time)s."
|
1358
1357
|
) % {
|
1359
|
-
"aggressor": self.
|
1360
|
-
"ally": self.
|
1361
|
-
"defender": self.
|
1358
|
+
"aggressor": self._gen_eve_entity_link(aggressor),
|
1359
|
+
"ally": self._gen_eve_entity_link(ally),
|
1360
|
+
"defender": self._gen_eve_entity_link(defender),
|
1362
1361
|
"start_time": target_datetime_formatted(start_time),
|
1363
1362
|
}
|
1364
1363
|
self._thumbnail = dhooks_lite.Thumbnail(
|
@@ -1390,8 +1389,8 @@ class NotificationCorpWarSurrenderMsg(NotificationWarEmbed):
|
|
1390
1389
|
"as one party has surrendered. "
|
1391
1390
|
"The war will be declared as being over after approximately 24 hours."
|
1392
1391
|
) % {
|
1393
|
-
"declared_by": self.
|
1394
|
-
"against": self.
|
1392
|
+
"declared_by": self._gen_eve_entity_link(self._declared_by),
|
1393
|
+
"against": self._gen_eve_entity_link(self._against),
|
1395
1394
|
}
|
1396
1395
|
self._color = Webhook.Color.WARNING
|
1397
1396
|
|
@@ -1412,9 +1411,9 @@ class NotificationWarAdopted(NotificationWarEmbed):
|
|
1412
1411
|
"%(against)s is no longer a member of %(alliance)s, "
|
1413
1412
|
"and therefore a new war between %(declared_by)s and %(against)s has begun."
|
1414
1413
|
) % {
|
1415
|
-
"declared_by": self.
|
1416
|
-
"against": self.
|
1417
|
-
"alliance": self.
|
1414
|
+
"declared_by": self._gen_eve_entity_link(self._declared_by),
|
1415
|
+
"against": self._gen_eve_entity_link(self._against),
|
1416
|
+
"alliance": self._gen_eve_entity_link(alliance),
|
1418
1417
|
}
|
1419
1418
|
self._color = Webhook.Color.WARNING
|
1420
1419
|
|
@@ -1432,8 +1431,8 @@ class NotificationWarDeclared(NotificationWarEmbed):
|
|
1432
1431
|
"Within %(delay_hours)s hours fighting can legally occur "
|
1433
1432
|
"between those involved."
|
1434
1433
|
) % {
|
1435
|
-
"declared_by": self.
|
1436
|
-
"against": self.
|
1434
|
+
"declared_by": self._gen_eve_entity_link(self._declared_by),
|
1435
|
+
"against": self._gen_eve_entity_link(self._against),
|
1437
1436
|
"war_hq": Webhook.text_bold(strip_tags(self._parsed_text["warHQ"])),
|
1438
1437
|
"delay_hours": Webhook.text_bold(self._parsed_text["delayHours"]),
|
1439
1438
|
}
|
@@ -1461,10 +1460,10 @@ class NotificationWarInherited(NotificationWarEmbed):
|
|
1461
1460
|
"%(against)s from newly joined %(quitter)s. "
|
1462
1461
|
"Within **24** hours fighting can legally occur with %(alliance)s."
|
1463
1462
|
) % {
|
1464
|
-
"declared_by": self.
|
1465
|
-
"against": self.
|
1466
|
-
"alliance": self.
|
1467
|
-
"quitter": self.
|
1463
|
+
"declared_by": self._gen_eve_entity_link(self._declared_by),
|
1464
|
+
"against": self._gen_eve_entity_link(self._against),
|
1465
|
+
"alliance": self._gen_eve_entity_link(alliance),
|
1466
|
+
"quitter": self._gen_eve_entity_link(quitter),
|
1468
1467
|
}
|
1469
1468
|
self._color = Webhook.Color.DANGER
|
1470
1469
|
|
@@ -1480,8 +1479,8 @@ class NotificationWarRetractedByConcord(NotificationWarEmbed):
|
|
1480
1479
|
"After %(end_date)s CONCORD will again respond to any hostilities "
|
1481
1480
|
"between those involved with full force."
|
1482
1481
|
) % {
|
1483
|
-
"declared_by": self.
|
1484
|
-
"against": self.
|
1482
|
+
"declared_by": self._gen_eve_entity_link(self._declared_by),
|
1483
|
+
"against": self._gen_eve_entity_link(self._against),
|
1485
1484
|
"end_date": target_datetime_formatted(war_ends),
|
1486
1485
|
}
|
1487
1486
|
self._color = Webhook.Color.WARNING
|
@@ -1526,14 +1525,14 @@ class NotificationWarSurrenderOfferMsg(NotificationBaseEmbed):
|
|
1526
1525
|
owner_1, _ = EveEntity.objects.get_or_create_esi(
|
1527
1526
|
id=self._parsed_text.get("ownerID1")
|
1528
1527
|
)
|
1529
|
-
owner_1_link = self.
|
1530
|
-
owner_2_link = self.
|
1528
|
+
owner_1_link = self._gen_eve_entity_link(owner_1)
|
1529
|
+
owner_2_link = self._gen_eve_entity_link_from_id(
|
1531
1530
|
self._parsed_text.get("ownerID2")
|
1532
1531
|
)
|
1533
1532
|
self._title = gettext("%s has offered a surrender") % (owner_1,)
|
1534
1533
|
self._description = gettext(
|
1535
1534
|
"%s has offered to end the war with %s in the exchange for %s ISK. "
|
1536
|
-
"If accepted, the war will end in 24 hours and your organizations will"
|
1535
|
+
"If accepted, the war will end in 24 hours and your organizations will "
|
1537
1536
|
"be unable to declare new wars against each other for the next 2 weeks."
|
1538
1537
|
) % (owner_1_link, owner_2_link, f"{isk_value:,.2f}")
|
1539
1538
|
self._color = Webhook.Color.INFO
|
@@ -1547,9 +1546,10 @@ class NotificationBillingBillOutOfMoneyMsg(NotificationBaseEmbed):
|
|
1547
1546
|
due_date = ldap_time_2_datetime(self._parsed_text["dueDate"])
|
1548
1547
|
self._title = gettext("Insufficient Funds for Bill")
|
1549
1548
|
self._description = gettext(
|
1550
|
-
"The selected corporation wallet division for
|
1551
|
-
"enough current funds available to pay the %(bill_type)s "
|
1552
|
-
"due to be paid by %(due_date)s.
|
1549
|
+
"The selected corporation wallet division for automatic payments "
|
1550
|
+
"does not have enough current funds available to pay the %(bill_type)s "
|
1551
|
+
"due to be paid by %(due_date)s. "
|
1552
|
+
"Transfer additional funds to the selected wallet "
|
1553
1553
|
"division in order to meet your pending automatic bills."
|
1554
1554
|
) % {
|
1555
1555
|
"bill_type": bill_type_str,
|