aa-fleetfinder 2.3.0__py3-none-any.whl → 2.3.2__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.

Potentially problematic release.


This version of aa-fleetfinder might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aa-fleetfinder
3
- Version: 2.3.0
3
+ Version: 2.3.2
4
4
  Summary: Fleet finder plugin for Alliance Auth
5
5
  Project-URL: Changelog, https://github.com/ppfeufer/aa-fleetfinder/blob/master/CHANGELOG.md
6
6
  Project-URL: Documentation, https://github.com/ppfeufer/aa-fleetfinder/blob/master/README.md
@@ -1,41 +1,42 @@
1
- fleetfinder/__init__.py,sha256=kieAXb2Irh9ZYxoY84GplpjEQsruvPS8oR_dSS_oXt4,197
1
+ fleetfinder/__init__.py,sha256=L0GsnJg-nhv8GXxe1b0gpEzxTq2luOX3-m2r6iic1Xk,197
2
+ fleetfinder/app_settings.py,sha256=XE5oZFg2Vhn5OYQFehoOwjgVgKAvXcyj5NGmrbr3bk8,261
2
3
  fleetfinder/apps.py,sha256=5t6R6HS_2cK3oCtTomvOM0dagt4sQkbnIWBhxT8dHrw,448
3
4
  fleetfinder/auth_hooks.py,sha256=_oHqIEfTFDB1lsVAOrEGCc6aLiLpRtjcPw7CdLNSdKw,1234
4
- fleetfinder/constants.py,sha256=HcZGcxE8P0-MFJDKVUFI_s9IDmXx9yA4sfZRe1pWpvU,513
5
+ fleetfinder/constants.py,sha256=apKYhl8Wu9pvifDXr4fU9wAb-1SpB7NhpBc_DJNPe5U,601
5
6
  fleetfinder/models.py,sha256=MEqsa-gRzFlCoU5awPwlLUzJ_2A2sNo9cPtfT-hVCNU,2805
6
7
  fleetfinder/providers.py,sha256=R6cy9MAxPw8AcZuIQwpQ1Knv13ItWCBCAspnJ_G30_U,205
7
8
  fleetfinder/tasks.py,sha256=pqDMPHFMXej4dPrf8fxucuYKtj9JPlActiNPIc4eAAQ,10969
8
9
  fleetfinder/urls.py,sha256=oL6zOnvQaGXFp-mOhsL9C_jU16YSPMAXUBM8s2_m4_U,1128
9
10
  fleetfinder/views.py,sha256=bnkfdHiFqE5tNOqEAeny3UKf992NyFV7R5zHWdwA-0U,9988
10
11
  fleetfinder/helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- fleetfinder/helper/static_files.py,sha256=_SyxxypaZhC0COVGqNom6NjE_PAH44_qVxBh9K1YFeI,1069
12
- fleetfinder/locale/django.pot,sha256=-3vzEpK_Uj8ibYQXWHDIfy09XoBXRtbzGr0hikESEzo,5833
12
+ fleetfinder/helper/static_files.py,sha256=SeXQOKBchaWcKRcNtTqVF_oEvL4-nXNkDHpuYxbNzRk,1085
13
+ fleetfinder/locale/django.pot,sha256=lF7gb8eZmYMzuDrhuoJ2A4eEmIHM2eyzTG7YAcWdnlA,5833
13
14
  fleetfinder/locale/cs_CZ/LC_MESSAGES/django.mo,sha256=5R9bbNXwdd02SL7SFFIErS-ytrzIyCYPf0VZOtg9KT8,954
14
- fleetfinder/locale/cs_CZ/LC_MESSAGES/django.po,sha256=RfBBcnpB0gS1OpQIydN6lrZ6X6XEHkhG9knb3nkafjU,6213
15
+ fleetfinder/locale/cs_CZ/LC_MESSAGES/django.po,sha256=3wA0Zte6CetPXdxVnzS7-MBbXkC_aqgLsQ7T_MrCR8s,6213
15
16
  fleetfinder/locale/de/LC_MESSAGES/django.mo,sha256=0Hw0C_HjNm5bfULklTio3jQNbDObhPXjymmNW-_14ls,3865
16
- fleetfinder/locale/de/LC_MESSAGES/django.po,sha256=S9Fulg2uvOmddSXH5KOQ_E6O54UCYjVM_H7oPHsYiO4,7265
17
+ fleetfinder/locale/de/LC_MESSAGES/django.po,sha256=ocF-b9uL1gB6dbGXWQocsHPVXAxJSG-7t6hn7hdHCVg,7265
17
18
  fleetfinder/locale/es/LC_MESSAGES/django.mo,sha256=PMpQLF76l-RHZwyLSFGatNOiBc1W88afvlZf9XpJANA,2978
18
- fleetfinder/locale/es/LC_MESSAGES/django.po,sha256=i97zXRmNhdSvDab8K8Jp8y72yCH7UlrDxpm7oaQQcWY,7758
19
+ fleetfinder/locale/es/LC_MESSAGES/django.po,sha256=FXDAfemJoR5TDOPagShdUbzQlpSzxk5HTxaL1FbOQ7I,7758
19
20
  fleetfinder/locale/fr_FR/LC_MESSAGES/django.mo,sha256=PrAqn21OP-eXs9QBF5XRDMPg0h1Flgv2df8gOzL4d70,2096
20
- fleetfinder/locale/fr_FR/LC_MESSAGES/django.po,sha256=G6Di6h19_p2a7fYmU9dYXDqkj-HHM6P3excHA7wBvYU,6807
21
+ fleetfinder/locale/fr_FR/LC_MESSAGES/django.po,sha256=sH6x9d0vuhgiywv1If66wG9NkvEUG9yysEYIyBqMMgg,6807
21
22
  fleetfinder/locale/it_IT/LC_MESSAGES/django.mo,sha256=T8RDYnDQ22o4_xxwcmq3znMN5QKlZbty-mWB7dxdEbI,588
22
- fleetfinder/locale/it_IT/LC_MESSAGES/django.po,sha256=CukE4CpPQgI4hpS_VoBHkGFa9P1SdSM3TDM86hNOXVg,6037
23
+ fleetfinder/locale/it_IT/LC_MESSAGES/django.po,sha256=h-X4Lzvf3sFxfuIYnUI37yMbV-rkd-ru0Stf9ioJ8Gc,6037
23
24
  fleetfinder/locale/ja/LC_MESSAGES/django.mo,sha256=5mlXpXBHCUM4QNz2hzagZSgJeR-QJIzEEBPxXzGN64I,1579
24
- fleetfinder/locale/ja/LC_MESSAGES/django.po,sha256=5zAZnpNQcyjnM5J4mfpeI8QS3KabIJbEevDULohDg9E,6501
25
+ fleetfinder/locale/ja/LC_MESSAGES/django.po,sha256=i21hwTXvyhAyWHv9_rKh69dOvbWDGioN7skrAkyCpBo,6501
25
26
  fleetfinder/locale/ko_KR/LC_MESSAGES/django.mo,sha256=-_NjmlWe2ve5WRA9zV05anjOMsQQdNOhk8_mEplh7nU,3315
26
- fleetfinder/locale/ko_KR/LC_MESSAGES/django.po,sha256=9nkvkfreOwnlOwjMvRW-2_DtjJ2Xr0b0QO7ne1ilkC4,7612
27
+ fleetfinder/locale/ko_KR/LC_MESSAGES/django.po,sha256=Qt5K0vzMA9zWgXGrSGeIuB8UW6gwXdhnPZFctlDAwe0,7612
27
28
  fleetfinder/locale/nl_NL/LC_MESSAGES/django.mo,sha256=hY0OE4OeTR2OJEImNcsL8tWjBqe0rJYToAlRXZ44ngA,480
28
- fleetfinder/locale/nl_NL/LC_MESSAGES/django.po,sha256=MfKJiBBi_uZpbDsz6_n-yb3hukDukCIKgH7OMWh8eq4,5955
29
+ fleetfinder/locale/nl_NL/LC_MESSAGES/django.po,sha256=-GElYY-vVd-4kkDnP8g4OsBfQk6PpOtfDw3KYTjRx90,5955
29
30
  fleetfinder/locale/pl_PL/LC_MESSAGES/django.mo,sha256=Tn664mvAzrylWiO5ferY3XeQuZTRuND77MPmgAZSvZs,1008
30
- fleetfinder/locale/pl_PL/LC_MESSAGES/django.po,sha256=zKZ0gAKO-mm_UCFX8PoUldDXo6JBQcg-l7K1hIBjPlw,6202
31
+ fleetfinder/locale/pl_PL/LC_MESSAGES/django.po,sha256=X4Ft8SeIwXOvPoGLGkHwikhJ3NDbOre3_KisxW1RE2U,6202
31
32
  fleetfinder/locale/ru/LC_MESSAGES/django.mo,sha256=nphsjOteZ0-rwwH52Jovk4Jy1ouz-9Wo-7WC6_Bmc_k,4716
32
- fleetfinder/locale/ru/LC_MESSAGES/django.po,sha256=NFpRrl7K10haU8SeUIGS5pPg9XJDw0slARBqP--ool8,8242
33
+ fleetfinder/locale/ru/LC_MESSAGES/django.po,sha256=ZX7e1NQG_N6eSwUTUuuFksCVFDXpi193FPD0uWDHIU8,8242
33
34
  fleetfinder/locale/sk/LC_MESSAGES/django.mo,sha256=ydYhRqhAuhtbbNwWz_TkLnphHfGgKDcKugeyLxmpZWk,559
34
- fleetfinder/locale/sk/LC_MESSAGES/django.po,sha256=Pyn7M_VnZdYDA9g5hIB2w73srrkhb7sxDB_FzD30ZqU,6030
35
- fleetfinder/locale/uk/LC_MESSAGES/django.mo,sha256=C2jS7TKByudWgnJF2lx_z3EQVKFUF1rmVA2p3t-OHj4,2054
36
- fleetfinder/locale/uk/LC_MESSAGES/django.po,sha256=VjEbwl1mUIh5lWyAoYlaPBVD-AZ8eC3bBQomD1LyaDk,7507
35
+ fleetfinder/locale/sk/LC_MESSAGES/django.po,sha256=skz0Nt91FvkGXQdb-DVZZqhM3_VgzFl_D5b3LS6--ZE,6030
36
+ fleetfinder/locale/uk/LC_MESSAGES/django.mo,sha256=XwPF8jbLUpNbU5nUzm-8TXeuVIRoqf-ob53c0zYbCl0,2092
37
+ fleetfinder/locale/uk/LC_MESSAGES/django.po,sha256=9plRDBND-Nl3wqt2CotlSKE5Dqp0WxTB7U-Eem8KduY,7544
37
38
  fleetfinder/locale/zh_Hans/LC_MESSAGES/django.mo,sha256=3tiyQVoDtsbjyYPetn2m9kG5lBB0c_7HyZhzhENsbWs,3624
38
- fleetfinder/locale/zh_Hans/LC_MESSAGES/django.po,sha256=SxzrY9fIRtlNp1Tod7uQQAF1CCTAU2kiS6JEhFt7gqw,7114
39
+ fleetfinder/locale/zh_Hans/LC_MESSAGES/django.po,sha256=rCLCz8sfylP18XavZuidsc-zNxOfbgSOGD0oiIJo2zE,7114
39
40
  fleetfinder/migrations/0001_initial.py,sha256=4Jsjh77PXS87OHBHam8KOFSTaRvlS-qpPmD5vNnVagI,2445
40
41
  fleetfinder/migrations/0002_esi_error_handling_and_verbose_names.py,sha256=CqOqsJDz-GFj3E6DwShKf0fUIgEKhd4NMJIfu21eEJ0,3229
41
42
  fleetfinder/migrations/0003_alter_fleet_fleet_commander_alter_fleet_groups_and_more.py,sha256=RbjYRrPVTq-adUQPbXpXVRAT2VmOW0wEdacWhxlggX4,1606
@@ -53,20 +54,21 @@ fleetfinder/templates/fleetfinder/dashboard.html,sha256=UAFDMAcp1EYMUWy7UapVIdLg
53
54
  fleetfinder/templates/fleetfinder/edit-fleet.html,sha256=XahECF3ZJKTiAr8oNp7bqbIHjACpfxi1_mIhXP1XIvY,1206
54
55
  fleetfinder/templates/fleetfinder/fleet-details.html,sha256=8XDYQrO7sTIc8O7_p_In0A85gK4DuAwlAoFPvLDRidk,4595
55
56
  fleetfinder/templates/fleetfinder/join-fleet.html,sha256=mn_B8o5MUlG4UYvFajoGaGmtTbQDJiYIZa-LsSmer50,2000
56
- fleetfinder/templates/fleetfinder/bundles/css/fleetfinder-css.html,sha256=evSAYE0oD_IuUT3lyQPJQmdsXir1jHI6cOX1H9lXrkU,76
57
+ fleetfinder/templates/fleetfinder/bundles/css/fleetfinder-css.html,sha256=0yJLTi3Xx1qzGT-V53D191HMqWkkJFESFvX1nhbY16A,75
57
58
  fleetfinder/templates/fleetfinder/bundles/css/slim-select-css.html,sha256=4sC5sa6eGutAH1VsaTY-THtlxNYQzaL-6rNcKVouLiM,97
58
59
  fleetfinder/templates/fleetfinder/bundles/js/slim-select-js.html,sha256=aXa7Cg4vcLywqaGRGz9v0bPL7B3-V6en1OrnR9vRWsI,95
59
60
  fleetfinder/templates/fleetfinder/partials/body/form-fleet-details.html,sha256=8xfjGRNmzIUHrlV-xz2P11vupAdpC8oUGFPxlnjJKFQ,2149
60
61
  fleetfinder/templates/fleetfinder/partials/footer/app-translation-footer.html,sha256=nDZPOnsQLBN9meAhxnhd0ynUQIVi3YPzhi47n89zcIg,422
61
62
  fleetfinder/templates/fleetfinder/partials/header/header-navigation.html,sha256=m9pNf29rFEDVB6Jv6UL8nPazYx-BNkvKdrFnXGa2uSs,1302
62
63
  fleetfinder/templatetags/__init__.py,sha256=sP2D1ovt2gGAPLcGQkByRgXYhvUJ6C52mZMlLIALQ8s,37
63
- fleetfinder/templatetags/fleetfinder.py,sha256=OG87mkGElIaD_9X83DtDECBLs-DKqHJYPI6MAA-_D1E,2424
64
+ fleetfinder/templatetags/fleetfinder.py,sha256=QvFCLpisfYYsZbOCpGelF5mejwMVjpoZQXHFS1qlN7g,2733
64
65
  fleetfinder/tests/__init__.py,sha256=NLuMBNDHYOXDmPgpyG-g_kDaATVQWv1iC-dJ8BA1kZc,29
65
66
  fleetfinder/tests/test_access.py,sha256=rQAfeEre2CmCszFTLV_53HK7m5Odq7ZqACJ3kcedgjk,1691
66
67
  fleetfinder/tests/test_auth_hooks.py,sha256=XEB0LJmxxJCDlYhxKzcRiEHYrn1k_NkShrDGV_bcweg,2174
67
- fleetfinder/tests/test_templatetags.py,sha256=xaYBdj0xpPvsATuyoTHrkBIG_ZFC0cNkNmgocev4hNU,1230
68
+ fleetfinder/tests/test_settings.py,sha256=CuarOzsrkoMx7dmqolsnhnuhis7N10GaOULo6KYIl7k,710
69
+ fleetfinder/tests/test_templatetags.py,sha256=0rdqdasG-pYMdXiCt_Z1pqsbTBtmj4LEDw4F1ffj8hw,2777
68
70
  fleetfinder/tests/utils.py,sha256=ynwH67jb14UFi6hpLAXe_FcYdQcjET_sxuUylWPNpnk,1451
69
- aa_fleetfinder-2.3.0.dist-info/METADATA,sha256=_lZQaLkdmqbNVk8wVxd1_WwzmQMkWMlqwXqobzmr5Y4,48119
70
- aa_fleetfinder-2.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
71
- aa_fleetfinder-2.3.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
72
- aa_fleetfinder-2.3.0.dist-info/RECORD,,
71
+ aa_fleetfinder-2.3.2.dist-info/METADATA,sha256=LwzlURJg6j3EHHTuY3tkNkCEj3TUcu_DxuD_u1e1UgY,48119
72
+ aa_fleetfinder-2.3.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
73
+ aa_fleetfinder-2.3.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
74
+ aa_fleetfinder-2.3.2.dist-info/RECORD,,
fleetfinder/__init__.py CHANGED
@@ -5,6 +5,6 @@ Initialize the app
5
5
  # Django
6
6
  from django.utils.translation import gettext_lazy as _
7
7
 
8
- __version__ = "2.3.0"
8
+ __version__ = "2.3.2"
9
9
  __title__ = _("Fleet Finder")
10
10
  __verbose_name__ = "Fleet Finder for Alliance Auth"
@@ -0,0 +1,20 @@
1
+ """
2
+ App settings for FleetFinder.
3
+ """
4
+
5
+ # Standard Library
6
+ from re import RegexFlag
7
+
8
+ # Django
9
+ from django.conf import settings
10
+
11
+
12
+ def debug_enabled() -> RegexFlag:
13
+ """
14
+ Check if DEBUG is enabled
15
+
16
+ :return:
17
+ :rtype:
18
+ """
19
+
20
+ return settings.DEBUG
fleetfinder/constants.py CHANGED
@@ -11,11 +11,12 @@ from esi import __version__ as esi_version
11
11
  # AA Fleet Finder
12
12
  from fleetfinder import __version__
13
13
 
14
- AA_FLEETFINDER_BASE_DIR = os.path.join(os.path.dirname(__file__))
15
- AA_FLEETFINDER_STATIC_DIR = os.path.join(
16
- AA_FLEETFINDER_BASE_DIR, "static", "fleetfinder"
17
- )
18
-
19
14
  APP_NAME = "aa-fleetfinder"
15
+ APP_NAME_VERBOSE = "AA Fleet Finder"
16
+ APP_NAME_VERBOSE_USERAGENT = "AA-Fleet-Finder"
17
+ PACKAGE_NAME = "fleetfinder"
20
18
  GITHUB_URL = f"https://github.com/ppfeufer/{APP_NAME}"
21
- USER_AGENT = f"{APP_NAME}/{__version__} ({GITHUB_URL}) via django-esi/{esi_version}"
19
+ USER_AGENT = f"{APP_NAME_VERBOSE_USERAGENT}/{__version__} (+{GITHUB_URL}) Django-ESI/{esi_version}"
20
+
21
+ APP_BASE_DIR = os.path.join(os.path.dirname(__file__))
22
+ APP_STATIC_DIR = os.path.join(APP_BASE_DIR, "static", PACKAGE_NAME)
@@ -17,7 +17,7 @@ from app_utils.logging import LoggerAddTag
17
17
 
18
18
  # AA Fleet Finder
19
19
  from fleetfinder import __title__
20
- from fleetfinder.constants import AA_FLEETFINDER_STATIC_DIR
20
+ from fleetfinder.constants import APP_STATIC_DIR
21
21
 
22
22
  logger = LoggerAddTag(my_logger=get_extension_logger(__name__), prefix=__title__)
23
23
 
@@ -25,15 +25,18 @@ logger = LoggerAddTag(my_logger=get_extension_logger(__name__), prefix=__title__
25
25
  def calculate_integrity_hash(relative_file_path: str) -> str:
26
26
  """
27
27
  Calculates the integrity hash for a given static file
28
+
28
29
  :param self:
29
30
  :type self:
30
- :param relative_file_path: The file path relative to the `aa-timezones/timezones/static/timezones` folder
31
+ :param relative_file_path: The file path relative to the `{APP_NAME}/{PACKAGE_NAME}/static/{PACKAGE_NAME}` folder
31
32
  :type relative_file_path: str
32
33
  :return: The integrity hash
33
34
  :rtype: str
34
35
  """
35
36
 
36
- file_path = os.path.join(AA_FLEETFINDER_STATIC_DIR, relative_file_path)
37
- integrity_hash = calculate_integrity(Path(file_path), Algorithm.SHA512)
37
+ file_path = os.path.join(APP_STATIC_DIR, relative_file_path)
38
+ integrity_hash = calculate_integrity(
39
+ path=Path(file_path), algorithm=Algorithm.SHA512
40
+ )
38
41
 
39
42
  return integrity_hash
@@ -6,7 +6,7 @@ msgid ""
6
6
  msgstr ""
7
7
  "Project-Id-Version: AA Fleet Finder 2.2.1\n"
8
8
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
9
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
9
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
10
10
  "PO-Revision-Date: 2024-07-10 14:26+0000\n"
11
11
  "Last-Translator: Dadas Aideron <dadas.aideron@gmail.com>\n"
12
12
  "Language-Team: Czech <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-fleetfinder/cs/>\n"
@@ -6,7 +6,7 @@ msgid ""
6
6
  msgstr ""
7
7
  "Project-Id-Version: AA Fleet Finder 2.2.1\n"
8
8
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
9
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
9
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
10
10
  "PO-Revision-Date: 2024-05-10 14:03+0000\n"
11
11
  "Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
12
12
  "Language-Team: German <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-fleetfinder/de/>\n"
@@ -6,9 +6,9 @@
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: AA Fleet Finder 2.2.2\n"
9
+ "Project-Id-Version: AA Fleet Finder 2.3.2\n"
10
10
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
11
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
11
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
12
12
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: AA Fleet Finder 2.2.1\n"
9
9
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
10
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
10
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
11
11
  "PO-Revision-Date: 2024-12-02 17:40+0000\n"
12
12
  "Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
13
13
  "Language-Team: Spanish <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-fleetfinder/es/>\n"
@@ -11,7 +11,7 @@ msgid ""
11
11
  msgstr ""
12
12
  "Project-Id-Version: AA Fleet Finder 2.2.1\n"
13
13
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
14
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
14
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
15
15
  "PO-Revision-Date: 2024-12-10 17:15+0000\n"
16
16
  "Last-Translator: balbozorre <loic.petiot2002@gmail.com>\n"
17
17
  "Language-Team: French <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-fleetfinder/fr/>\n"
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: AA Fleet Finder 2.2.1\n"
9
9
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
10
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
10
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
11
11
  "PO-Revision-Date: 2024-12-22 21:15+0000\n"
12
12
  "Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
13
13
  "Language-Team: Italian <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-fleetfinder/it/>\n"
@@ -8,7 +8,7 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: AA Fleet Finder 2.2.1\n"
10
10
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
11
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
11
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
12
12
  "PO-Revision-Date: 2024-08-06 11:28+0000\n"
13
13
  "Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
14
14
  "Language-Team: Japanese <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-fleetfinder/ja/>\n"
@@ -8,7 +8,7 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: AA Fleet Finder 2.2.1\n"
10
10
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
11
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
11
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
12
12
  "PO-Revision-Date: 2024-05-10 14:03+0000\n"
13
13
  "Last-Translator: Mind of the Raven <okanieva@gmail.com>\n"
14
14
  "Language-Team: Korean <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-fleetfinder/ko/>\n"
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: AA Fleet Finder 2.2.1\n"
9
9
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
10
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
10
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
11
11
  "PO-Revision-Date: 2024-05-10 14:03+0000\n"
12
12
  "Last-Translator: Anonymous <noreply@weblate.org>\n"
13
13
  "Language-Team: Dutch <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-fleetfinder/nl/>\n"
@@ -6,7 +6,7 @@ msgid ""
6
6
  msgstr ""
7
7
  "Project-Id-Version: AA Fleet Finder 2.2.1\n"
8
8
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
9
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
9
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
10
10
  "PO-Revision-Date: 2024-05-10 14:03+0000\n"
11
11
  "Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
12
12
  "Language-Team: Polish <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-fleetfinder/pl/>\n"
@@ -9,7 +9,7 @@ msgid ""
9
9
  msgstr ""
10
10
  "Project-Id-Version: AA Fleet Finder 2.2.1\n"
11
11
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
12
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
12
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
13
13
  "PO-Revision-Date: 2024-06-06 14:27+0000\n"
14
14
  "Last-Translator: Roycce_ <malyasov.roma@mail.ru>\n"
15
15
  "Language-Team: Russian <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-fleetfinder/ru/>\n"
@@ -7,7 +7,7 @@ msgid ""
7
7
  msgstr ""
8
8
  "Project-Id-Version: AA Fleet Finder 2.2.1\n"
9
9
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
10
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
10
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
11
11
  "PO-Revision-Date: 2024-05-10 14:03+0000\n"
12
12
  "Last-Translator: Anonymous <noreply@weblate.org>\n"
13
13
  "Language-Team: Slovak <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-fleetfinder/sk/>\n"
Binary file
@@ -4,20 +4,21 @@
4
4
  # "Andrii M." <elfleg0las88@gmail.com>, 2023, 2024.
5
5
  # Peter Pfeufer <info@ppfeufer.de>, 2023, 2024.
6
6
  # Kristof <kristof@teh.ninja>, 2023, 2024.
7
+ # M <skrypets@gmail.com>, 2025.
7
8
  msgid ""
8
9
  msgstr ""
9
10
  "Project-Id-Version: AA Fleet Finder 2.2.1\n"
10
11
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
11
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
12
- "PO-Revision-Date: 2024-10-04 18:10+0000\n"
13
- "Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
12
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
13
+ "PO-Revision-Date: 2025-02-23 23:17+0000\n"
14
+ "Last-Translator: M <skrypets@gmail.com>\n"
14
15
  "Language-Team: Ukrainian <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-fleetfinder/uk/>\n"
15
16
  "Language: uk\n"
16
17
  "MIME-Version: 1.0\n"
17
18
  "Content-Type: text/plain; charset=UTF-8\n"
18
19
  "Content-Transfer-Encoding: 8bit\n"
19
20
  "Plural-Forms: nplurals=4; plural=n==1 ? 3 : (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
20
- "X-Generator: Weblate 5.7.2\n"
21
+ "X-Generator: Weblate 5.10.1\n"
21
22
 
22
23
  #: fleetfinder/__init__.py:9 fleetfinder/models.py:24
23
24
  #: fleetfinder/templates/fleetfinder/base.html:6
@@ -90,7 +91,7 @@ msgstr ""
90
91
 
91
92
  #: fleetfinder/models.py:73
92
93
  msgid "Group restrictions"
93
- msgstr "Групові обмеження"
94
+ msgstr "Обмеження групи"
94
95
 
95
96
  #: fleetfinder/models.py:81
96
97
  msgid "Last ESI error"
@@ -156,7 +157,7 @@ msgstr ""
156
157
 
157
158
  #: fleetfinder/templates/fleetfinder/fleet-details.html:26
158
159
  msgid "Count"
159
- msgstr ""
160
+ msgstr "Кількість"
160
161
 
161
162
  #: fleetfinder/templates/fleetfinder/fleet-details.html:41
162
163
  #, fuzzy
@@ -9,7 +9,7 @@ msgid ""
9
9
  msgstr ""
10
10
  "Project-Id-Version: AA Fleet Finder 2.2.1\n"
11
11
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-fleetfinder/issues\n"
12
- "POT-Creation-Date: 2025-01-20 16:14+0100\n"
12
+ "POT-Creation-Date: 2025-03-06 22:02+0100\n"
13
13
  "PO-Revision-Date: 2024-06-06 14:27+0000\n"
14
14
  "Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
15
15
  "Language-Team: Chinese (Simplified) <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-fleetfinder/zh_Hans/>\n"
@@ -1,3 +1,3 @@
1
1
  {% load fleetfinder %}
2
2
 
3
- {% fleetfinder_static "css/fleetfinder.min.css" %}"
3
+ {% fleetfinder_static "css/fleetfinder.min.css" %}
@@ -18,18 +18,22 @@ from app_utils.logging import LoggerAddTag
18
18
 
19
19
  # AA Fleet Finder
20
20
  from fleetfinder import __title__, __version__
21
+ from fleetfinder.app_settings import debug_enabled
22
+ from fleetfinder.constants import PACKAGE_NAME
21
23
  from fleetfinder.helper.static_files import calculate_integrity_hash
22
24
 
23
25
  logger = LoggerAddTag(my_logger=get_extension_logger(__name__), prefix=__title__)
24
26
 
25
27
 
26
28
  @register.simple_tag
27
- def fleetfinder_static(relative_file_path: str) -> str | None:
29
+ def fleetfinder_static(relative_file_path: str, script_type: str = None) -> str | None:
28
30
  """
29
31
  Versioned static URL
30
32
 
31
- :param relative_file_path: The file path relative to the `aa-fleetfinder/fleetfinder/static/fleetfinder` folder
33
+ :param relative_file_path: The file path relative to the `{APP_NAME}/{PACKAGE_NAME}/static/{PACKAGE_NAME}` folder
32
34
  :type relative_file_path: str
35
+ :param script_type: The script type
36
+ :type script_type: str
33
37
  :return: Versioned static URL
34
38
  :rtype: str
35
39
  """
@@ -44,10 +48,16 @@ def fleetfinder_static(relative_file_path: str) -> str | None:
44
48
  if file_type not in ["css", "js"]:
45
49
  raise ValueError(f"Unsupported file type: {file_type}")
46
50
 
47
- integrity_hash = calculate_integrity_hash(relative_file_path)
48
- static_file_path = os.path.join("fleetfinder", relative_file_path)
51
+ static_file_path = os.path.join(PACKAGE_NAME, relative_file_path)
49
52
  static_url = static(static_file_path)
50
53
 
54
+ # Integrity hash calculation only for non-debug mode
55
+ sri_string = (
56
+ f' integrity="{calculate_integrity_hash(relative_file_path)}" crossorigin="anonymous"'
57
+ if not debug_enabled()
58
+ else ""
59
+ )
60
+
51
61
  # Versioned URL for CSS and JS files
52
62
  # Add version query parameter to break browser caches when changing the app version
53
63
  # Do not add version query parameter for libs as they are already versioned through their file path
@@ -57,18 +67,20 @@ def fleetfinder_static(relative_file_path: str) -> str | None:
57
67
  else static_url + "?v=" + __version__
58
68
  )
59
69
 
70
+ return_value = None
71
+
60
72
  # Return the versioned URL with integrity hash for CSS
61
73
  if file_type == "css":
62
- logger.debug(f"Integrity hash for {relative_file_path}: {integrity_hash}")
63
-
64
- return mark_safe(
65
- f'<link rel="stylesheet" href="{versioned_url}" integrity="{integrity_hash}" crossorigin="anonymous">'
74
+ return_value = mark_safe(
75
+ f'<link rel="stylesheet" href="{versioned_url}"{sri_string}>'
66
76
  )
67
77
 
68
78
  # Return the versioned URL with integrity hash for JS files
69
79
  if file_type == "js":
70
- return mark_safe(
71
- f'<script src="{versioned_url}" integrity="{integrity_hash}" crossorigin="anonymous"></script>'
80
+ js_type = f' type="{script_type}"' if script_type else ""
81
+
82
+ return_value = mark_safe(
83
+ f'<script{js_type} src="{versioned_url}"{sri_string}></script>'
72
84
  )
73
85
 
74
- return None
86
+ return return_value
@@ -0,0 +1,37 @@
1
+ """
2
+ Test the settings
3
+ """
4
+
5
+ # Django
6
+ from django.test import TestCase, override_settings
7
+
8
+ # AA Fleet Finder
9
+ from fleetfinder.app_settings import debug_enabled
10
+
11
+
12
+ class TestSettings(TestCase):
13
+ """
14
+ Test the settings
15
+ """
16
+
17
+ @override_settings(DEBUG=True)
18
+ def test_debug_enabled_with_debug_true(self) -> None:
19
+ """
20
+ Test debug_enabled with DEBUG = True
21
+
22
+ :return:
23
+ :rtype:
24
+ """
25
+
26
+ self.assertTrue(debug_enabled())
27
+
28
+ @override_settings(DEBUG=False)
29
+ def test_debug_enabled_with_debug_false(self) -> None:
30
+ """
31
+ Test debug_enabled with DEBUG = False
32
+
33
+ :return:
34
+ :rtype:
35
+ """
36
+
37
+ self.assertFalse(debug_enabled())
@@ -4,10 +4,11 @@ Test the apps' template tags
4
4
 
5
5
  # Django
6
6
  from django.template import Context, Template
7
- from django.test import TestCase
7
+ from django.test import TestCase, override_settings
8
8
 
9
9
  # AA Fleet Finder
10
10
  from fleetfinder import __version__
11
+ from fleetfinder.constants import PACKAGE_NAME
11
12
  from fleetfinder.helper.static_files import calculate_integrity_hash
12
13
 
13
14
 
@@ -16,6 +17,7 @@ class TestVersionedStatic(TestCase):
16
17
  Test the `fleetfinder_static` template tag
17
18
  """
18
19
 
20
+ @override_settings(DEBUG=False)
19
21
  def test_versioned_static(self):
20
22
  """
21
23
  Test should return the versioned static
@@ -32,14 +34,62 @@ class TestVersionedStatic(TestCase):
32
34
  )
33
35
  )
34
36
 
35
- rendered_template = template_to_render.render(context)
37
+ rendered_template = template_to_render.render(context=context)
36
38
 
37
- expected_static_src = (
38
- f'/static/fleetfinder/css/fleetfinder.min.css?v={context["version"]}'
39
+ expected_static_css_src = (
40
+ f'/static/{PACKAGE_NAME}/css/fleetfinder.min.css?v={context["version"]}'
39
41
  )
40
- expected_static_src_integrity = calculate_integrity_hash(
42
+ expected_static_css_src_integrity = calculate_integrity_hash(
41
43
  "css/fleetfinder.min.css"
42
44
  )
43
45
 
44
- self.assertIn(member=expected_static_src, container=rendered_template)
45
- self.assertIn(member=expected_static_src_integrity, container=rendered_template)
46
+ self.assertIn(member=expected_static_css_src, container=rendered_template)
47
+ self.assertIn(
48
+ member=expected_static_css_src_integrity, container=rendered_template
49
+ )
50
+
51
+ @override_settings(DEBUG=True)
52
+ def test_versioned_static_with_debug_enabled(self) -> None:
53
+ """
54
+ Test versioned static template tag with DEBUG enabled
55
+
56
+ :return:
57
+ :rtype:
58
+ """
59
+
60
+ context = Context({"version": __version__})
61
+ template_to_render = Template(
62
+ template_string=(
63
+ "{% load fleetfinder %}"
64
+ "{% fleetfinder_static 'css/fleetfinder.min.css' %}"
65
+ )
66
+ )
67
+
68
+ rendered_template = template_to_render.render(context=context)
69
+
70
+ expected_static_css_src = (
71
+ f'/static/{PACKAGE_NAME}/css/fleetfinder.min.css?v={context["version"]}'
72
+ )
73
+
74
+ self.assertIn(member=expected_static_css_src, container=rendered_template)
75
+ self.assertNotIn(member="integrity=", container=rendered_template)
76
+
77
+ @override_settings(DEBUG=False)
78
+ def test_invalid_file_type(self) -> None:
79
+ """
80
+ Test should raise a ValueError for an invalid file type
81
+
82
+ :return:
83
+ :rtype:
84
+ """
85
+
86
+ context = Context({"version": __version__})
87
+ template_to_render = Template(
88
+ template_string=(
89
+ "{% load fleetfinder %}"
90
+ "{% fleetfinder_static 'invalid/invalid.txt' %}"
91
+ )
92
+ )
93
+
94
+ with self.assertRaises(ValueError):
95
+ template_to_render.render(context=context)