aa-structures 2.6.1__tar.gz → 2.6.2__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.6.1 → aa_structures-2.6.2}/PKG-INFO +1 -1
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/__init__.py +1 -1
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/billing_embeds.py +2 -1
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/character_embeds.py +7 -6
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/main.py +2 -2
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/moonmining_embeds.py +11 -12
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/orbital_embeds.py +4 -3
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/sov_embeds.py +9 -17
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/structures_embeds.py +27 -23
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/tower_embeds.py +16 -10
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/de/LC_MESSAGES/django.po +493 -46
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/django.pot +502 -46
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/en/LC_MESSAGES/django.po +502 -46
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/es/LC_MESSAGES/django.po +493 -46
- {aa_structures-2.6.1/structures/locale/it_IT → aa_structures-2.6.2/structures/locale/fr_FR}/LC_MESSAGES/django.po +502 -46
- {aa_structures-2.6.1/structures/locale/fr_FR → aa_structures-2.6.2/structures/locale/it_IT}/LC_MESSAGES/django.po +502 -46
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/ja/LC_MESSAGES/django.po +502 -46
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/ko_KR/LC_MESSAGES/django.po +493 -46
- aa_structures-2.6.2/structures/locale/ru/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/ru/LC_MESSAGES/django.po +562 -52
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/uk/LC_MESSAGES/django.po +493 -46
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/zh_Hans/LC_MESSAGES/django.po +493 -46
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/base.html +1 -1
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/views.py +0 -1
- aa_structures-2.6.1/structures/locale/ru/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/LICENSE +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/README.md +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/pyproject.toml +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/admin.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/app_settings.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/apps.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/auth_hooks.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/constants.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/__init__.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/__init__.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/helpers.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/war_embeds.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_timers.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_types.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/serializers.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/sovereignty.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/starbases.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/forms.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/helpers.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/de/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/en/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/es/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/fr_FR/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/it_IT/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/ja/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/ko_KR/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/uk/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/management/commands/__init__.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/management/commands/structures_load_eve.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/management/commands/structures_preload_eveuniverse.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/management/commands/structures_update_poco_planets.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/managers.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/migrations/0001_initial_new.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/migrations/0002_remove_eveuniverse_relation_names.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/migrations/0003_add_localization_and_unique_key.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/migrations/0004_improve_localization.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/migrations/__init__.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/models/__init__.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/models/eveuniverse.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/models/notifications.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/models/owners.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/models/structures_1.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/models/structures_2.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/providers.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/css/global.css +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/css/main.css +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/Spinner-1s-64px-dark.gif +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/Spinner-1s-64px-light.gif +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/eve_symbol_128.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/0h.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/0l.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/0m.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/0r.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/0s.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/1h.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/1l.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/1m.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/1r.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/2h.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/2l.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/2m.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/2r.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/3h.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/3l.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/3m.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/3r.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/4h.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/4l.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/4m.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/4s.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/5h.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/5l.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/5m.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/5s.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/6h.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/6l.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/6m.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/7h.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/7l.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/7m.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/8h.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/8l.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/8m.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/blank.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/circle.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/dustwheel.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/h.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/l.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/m.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/noship.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/r.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/tyrannis.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/tyrannis_blue.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/tyrannis_darkred.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/tyrannis_default.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/panel/tyrannis_revelations.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/static/structures/img/structures_logo.png +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tasks.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/main.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/modals/fitting_assets.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/modals/fitting_gfx.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/modals/poco_details.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/modals/starbase_detail.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/modals/structure_details.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/modals/tab_general_detail.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/partials/jump_gates_list.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/partials/poco_list.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/partials/structure_list.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/partials/structure_summary.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/templatetags/detail_title.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/templatetags/list_asset.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/templatetags/list_item.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/templatetags/list_tax_item.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templates/structures/templatetags/list_title.html +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templatetags/__init__.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/templatetags/structures.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/__init__.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/core/__init__.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/core/notification_embeds/__init__.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/core/notification_embeds/test_helpers.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/core/notification_embeds/test_main.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/core/test_notification_structuretimers.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/core/test_notification_types.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/core/test_notifications_timerboard.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/core/test_serializers.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/core/test_sovereignty.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/core/test_starbases.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/models/__init__.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/models/test_eveuniverse.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/models/test_notifications_1.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/models/test_notifications_2.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/models/test_notifications_3.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/models/test_notifications_discord.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/models/test_owners_1.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/models/test_owners_2.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/models/test_owners_3.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/models/test_structures.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/test_admin.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/test_helpers.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/test_integration.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/test_managers_1.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/test_managers_3.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/test_tasks.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/test_views.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/__init__.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/create_eveuniverse.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/entities.json +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/esi_data.json +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/eveuniverse.json +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/factories.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/factories_2.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/generate_notifications.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/generate_notifications_2.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/generate_structures.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/helpers.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/load_eveuniverse.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/tasks_loadtest.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/tests/testdata/test_generate_structures.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/urls.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/webhooks/__init__.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/webhooks/core.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/webhooks/managers.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/webhooks/models.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/webhooks/tests/__init__.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/webhooks/tests/test_core.py +0 -0
- {aa_structures-2.6.1 → aa_structures-2.6.2}/structures/webhooks/tests/test_utils.py +0 -0
{aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/billing_embeds.py
RENAMED
@@ -12,6 +12,7 @@ from eveuniverse.models import EveType
|
|
12
12
|
from app_utils.datetime import ldap_time_2_datetime
|
13
13
|
|
14
14
|
from structures.constants import EveTypeId
|
15
|
+
from structures.helpers import get_or_create_esi_obj
|
15
16
|
from structures.models import Notification, Webhook
|
16
17
|
|
17
18
|
from .helpers import gen_solar_system_text, target_datetime_formatted
|
@@ -68,7 +69,7 @@ class NotificationBillingIHubBillAboutToExpire(NotificationBaseEmbed):
|
|
68
69
|
"due_date": target_datetime_formatted(due_date),
|
69
70
|
}
|
70
71
|
self._color = Webhook.Color.DANGER
|
71
|
-
structure_type = EveType
|
72
|
+
structure_type = get_or_create_esi_obj(EveType, id=EveTypeId.IHUB)
|
72
73
|
self._thumbnail = dhooks_lite.Thumbnail(
|
73
74
|
structure_type.icon_url(size=self.ICON_DEFAULT_SIZE)
|
74
75
|
)
|
{aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/character_embeds.py
RENAMED
@@ -7,6 +7,7 @@ import dhooks_lite
|
|
7
7
|
from django.utils.translation import gettext as _
|
8
8
|
from eveuniverse.models import EveEntity
|
9
9
|
|
10
|
+
from structures.helpers import get_or_create_esi_obj
|
10
11
|
from structures.models import Notification, Webhook
|
11
12
|
|
12
13
|
from .helpers import (
|
@@ -20,12 +21,12 @@ from .main import NotificationBaseEmbed
|
|
20
21
|
class NotificationCorpCharEmbed(NotificationBaseEmbed):
|
21
22
|
def __init__(self, notification: Notification) -> None:
|
22
23
|
super().__init__(notification)
|
23
|
-
self._character =
|
24
|
-
id=self._parsed_text["charID"]
|
25
|
-
)
|
26
|
-
self._corporation =
|
27
|
-
id=self._parsed_text["corpID"]
|
28
|
-
)
|
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
|
+
)
|
29
30
|
self._character_link = gen_eve_entity_link(self._character)
|
30
31
|
self._corporation_link = gen_corporation_link(self._corporation.name)
|
31
32
|
self._application_text = self._parsed_text.get("applicationText", "")
|
@@ -14,7 +14,7 @@ from app_utils.urls import reverse_absolute, static_file_absolute_url
|
|
14
14
|
|
15
15
|
from structures import __title__
|
16
16
|
from structures.core.notification_types import NotificationType
|
17
|
-
from structures.helpers import is_absolute_url
|
17
|
+
from structures.helpers import get_or_create_esi_obj, is_absolute_url
|
18
18
|
from structures.models.notifications import Notification, NotificationBase, Webhook
|
19
19
|
|
20
20
|
from .helpers import target_datetime_formatted
|
@@ -83,7 +83,7 @@ class NotificationBaseEmbed:
|
|
83
83
|
key = "aggressorID"
|
84
84
|
else:
|
85
85
|
return "(Unknown aggressor)"
|
86
|
-
entity = EveEntity
|
86
|
+
entity = get_or_create_esi_obj(EveEntity, id=self._parsed_text[key])
|
87
87
|
return Webhook.create_link(entity.name, entity.profile_url)
|
88
88
|
|
89
89
|
def fuel_expires_target_date(self) -> str:
|
{aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/moonmining_embeds.py
RENAMED
@@ -11,6 +11,7 @@ from eveuniverse.models import EveEntity, EveType
|
|
11
11
|
from app_utils.datetime import ldap_time_2_datetime
|
12
12
|
|
13
13
|
from structures.app_settings import STRUCTURES_NOTIFICATION_SHOW_MOON_ORE
|
14
|
+
from structures.helpers import get_or_create_esi_obj
|
14
15
|
from structures.models import Notification, Webhook
|
15
16
|
|
16
17
|
from .helpers import (
|
@@ -37,7 +38,7 @@ class NotificationMoonminingEmbed(NotificationBaseEmbed):
|
|
37
38
|
structure_type.icon_url(size=self.ICON_DEFAULT_SIZE)
|
38
39
|
)
|
39
40
|
self.ore_text = (
|
40
|
-
_("
|
41
|
+
_("Estimated ore composition: %s") % self._ore_composition_text()
|
41
42
|
if STRUCTURES_NOTIFICATION_SHOW_MOON_ORE
|
42
43
|
else ""
|
43
44
|
)
|
@@ -48,7 +49,7 @@ class NotificationMoonminingEmbed(NotificationBaseEmbed):
|
|
48
49
|
|
49
50
|
ore_list = []
|
50
51
|
for ore_type_id, volume in self._parsed_text["oreVolumeByType"].items():
|
51
|
-
ore_type = EveType
|
52
|
+
ore_type = get_or_create_esi_obj(EveType, id=ore_type_id)
|
52
53
|
if ore_type:
|
53
54
|
ore_list.append(
|
54
55
|
{"id": ore_type_id, "name": ore_type.name, "volume": volume}
|
@@ -63,9 +64,7 @@ class NotificationMoonminingEmbed(NotificationBaseEmbed):
|
|
63
64
|
class NotificationMoonminningExtractionStarted(NotificationMoonminingEmbed):
|
64
65
|
def __init__(self, notification: Notification) -> None:
|
65
66
|
super().__init__(notification)
|
66
|
-
started_by = EveEntity.
|
67
|
-
id=self._parsed_text["startedBy"]
|
68
|
-
)[0]
|
67
|
+
started_by = get_or_create_esi_obj(EveEntity, id=self._parsed_text["startedBy"])
|
69
68
|
ready_time = ldap_time_2_datetime(self._parsed_text["readyTime"])
|
70
69
|
auto_time = ldap_time_2_datetime(self._parsed_text["autoTime"])
|
71
70
|
self._title = _("Moon mining extraction started")
|
@@ -76,7 +75,7 @@ class NotificationMoonminningExtractionStarted(NotificationMoonminingEmbed):
|
|
76
75
|
"Extraction was started by %(character)s.\n"
|
77
76
|
"The chunk will be ready on location at %(ready_time)s, "
|
78
77
|
"and will fracture automatically on %(auto_time)s.\n"
|
79
|
-
"%(ore_text)s"
|
78
|
+
"\n%(ore_text)s"
|
80
79
|
) % {
|
81
80
|
"structure_name": Webhook.text_bold(self._structure_name),
|
82
81
|
"moon": self._moon.name,
|
@@ -101,7 +100,7 @@ class NotificationMoonminningExtractionFinished(NotificationMoonminingEmbed):
|
|
101
100
|
"is finished and the chunk is ready "
|
102
101
|
"to be shot at.\n"
|
103
102
|
"The chunk will automatically fracture on %(auto_time)s.\n"
|
104
|
-
"%(ore_text)s"
|
103
|
+
"\n%(ore_text)s"
|
105
104
|
) % {
|
106
105
|
"structure_name": Webhook.text_bold(self._structure_name),
|
107
106
|
"moon": self._moon.name,
|
@@ -122,7 +121,7 @@ class NotificationMoonminningAutomaticFracture(NotificationMoonminingEmbed):
|
|
122
121
|
" in %(solar_system)s belonging to %(owner_link)s "
|
123
122
|
"has automatically been fired "
|
124
123
|
"and the moon products are ready to be harvested.\n"
|
125
|
-
"%(ore_text)s"
|
124
|
+
"\n%(ore_text)s"
|
126
125
|
) % {
|
127
126
|
"structure_name": Webhook.text_bold(self._structure_name),
|
128
127
|
"moon": self._moon.name,
|
@@ -137,9 +136,9 @@ class NotificationMoonminningExtractionCanceled(NotificationMoonminingEmbed):
|
|
137
136
|
def __init__(self, notification: Notification) -> None:
|
138
137
|
super().__init__(notification)
|
139
138
|
if self._parsed_text["cancelledBy"]:
|
140
|
-
cancelled_by =
|
141
|
-
id=self._parsed_text["cancelledBy"]
|
142
|
-
)
|
139
|
+
cancelled_by = get_or_create_esi_obj(
|
140
|
+
EveEntity, id=self._parsed_text["cancelledBy"]
|
141
|
+
)
|
143
142
|
else:
|
144
143
|
cancelled_by = _("(unknown)")
|
145
144
|
self._title = _("Extraction cancelled")
|
@@ -169,7 +168,7 @@ class NotificationMoonminningLaserFired(NotificationMoonminingEmbed):
|
|
169
168
|
"in %(solar_system)s belonging to %(owner_link)s "
|
170
169
|
"has been fired by %(character)s "
|
171
170
|
"and the moon products are ready to be harvested.\n"
|
172
|
-
"%(ore_text)s"
|
171
|
+
"\n%(ore_text)s"
|
173
172
|
) % {
|
174
173
|
"structure_name": Webhook.text_bold(self._structure_name),
|
175
174
|
"moon": self._moon.name,
|
{aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/orbital_embeds.py
RENAMED
@@ -10,6 +10,7 @@ from eveuniverse.models import EveType
|
|
10
10
|
from app_utils.datetime import ldap_time_2_datetime
|
11
11
|
|
12
12
|
from structures.constants import EveTypeId
|
13
|
+
from structures.helpers import get_or_create_esi_obj
|
13
14
|
from structures.models import Notification, Webhook
|
14
15
|
|
15
16
|
from .helpers import (
|
@@ -26,9 +27,9 @@ class NotificationOrbitalEmbed(NotificationBaseEmbed):
|
|
26
27
|
def __init__(self, notification: Notification) -> None:
|
27
28
|
super().__init__(notification)
|
28
29
|
self._planet = self._notification.eve_planet()
|
29
|
-
self._structure_type =
|
30
|
-
id=EveTypeId.CUSTOMS_OFFICE
|
31
|
-
)
|
30
|
+
self._structure_type = get_or_create_esi_obj(
|
31
|
+
EveType, id=EveTypeId.CUSTOMS_OFFICE
|
32
|
+
)
|
32
33
|
self._solar_system_link = gen_solar_system_text(
|
33
34
|
self._notification.eve_solar_system()
|
34
35
|
)
|
{aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/sov_embeds.py
RENAMED
@@ -95,12 +95,8 @@ class NotificationSovCommandNodeEventStarted(NotificationSovEmbed):
|
|
95
95
|
class NotificationSovAllClaimAcquiredMsg(NotificationSovEmbed):
|
96
96
|
def __init__(self, notification: Notification) -> None:
|
97
97
|
super().__init__(notification)
|
98
|
-
alliance = EveEntity.
|
99
|
-
|
100
|
-
)[0]
|
101
|
-
corporation = EveEntity.objects.get_or_create_esi(
|
102
|
-
id=self._parsed_text["corpID"]
|
103
|
-
)[0]
|
98
|
+
alliance = get_or_create_esi_obj(EveEntity, id=self._parsed_text["allianceID"])
|
99
|
+
corporation = get_or_create_esi_obj(EveEntity, id=self._parsed_text["corpID"])
|
104
100
|
self._title = (
|
105
101
|
_("DED Sovereignty claim acknowledgment: %s") % self._solar_system.name
|
106
102
|
)
|
@@ -119,12 +115,8 @@ class NotificationSovAllClaimAcquiredMsg(NotificationSovEmbed):
|
|
119
115
|
class NotificationSovAllClaimLostMsg(NotificationSovEmbed):
|
120
116
|
def __init__(self, notification: Notification) -> None:
|
121
117
|
super().__init__(notification)
|
122
|
-
alliance = EveEntity.
|
123
|
-
|
124
|
-
)[0]
|
125
|
-
corporation = EveEntity.objects.get_or_create_esi(
|
126
|
-
id=self._parsed_text["corpID"]
|
127
|
-
)[0]
|
118
|
+
alliance = get_or_create_esi_obj(EveEntity, id=self._parsed_text["allianceID"])
|
119
|
+
corporation = get_or_create_esi_obj(EveEntity, id=self._parsed_text["corpID"])
|
128
120
|
self._title = _("Lost sovereignty in: %s") % self._solar_system.name
|
129
121
|
self._description = _(
|
130
122
|
"DED acknowledges that member corporation %(corporation)s has lost its "
|
@@ -183,13 +175,13 @@ class NotificationSovStructureDestroyed(NotificationSovEmbed):
|
|
183
175
|
class NotificationSovAllAnchoringMsg(NotificationBaseEmbed):
|
184
176
|
def __init__(self, notification: Notification) -> None:
|
185
177
|
super().__init__(notification)
|
186
|
-
corporation =
|
187
|
-
id=self._parsed_text.get("corpID")
|
188
|
-
)
|
178
|
+
corporation = get_or_create_esi_obj(
|
179
|
+
EveEntity, id=self._parsed_text.get("corpID")
|
180
|
+
)
|
189
181
|
corp_link = gen_eve_entity_link(corporation)
|
190
182
|
alliance_id = self._parsed_text.get("allianceID")
|
191
183
|
if alliance_id:
|
192
|
-
alliance = EveEntity
|
184
|
+
alliance = get_or_create_esi_obj(EveEntity, id=alliance_id)
|
193
185
|
structure_owner = f"{corp_link} ({alliance.name})"
|
194
186
|
else:
|
195
187
|
structure_owner = corp_link
|
@@ -197,7 +189,7 @@ class NotificationSovAllAnchoringMsg(NotificationBaseEmbed):
|
|
197
189
|
structure_type = self._notification.eve_structure_type("typeID")
|
198
190
|
moon_id = self._parsed_text.get("moonID")
|
199
191
|
if moon_id:
|
200
|
-
eve_moon = EveMoon
|
192
|
+
eve_moon = get_or_create_esi_obj(EveMoon, id=moon_id)
|
201
193
|
location_text = _(" near **%s**") % eve_moon.name
|
202
194
|
else:
|
203
195
|
location_text = ""
|
{aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/structures_embeds.py
RENAMED
@@ -47,19 +47,24 @@ class NotificationStructureEmbed(NotificationBaseEmbed):
|
|
47
47
|
structure_type = structure.eve_type
|
48
48
|
structure_solar_system = structure.eve_solar_system
|
49
49
|
owner_link = gen_corporation_link(str(structure.owner))
|
50
|
-
|
50
|
+
# Translators: Context is a location, e.g. a moon
|
51
|
+
location = _(" at %s ") % structure.eve_moon if structure.eve_moon else ""
|
51
52
|
|
52
53
|
self._structure = structure
|
53
|
-
self._description =
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
54
|
+
self._description = (
|
55
|
+
_(
|
56
|
+
"The %(structure_type)s %(structure_name)s%(location)s "
|
57
|
+
"in %(solar_system)s belonging to %(owner_link)s"
|
58
|
+
)
|
59
|
+
% {
|
60
|
+
"structure_type": structure_type.name,
|
61
|
+
"structure_name": Webhook.text_bold(structure_name),
|
62
|
+
"location": location,
|
63
|
+
"solar_system": gen_solar_system_text(structure_solar_system),
|
64
|
+
"owner_link": owner_link,
|
65
|
+
}
|
66
|
+
+ " "
|
67
|
+
)
|
63
68
|
self._thumbnail = dhooks_lite.Thumbnail(
|
64
69
|
structure_type.icon_url(size=self.ICON_DEFAULT_SIZE)
|
65
70
|
)
|
@@ -97,11 +102,10 @@ class NotificationStructureJumpFuelAlert(NotificationStructureEmbed):
|
|
97
102
|
self._description += _(
|
98
103
|
"is below %(threshold)s units on Liquid Ozone.\n"
|
99
104
|
"Remaining units: %(remaining)s."
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
)
|
105
|
+
) % {
|
106
|
+
"threshold": f"{Webhook.text_bold(threshold_str)}",
|
107
|
+
"remaining": f"{Webhook.text_bold(quantity_str)}",
|
108
|
+
}
|
105
109
|
self._color = Webhook.Color.WARNING
|
106
110
|
|
107
111
|
|
@@ -161,10 +165,10 @@ class NotificationStructureUnderAttack(NotificationStructureEmbed):
|
|
161
165
|
def __init__(self, notification: Notification) -> None:
|
162
166
|
super().__init__(notification)
|
163
167
|
self._title = _("Structure under attack")
|
164
|
-
self._description += _("is under attack by %s.\n%s") %
|
165
|
-
self._get_attacker_link(),
|
166
|
-
self.compile_damage_text("Percentage"),
|
167
|
-
|
168
|
+
self._description += _("is under attack by %(attacker)s.\n%(damage_text)s") % {
|
169
|
+
"attacker": self._get_attacker_link(),
|
170
|
+
"damage_text": self.compile_damage_text("Percentage"),
|
171
|
+
}
|
168
172
|
self._color = Webhook.Color.DANGER
|
169
173
|
|
170
174
|
def _get_attacker_link(self) -> str:
|
@@ -175,7 +179,7 @@ class NotificationStructureUnderAttack(NotificationStructureEmbed):
|
|
175
179
|
if self._parsed_text.get("corpName"):
|
176
180
|
return gen_corporation_link(self._parsed_text["corpName"])
|
177
181
|
|
178
|
-
return "(unknown)"
|
182
|
+
return _("(unknown)")
|
179
183
|
|
180
184
|
|
181
185
|
class NotificationStructureLostShield(NotificationStructureEmbed):
|
@@ -291,7 +295,7 @@ class NotificationStructureReinforceChange(NotificationBaseEmbed):
|
|
291
295
|
id=structure_info[2]
|
292
296
|
),
|
293
297
|
eve_solar_system=None,
|
294
|
-
owner_link="(unknown)",
|
298
|
+
owner_link=_("(unknown)"),
|
295
299
|
)
|
296
300
|
)
|
297
301
|
else:
|
@@ -322,6 +326,6 @@ class NotificationStructureReinforceChange(NotificationBaseEmbed):
|
|
322
326
|
}
|
323
327
|
|
324
328
|
self._description += _(
|
325
|
-
"\n\nChange becomes effective at %s."
|
329
|
+
_("\n\nChange becomes effective at %s.")
|
326
330
|
) % target_datetime_formatted(change_effective)
|
327
331
|
self._color = Webhook.Color.INFO
|
{aa_structures-2.6.1 → aa_structures-2.6.2}/structures/core/notification_embeds/tower_embeds.py
RENAMED
@@ -36,15 +36,21 @@ class NotificationTowerEmbed(NotificationBaseEmbed):
|
|
36
36
|
self._thumbnail = dhooks_lite.Thumbnail(
|
37
37
|
structure_type.icon_url(size=self.ICON_DEFAULT_SIZE)
|
38
38
|
)
|
39
|
-
self._description =
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
39
|
+
self._description = (
|
40
|
+
_(
|
41
|
+
"The starbase %(structure_name)s at %(moon)s "
|
42
|
+
"in %(solar_system)s belonging to %(owner_link)s"
|
43
|
+
)
|
44
|
+
% {
|
45
|
+
"structure_name": Webhook.text_bold(structure_name),
|
46
|
+
"moon": eve_moon.name,
|
47
|
+
"solar_system": gen_solar_system_text(
|
48
|
+
eve_moon.eve_planet.eve_solar_system
|
49
|
+
),
|
50
|
+
"owner_link": gen_corporation_link(str(notification.owner)),
|
51
|
+
}
|
52
|
+
+ " "
|
53
|
+
)
|
48
54
|
|
49
55
|
|
50
56
|
class NotificationTowerAlertMsg(NotificationTowerEmbed):
|
@@ -138,7 +144,7 @@ class NotificationTowerReinforcedExtra(GeneratedNotificationTowerEmbed):
|
|
138
144
|
dt.datetime.fromisoformat(notification.details["reinforced_until"])
|
139
145
|
)
|
140
146
|
except (KeyError, ValueError):
|
141
|
-
reinforced_until = "(unknown)"
|
147
|
+
reinforced_until = _("(unknown)")
|
142
148
|
|
143
149
|
self._description += (
|
144
150
|
_("has been reinforced and will come out at: %s.") % reinforced_until
|