aa-alumni 0.1.4a0__py3-none-any.whl → 0.2.0__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-alumni might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Joel Falknau
3
+ Copyright (c) 2021 Joel Falknau
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,14 +1,16 @@
1
1
  Metadata-Version: 2.1
2
- Name: aa-alumni
3
- Version: 0.1.4a0
2
+ Name: aa_alumni
3
+ Version: 0.2.0
4
4
  Summary: Integration with Alliance Auths State System, creates and maintains an Alumni State for past members of an Alliance and/or Corporation
5
- Home-page: https://gitlab.com/tactical-supremacy/aa-alumni
6
- Author: Joel Falknau
7
- Author-email: joel.falknau@gmail.com
8
- License: MIT
5
+ Keywords: allianceauth,eveonline
6
+ Author-email: Joel Falknau <joel.falknau@gmail.com>
7
+ Requires-Python: >=3.8
8
+ Description-Content-Type: text/markdown
9
9
  Classifier: Environment :: Web Environment
10
+ Classifier: Framework :: Celery
10
11
  Classifier: Framework :: Django
11
12
  Classifier: Framework :: Django :: 4.0
13
+ Classifier: Framework :: Django :: 4.2
12
14
  Classifier: Intended Audience :: Developers
13
15
  Classifier: License :: OSI Approved :: MIT License
14
16
  Classifier: Operating System :: OS Independent
@@ -18,13 +20,15 @@ Classifier: Programming Language :: Python :: 3.8
18
20
  Classifier: Programming Language :: Python :: 3.9
19
21
  Classifier: Programming Language :: Python :: 3.10
20
22
  Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
21
24
  Classifier: Programming Language :: Python :: Implementation :: CPython
22
25
  Classifier: Topic :: Internet :: WWW/HTTP
23
26
  Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
24
- Requires-Python: ~=3.8
25
- Description-Content-Type: text/markdown
26
- License-File: LICENSE
27
- Requires-Dist: allianceauth (>=3.0.0)
27
+ Requires-Dist: allianceauth>=3.0.0,<5.0.0
28
+ Requires-Dist: django-solo>=2.0.0,<3.0.0
29
+ Project-URL: Homepage, https://gitlab.com/tactical-supremacy/aa-alumni
30
+ Project-URL: Source, https://gitlab.com/tactical-supremacy/aa-alumni
31
+ Project-URL: Tracker, https://gitlab.com/tactical-supremacy/aa-alumni/-/issues
28
32
 
29
33
  # Alliance Auth - Alumni
30
34
 
@@ -35,13 +39,17 @@ Requires-Dist: allianceauth (>=3.0.0)
35
39
  ## Installation
36
40
 
37
41
  ### Step 1 - Prepare Auth
42
+
38
43
  Remove/Promote any state with a priority of `1`, Alumni is considered slightly better than the built in Guest State.
44
+
39
45
  ### Step 2 - Install from pip
40
- ```bash
46
+
47
+ ```shell
41
48
  pip install aa-alumni
42
49
  ```
43
50
 
44
51
  ### Step 3 - Configure Auth settings
52
+
45
53
  Configure your Auth settings (`local.py`) as follows:
46
54
 
47
55
  - Add `'alumni'` to `INSTALLED_APPS`
@@ -49,7 +57,7 @@ Configure your Auth settings (`local.py`) as follows:
49
57
 
50
58
  ```python
51
59
  ## Settings for AA-Alumni
52
- # Market Orders
60
+ # Tasks
53
61
  CELERYBEAT_SCHEDULE['alumni_run_alumni_check_all'] = {
54
62
  'task': 'alumni.tasks.run_alumni_check_all',
55
63
  'schedule': crontab(minute=0, hour=0, day_of_week=4),
@@ -62,18 +70,22 @@ CELERYBEAT_SCHEDULE['alumni_run_update_all_models'] = {
62
70
 
63
71
  ### Step 4 - Update AA's State system
64
72
 
65
- ```bash
73
+ ```shell
66
74
  python myauth/manage.py alumni_state
67
75
  ```
68
76
 
69
77
  ### Step 5 - Maintain Alliance Auth
78
+
70
79
  - Run migrations `python manage.py migrate`
71
80
  - Gather your staticfiles `python manage.py collectstatic`
72
81
  - Restart your project `supervisorctl restart myauth:`
73
82
 
74
83
  ### Step 6 - Configure Further
84
+
75
85
  In the Admin interface, visit `alumni > config > add` or `<AUTH-URL>/admin/alumni/config/add/`
76
86
  Select the Alliances and/or Corporations for which characters with historical membership are Alumni
77
87
 
78
88
  ## Contributing
89
+
79
90
  Make sure you have signed the [License Agreement](https://developers.eveonline.com/resource/license-agreement) by logging in at <https://developers.eveonline.com> before submitting any pull requests. All bug fixes or features must not include extra superfluous formatting changes.
91
+
@@ -0,0 +1,20 @@
1
+ alumni/__init__.py,sha256=ZJgYGwc1dwuqfSOB6cIFy4HdOI9wOkRyhQHe8lhKsNc,186
2
+ alumni/admin.py,sha256=VUDXqxBX-Dw_3T4QGXDTtz-Ulgc_WkoCW54OXbd3a5o,737
3
+ alumni/app_settings.py,sha256=SoV6HhuvBaHSAgBHD6MxNf74Qjdsi_fmB6aZU__Vwlw,172
4
+ alumni/apps.py,sha256=JNO5V_uldj3Y2OEJL0h4u86LoPZr5UOhzkcTFZ6VeNI,239
5
+ alumni/models.py,sha256=tgcy4FtHFZNyfCl_Rma3igPgxfaY433YG2CObBrsMe8,2206
6
+ alumni/providers.py,sha256=g0i7nqSdnfScx-ZjByFZGoHw-ptNkiey5g_yycobSCQ,999
7
+ alumni/signals.py,sha256=ZiWER0gs-0KCS6nWhCwE1_-iDXr9yrS7NSPBfLBDjak,789
8
+ alumni/tasks.py,sha256=hXd340JHb3HM-ZVdMI4GHJDQ7C6mMrQcwVMYVU9MsR8,8058
9
+ alumni/locale/en/LC_MESSAGES/django.po,sha256=doek11ISIJRXg-vClnCNxdlObAeUweAKs50jR5bAEVE,1249
10
+ alumni/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ alumni/management/commands/alumni_state.py,sha256=OyJKnkzk9eksk-vULSVBdGvMEhxZX_xa7eH5RXFjeJ8,759
12
+ alumni/migrations/0001_initial.py,sha256=C8R2k4y5KvpTLU_etBQ0J3jkGYd3HAgevAekUZvzxDw,3283
13
+ alumni/migrations/0002_auto_20211230_0147.py,sha256=p3sK1Ohdf6O20tDbMmuPJwC2vVFH-AR0kkXFy9H34_Y,626
14
+ alumni/migrations/0003_alter_alumnisetup_options_and_more.py,sha256=JyXQqo9vR-hRx7CHsNpXLxZEjEijSBLW3zX7Zmw3Y50,1012
15
+ alumni/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ alumni/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
+ aa_alumni-0.2.0.dist-info/LICENSE,sha256=6TxpZBZY7OLGLrJXe6vREu--u7CjCfW19u4oXW_uZKs,1069
18
+ aa_alumni-0.2.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
19
+ aa_alumni-0.2.0.dist-info/METADATA,sha256=lcQ9lHHulZDVqOxJwavmCg2OV_Rc02GbB_zs0WCcCWM,3262
20
+ aa_alumni-0.2.0.dist-info/RECORD,,
@@ -1,5 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.40.0)
2
+ Generator: flit 3.9.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
-
alumni/__init__.py CHANGED
@@ -1 +1,5 @@
1
- __version__ = "0.1.4a"
1
+ """
2
+ Integration with Alliance Auths State System, creates and maintains an Alumni State for past members of an Alliance and/or Corporation
3
+ """
4
+ __version__ = "0.2.0"
5
+ __title__ = "Alumni"
alumni/admin.py CHANGED
@@ -8,6 +8,7 @@ from .models import (
8
8
  @admin.register(AlumniSetup)
9
9
  class AlumniSetupAdmin(admin.ModelAdmin):
10
10
  search_fields = ['alumni_corporations', ]
11
+ filter_horizontal = ["alumni_corporations", "alumni_alliances"]
11
12
 
12
13
 
13
14
  @admin.register(CorporationAllianceHistory)
alumni/app_settings.py CHANGED
@@ -2,4 +2,4 @@ from django.conf import settings
2
2
 
3
3
  ALUMNI_STATE_NAME = getattr(settings, 'ALUMNI_STATE_NAME', "Alumni")
4
4
 
5
- ALUMNI_TASK_PRIORITY = getattr(settings, 'ALUMNI_TASK_PRIORITY', "7")
5
+ ALUMNI_TASK_PRIORITY = getattr(settings, 'ALUMNI_TASK_PRIORITY', 7)
alumni/apps.py CHANGED
@@ -1,5 +1,4 @@
1
1
  from django.apps import AppConfig
2
- from django.core.checks import register
3
2
 
4
3
  from . import __version__
5
4
 
@@ -8,8 +7,4 @@ class AlumniConfig(AppConfig):
8
7
  default_auto_field = 'django.db.models.BigAutoField'
9
8
  name = "alumni"
10
9
  label = "alumni"
11
- verbose_name = f"alumni v{__version__}"
12
-
13
- def ready(self):
14
- from alumni.checks import esi_endpoint_offline
15
- register()(esi_endpoint_offline)
10
+ verbose_name = f"AA Alumni v{__version__}"
@@ -0,0 +1,42 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: PACKAGE VERSION\n"
10
+ "Report-Msgid-Bugs-To: \n"
11
+ "POT-Creation-Date: 2024-05-11 18:13+1000\n"
12
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "Language: \n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
+ #: alumni/models.py:14
21
+ msgid ""
22
+ "Characters with these Corps in their History will be given Alumni Status"
23
+ msgstr ""
24
+
25
+ #: alumni/models.py:18
26
+ msgid ""
27
+ "Characters with these Alliances in their History will be given Alumni Status"
28
+ msgstr ""
29
+
30
+ #: alumni/models.py:21 alumni/models.py:24 alumni/models.py:25
31
+ msgid "Alumni Config"
32
+ msgstr ""
33
+
34
+ #: alumni/models.py:37 alumni/models.py:52
35
+ msgid "True if the corporation has been deleted"
36
+ msgstr ""
37
+
38
+ #: alumni/models.py:39 alumni/models.py:54
39
+ msgid ""
40
+ "An incrementing ID that can be used to canonically establish order of "
41
+ "records in cases where dates may be ambiguous"
42
+ msgstr ""
@@ -0,0 +1,27 @@
1
+ # Generated by Django 4.2.10 on 2024-05-11 08:13
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+
8
+ dependencies = [
9
+ ('alumni', '0002_auto_20211230_0147'),
10
+ ]
11
+
12
+ operations = [
13
+ migrations.AlterModelOptions(
14
+ name='alumnisetup',
15
+ options={'verbose_name': 'Alumni Config', 'verbose_name_plural': 'Alumni Config'},
16
+ ),
17
+ migrations.AlterField(
18
+ model_name='charactercorporationhistory',
19
+ name='record_id',
20
+ field=models.PositiveIntegerField(help_text='An incrementing ID that can be used to canonically establish order of records in cases where dates may be ambiguous'),
21
+ ),
22
+ migrations.AlterField(
23
+ model_name='corporationalliancehistory',
24
+ name='record_id',
25
+ field=models.PositiveIntegerField(help_text='An incrementing ID that can be used to canonically establish order of records in cases where dates may be ambiguous'),
26
+ ),
27
+ ]
alumni/models.py CHANGED
@@ -1,31 +1,29 @@
1
- from django.core.exceptions import ValidationError
1
+ from solo.models import SingletonModel
2
+
2
3
  from django.db import models
4
+ from django.utils.translation import gettext as _
3
5
 
4
6
  from allianceauth.eveonline.models import (
5
7
  EveAllianceInfo, EveCharacter, EveCorporationInfo,
6
8
  )
7
9
 
8
10
 
9
- class AlumniSetup(models.Model):
11
+ class AlumniSetup(SingletonModel):
10
12
  alumni_corporations = models.ManyToManyField(
11
13
  EveCorporationInfo,
12
14
  blank=True,
13
- help_text="Characters with these Corps in their History will be given Alumni Status")
15
+ help_text=_("Characters with these Corps in their History will be given Alumni Status"))
14
16
  alumni_alliances = models.ManyToManyField(
15
17
  EveAllianceInfo,
16
18
  blank=True,
17
- help_text="Characters with these Alliances in their History will be given Alumni Status")
19
+ help_text=_("Characters with these Alliances in their History will be given Alumni Status"))
18
20
 
19
- def save(self, *args, **kwargs):
20
- if not self.pk and AlumniSetup.objects.exists():
21
- # Force a single object
22
- raise ValidationError('There is can be only one \
23
- AlumniCorp instance')
24
- self.pk = self.id = 1 # If this happens to be deleted and recreated, force it to be 1
25
- return super().save(*args, **kwargs)
21
+ def __str__(self):
22
+ return _("Alumni Config")
26
23
 
27
24
  class Meta:
28
- verbose_name_plural = "Alumni Config"
25
+ verbose_name = _("Alumni Config")
26
+ verbose_name_plural = _("Alumni Config")
29
27
 
30
28
 
31
29
  class CorporationAllianceHistory(models.Model):
@@ -37,9 +35,9 @@ class CorporationAllianceHistory(models.Model):
37
35
  alliance_id = models.PositiveIntegerField(blank=True, null=True, db_index=True)
38
36
  is_deleted = models.BooleanField(
39
37
  default=False,
40
- help_text='True if the corporation has been deleted')
41
- record_id = models.IntegerField(
42
- help_text='An incrementing ID that can be used to canonically establish order of records in cases where dates may be ambiguous')
38
+ help_text=_("True if the corporation has been deleted"))
39
+ record_id = models.PositiveIntegerField(
40
+ help_text=_("An incrementing ID that can be used to canonically establish order of records in cases where dates may be ambiguous"))
43
41
  start_date = models.DateTimeField()
44
42
 
45
43
 
@@ -48,13 +46,11 @@ class CharacterCorporationHistory(models.Model):
48
46
  constraints = [
49
47
  models.UniqueConstraint(fields=['character', 'record_id'], name="CharacterCorporationRecord"),
50
48
  ]
51
- character = models.ForeignKey(
52
- EveCharacter,
53
- on_delete=models.CASCADE)
49
+ character = models.ForeignKey(EveCharacter, on_delete=models.CASCADE)
54
50
  corporation_id = models.PositiveIntegerField()
55
51
  is_deleted = models.BooleanField(
56
52
  default=False,
57
- help_text='True if the corporation has been deleted')
58
- record_id = models.IntegerField(
59
- help_text='An incrementing ID that can be used to canonically establish order of records in cases where dates may be ambiguous')
53
+ help_text=_("True if the corporation has been deleted"))
54
+ record_id = models.PositiveIntegerField(
55
+ help_text=_("An incrementing ID that can be used to canonically establish order of records in cases where dates may be ambiguous"))
60
56
  start_date = models.DateTimeField()
alumni/providers.py CHANGED
@@ -1,6 +1,14 @@
1
- from esi.clients import esi_client_factory
1
+ from typing import Dict
2
2
 
3
- from . import __version__
3
+ from allianceauth import __version__ as aa__version__
4
+ from allianceauth.services.hooks import get_extension_logger
5
+ from esi.clients import EsiClientProvider
6
+
7
+ from . import __version__ as a__version__
8
+
9
+ logger = get_extension_logger(__name__)
10
+
11
+ APP_INFO_TEXT = f"allianceauth v{aa__version__} & aa-alumni v{a__version__}"
4
12
 
5
13
  """
6
14
  Swagger spec operations:
@@ -8,16 +16,18 @@ get_corporations_corporation_id_alliancehistory
8
16
  get_characters_character_id_corporationhistory
9
17
  """
10
18
 
19
+ esi = EsiClientProvider(app_info_text=APP_INFO_TEXT)
11
20
 
12
- class EsiResponseClient:
13
- def __init__(self, token=None):
14
- self._client = None
15
21
 
16
- @property
17
- def client(self):
18
- if self._client is None:
19
- self._client = esi_client_factory(app_info_text="AA Alumni v" + __version__,)
20
- return self._client
22
+ def get_corporations_corporation_id_alliancehistory(corporation_id: int) -> Dict:
23
+ result = esi.client.Corporation.get_corporations_corporation_id_alliancehistory(
24
+ corporation_id=corporation_id
25
+ ).results()
26
+ return result
21
27
 
22
28
 
23
- esi = EsiResponseClient()
29
+ def get_characters_character_id_corporationhistory(character_id: int) -> Dict:
30
+ result = esi.client.Character.get_characters_character_id_corporationhistory(
31
+ character_id=character_id
32
+ ).results()
33
+ return result
alumni/tasks.py CHANGED
@@ -10,7 +10,10 @@ from .app_settings import ALUMNI_STATE_NAME, ALUMNI_TASK_PRIORITY
10
10
  from .models import (
11
11
  AlumniSetup, CharacterCorporationHistory, CorporationAllianceHistory,
12
12
  )
13
- from .providers import esi
13
+ from .providers import (
14
+ get_characters_character_id_corporationhistory,
15
+ get_corporations_corporation_id_alliancehistory,
16
+ )
14
17
 
15
18
  logger = get_extension_logger(__name__)
16
19
 
@@ -50,7 +53,8 @@ def alumni_check_character(character_id: int) -> bool:
50
53
  alumni_state.member_characters.add(character)
51
54
  return True
52
55
 
53
- char_corp_history = CharacterCorporationHistory.objects.filter(character=character)
56
+ char_corp_history = CharacterCorporationHistory.objects.filter(
57
+ character=character)
54
58
 
55
59
  for char_corp in char_corp_history:
56
60
  # print(alumni_setup.alumni_corporations.values_list('corporation_id', flat=True))
@@ -154,7 +158,8 @@ def update_all_models_followup():
154
158
 
155
159
  for char_corp_record in CharacterCorporationHistory.objects.values('corporation_id').distinct():
156
160
  update_corporationalliancehistory.apply_async(
157
- args=[char_corp_record['corporation_id']], priority=ALUMNI_TASK_PRIORITY
161
+ args=[char_corp_record['corporation_id']],
162
+ priority=ALUMNI_TASK_PRIORITY
158
163
  )
159
164
 
160
165
 
@@ -166,14 +171,7 @@ def update_corporationalliancehistory(corporation_id: int):
166
171
  ----------
167
172
  corporation_id: int """
168
173
 
169
- try:
170
- data = esi.client.Corporation.get_corporations_corporation_id_alliancehistory(
171
- corporation_id=corporation_id).result()
172
- except Exception as e:
173
- logger.error(e)
174
- return
175
-
176
- for dat in data:
174
+ for dat in get_corporations_corporation_id_alliancehistory(corporation_id):
177
175
  try:
178
176
  if dat['is_deleted'] == 'true':
179
177
  deleted = True
@@ -199,20 +197,13 @@ def update_charactercorporationhistory(character_id: int):
199
197
  character_id: int
200
198
  Should match an existing EveCharacter model"""
201
199
 
202
- try:
203
- data = esi.client.Character.get_characters_character_id_corporationhistory(
204
- character_id=character_id).result()
205
- except Exception as e:
206
- logger.error(e)
207
- return
208
-
209
200
  try:
210
201
  character = EveCharacter.objects.get(character_id=character_id)
211
202
  except Exception as e:
212
203
  logger.error(e)
213
204
  return
214
205
 
215
- for dat in data:
206
+ for dat in get_characters_character_id_corporationhistory(character_id):
216
207
  try:
217
208
  if dat['is_deleted'] == 'true':
218
209
  deleted = True
@@ -1,25 +0,0 @@
1
- alumni/__init__.py,sha256=SjNawyfReODX_p9pqO4JrmYJBlIecZXWUXejFcIuTAo,23
2
- alumni/admin.py,sha256=Tzt-wIT9so_HWTWMHEEiYcB0zuZTz8RazSolfdlYumw,669
3
- alumni/app_settings.py,sha256=fmhFSNdpH7ky2TTVI7JjHp_IUFUiD_fz0JmLqriwk5o,174
4
- alumni/apps.py,sha256=EtaFYJcRfLkbtUl_VjkiPPq-Ns9pDFPp5yodiZNB2WY,394
5
- alumni/checks.py,sha256=6eOPzclpVGul2On80oInagWaHSvVhRs4__i7LMy6zf0,363
6
- alumni/models.py,sha256=gFvdrMxJ5JIm7cYm8FCrFqKQ9AMIfH-guu3JixW0yns,2432
7
- alumni/providers.py,sha256=qpUmlDW8IKCJO0RXnJ-qZ1UZbj5cTvqjirAcyQLKfUg,506
8
- alumni/signals.py,sha256=ZiWER0gs-0KCS6nWhCwE1_-iDXr9yrS7NSPBfLBDjak,789
9
- alumni/tasks.py,sha256=r6VSHeFtn023DkZlhQA1bmbrd5clGsiQrmhMIqvAtLk,8240
10
- alumni/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- alumni/management/commands/alumni_state.py,sha256=OyJKnkzk9eksk-vULSVBdGvMEhxZX_xa7eH5RXFjeJ8,759
12
- alumni/migrations/0001_initial.py,sha256=C8R2k4y5KvpTLU_etBQ0J3jkGYd3HAgevAekUZvzxDw,3283
13
- alumni/migrations/0002_auto_20211230_0147.py,sha256=p3sK1Ohdf6O20tDbMmuPJwC2vVFH-AR0kkXFy9H34_Y,626
14
- alumni/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- alumni/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- testauth/__init__.py,sha256=Dy_rC-Y3pLicUCmjF3XJ6EvGmK0cH03KZRHmKYiRbqk,46
17
- testauth/celery.py,sha256=cFOpfaLxQzrnxUiPMhGp6iiVp57Mg8Z4qCbiA9oI6iY,612
18
- testauth/settingsAA3.py,sha256=G3sI5Sss3NfJe8mLIfXgqEI5eDfxBKGMGvDWUFaY26k,10988
19
- testauth/urls.py,sha256=20dkGVhioIL1PThFyk_a0ETcMVzNI2OfUGg3nvKE9EU,167
20
- testauth/wsgi.py,sha256=SpDyhXudlWKD64pUxlf4j3lSiJD9ZRbbIx9tPekVziI,397
21
- aa_alumni-0.1.4a0.dist-info/LICENSE,sha256=v_N-M2kGobYDwkxwc51OaXqrMaybHRz_UZigPPwMWlw,1069
22
- aa_alumni-0.1.4a0.dist-info/METADATA,sha256=qRGjEAvQOwc7jHHUluEwf1ln4DKiGq8T6vx2mgu_CAE,2943
23
- aa_alumni-0.1.4a0.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
24
- aa_alumni-0.1.4a0.dist-info/top_level.txt,sha256=T0Ozron6S-V_rgm5e3io0O1JFji3PtOtkWfeENAPKzs,16
25
- aa_alumni-0.1.4a0.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- alumni
2
- testauth
alumni/checks.py DELETED
@@ -1,9 +0,0 @@
1
- from django.core.checks import Info
2
-
3
-
4
- def esi_endpoint_offline(*args, **kwargs):
5
- errors = []
6
- errors.append(Info(
7
- 'Corp History Endpoint Offline',
8
- hint='Alumni will be unable to update Character Corporation Histories until CCP restore this endpoint https://github.com/esi/esi-issues/blob/master/changelog.md#2023-01-09'))
9
- return errors
testauth/__init__.py DELETED
@@ -1 +0,0 @@
1
- from .celery import app as celery_app # noqa
testauth/celery.py DELETED
@@ -1,18 +0,0 @@
1
- import os
2
-
3
- from celery import Celery
4
-
5
- # set the default Django settings module for the 'celery' program.
6
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testauth.settings.local")
7
-
8
- from django.conf import settings # noqa
9
-
10
- app = Celery("testauth")
11
-
12
- # Using a string here means the worker don't have to serialize
13
- # the configuration object to child processes.
14
- app.config_from_object("django.conf:settings")
15
- app.conf.ONCE = {"backend": "allianceauth.services.tasks.DjangoBackend", "settings": {}}
16
-
17
- # Load task modules from all registered Django app configs.
18
- app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
testauth/settingsAA3.py DELETED
@@ -1,340 +0,0 @@
1
- """
2
- DO NOT EDIT THIS FILE
3
-
4
- This settings file contains everything needed for Alliance Auth projects to function.
5
- It gets overwritten by the 'allianceauth update' command.
6
- If you wish to make changes, overload the setting in your project's settings file (local.py).
7
- """
8
-
9
- import os
10
-
11
- from celery.schedules import crontab
12
-
13
- from django.contrib import messages
14
-
15
- INSTALLED_APPS = [
16
- 'allianceauth', # needs to be on top of this list to support favicons in Django admin (see https://gitlab.com/allianceauth/allianceauth/-/issues/1301)
17
- 'django.contrib.admin',
18
- 'django.contrib.auth',
19
- 'django.contrib.contenttypes',
20
- 'django.contrib.sessions',
21
- 'django.contrib.messages',
22
- 'django.contrib.staticfiles',
23
- 'django.contrib.humanize',
24
- 'django_celery_beat',
25
- 'bootstrapform',
26
- 'sortedm2m',
27
- 'esi',
28
- 'allianceauth.authentication',
29
- 'allianceauth.services',
30
- 'allianceauth.eveonline',
31
- 'allianceauth.groupmanagement',
32
- 'allianceauth.notifications',
33
- 'allianceauth.thirdparty.navhelper',
34
- 'allianceauth.analytics',
35
- ]
36
-
37
- SECRET_KEY = "wow I'm a really bad default secret key"
38
-
39
- # Celery configuration
40
- BROKER_URL = 'redis://localhost:6379/0'
41
- CELERYBEAT_SCHEDULER = "django_celery_beat.schedulers.DatabaseScheduler"
42
- CELERYBEAT_SCHEDULE = {
43
- 'esi_cleanup_callbackredirect': {
44
- 'task': 'esi.tasks.cleanup_callbackredirect',
45
- 'schedule': crontab(minute=0, hour='*/4'),
46
- },
47
- 'esi_cleanup_token': {
48
- 'task': 'esi.tasks.cleanup_token',
49
- 'schedule': crontab(minute=0, hour=0),
50
- },
51
- 'run_model_update': {
52
- 'task': 'allianceauth.eveonline.tasks.run_model_update',
53
- 'schedule': crontab(minute=0, hour="*/6"),
54
- },
55
- 'check_all_character_ownership': {
56
- 'task': 'allianceauth.authentication.tasks.check_all_character_ownership',
57
- 'schedule': crontab(minute=0, hour='*/4'),
58
- },
59
- 'analytics_daily_stats': {
60
- 'task': 'allianceauth.analytics.tasks.analytics_daily_stats',
61
- 'schedule': crontab(minute=0, hour=2),
62
- }
63
- }
64
-
65
- # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
66
- PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
67
- BASE_DIR = os.path.dirname(PROJECT_DIR)
68
-
69
- MIDDLEWARE = [
70
- 'django.middleware.security.SecurityMiddleware',
71
- 'django.contrib.sessions.middleware.SessionMiddleware',
72
- 'django.middleware.locale.LocaleMiddleware',
73
- 'django.middleware.common.CommonMiddleware',
74
- 'django.middleware.csrf.CsrfViewMiddleware',
75
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
76
- 'django.contrib.messages.middleware.MessageMiddleware',
77
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
78
- 'allianceauth.analytics.middleware.AnalyticsMiddleware',
79
- ]
80
-
81
- ROOT_URLCONF = 'allianceauth.urls'
82
-
83
- LOCALE_PATHS = (
84
- os.path.join(BASE_DIR, 'locale/'),
85
- )
86
-
87
- LANGUAGES = (
88
- ("en", "English"),
89
- ("de", "German"),
90
- ("es", "Spanish"),
91
- ("zh-hans", "Chinese Simplified"),
92
- ("ru", "Russian"),
93
- ("ko", "Korean"),
94
- ("fr", "French"),
95
- ("ja", "Japanese"),
96
- ("it", "Italian"),
97
- )
98
-
99
- TEMPLATES = [
100
- {
101
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
102
- 'DIRS': [os.path.join(PROJECT_DIR, 'templates')],
103
- 'APP_DIRS': True,
104
- 'OPTIONS': {
105
- 'context_processors': [
106
- 'django.template.context_processors.debug',
107
- 'django.template.context_processors.request',
108
- 'django.contrib.auth.context_processors.auth',
109
- 'django.contrib.messages.context_processors.messages',
110
- 'django.template.context_processors.i18n',
111
- 'django.template.context_processors.media',
112
- 'django.template.context_processors.static',
113
- 'django.template.context_processors.tz',
114
- 'allianceauth.context_processors.auth_settings',
115
- ],
116
- },
117
- },
118
- ]
119
-
120
- WSGI_APPLICATION = 'allianceauth.wsgi.application'
121
-
122
- # Password validation
123
- # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
124
-
125
- AUTH_PASSWORD_VALIDATORS = [
126
- {
127
- 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
128
- },
129
- {
130
- 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
131
- },
132
- {
133
- 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
134
- },
135
- {
136
- 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
137
- },
138
- ]
139
-
140
- AUTHENTICATION_BACKENDS = [
141
- 'allianceauth.authentication.backends.StateBackend',
142
- 'django.contrib.auth.backends.ModelBackend'
143
- ]
144
-
145
- # Internationalization
146
- # https://docs.djangoproject.com/en/1.10/topics/i18n/
147
-
148
- LANGUAGE_CODE = 'en-us'
149
-
150
- LANGUAGE_COOKIE_AGE = 1209600
151
-
152
- TIME_ZONE = 'UTC'
153
-
154
- USE_I18N = True
155
-
156
- USE_L10N = True
157
-
158
- USE_TZ = True
159
-
160
- # Static files (CSS, JavaScript, Images)
161
- # https://docs.djangoproject.com/en/1.10/howto/static-files/
162
- STATIC_URL = '/static/'
163
- STATICFILES_DIRS = [
164
- os.path.join(PROJECT_DIR, 'static'),
165
- ]
166
- STATIC_ROOT = os.path.join(BASE_DIR, 'static')
167
-
168
- # Bootstrap messaging css workaround
169
- MESSAGE_TAGS = {
170
- messages.ERROR: 'danger error'
171
- }
172
-
173
- CACHES = {
174
- "default": {
175
- "BACKEND": "django_redis.cache.RedisCache",
176
- "LOCATION": "redis://127.0.0.1:6379/1" # change the 1 here to change the database used
177
- }
178
- }
179
-
180
-
181
- SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
182
-
183
- DEBUG = True
184
- ALLOWED_HOSTS = ['*']
185
- DATABASES = {
186
- 'default': {
187
- 'ENGINE': 'django.db.backends.sqlite3',
188
- 'NAME': str(os.path.join(BASE_DIR, 'alliance_auth.sqlite3')),
189
- },
190
- }
191
-
192
- SITE_NAME = 'Alliance Auth'
193
-
194
- LOGIN_URL = 'auth_login_user' # view that handles login logic
195
-
196
- LOGIN_REDIRECT_URL = 'authentication:dashboard' # default destination when logging in if no redirect specified
197
- LOGOUT_REDIRECT_URL = 'authentication:dashboard' # destination after logging out
198
- # Both of these redirects accept values as per the django redirect shortcut
199
- # https://docs.djangoproject.com/en/1.11/topics/http/shortcuts/#redirect
200
- # - url names eg 'authentication:dashboard'
201
- # - relative urls eg '/dashboard'
202
- # - absolute urls eg 'http://example.com/dashboard'
203
-
204
- # scopes required on new tokens when logging in. Cannot be blank.
205
- LOGIN_TOKEN_SCOPES = ['publicData']
206
-
207
- # number of days email verification links are valid for
208
- ACCOUNT_ACTIVATION_DAYS = 1
209
-
210
- ESI_API_URL = 'https://esi.evetech.net/'
211
-
212
- LOGGING = {
213
- 'version': 1,
214
- 'disable_existing_loggers': False,
215
- 'formatters': {
216
- 'verbose': {
217
- 'format': "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s",
218
- 'datefmt': "%d/%b/%Y %H:%M:%S"
219
- },
220
- 'simple': {
221
- 'format': '%(levelname)s %(message)s'
222
- },
223
- },
224
- 'handlers': {
225
- 'log_file': {
226
- 'level': 'INFO', # edit this line to change logging level to file
227
- 'class': 'logging.handlers.RotatingFileHandler',
228
- 'filename': os.path.join(BASE_DIR, 'allianceauth.log'),
229
- 'formatter': 'verbose',
230
- 'maxBytes': 1024 * 1024 * 5, # edit this line to change max log file size
231
- 'backupCount': 5, # edit this line to change number of log backups
232
- },
233
- 'extension_file': {
234
- 'level': 'INFO',
235
- 'class': 'logging.handlers.RotatingFileHandler',
236
- 'filename': os.path.join(BASE_DIR, 'extensions.log'),
237
- 'formatter': 'verbose',
238
- 'maxBytes': 1024 * 1024 * 5, # edit this line to change max log file size
239
- 'backupCount': 5, # edit this line to change number of log backups
240
- },
241
- 'console': {
242
- 'level': 'DEBUG', # edit this line to change logging level to console
243
- 'class': 'logging.StreamHandler',
244
- 'formatter': 'verbose',
245
- },
246
- 'notifications': { # creates notifications for users with logging_notifications permission
247
- 'level': 'ERROR', # edit this line to change logging level to notifications
248
- 'class': 'allianceauth.notifications.handlers.NotificationHandler',
249
- 'formatter': 'verbose',
250
- },
251
- },
252
- 'loggers': {
253
- 'allianceauth': {
254
- 'handlers': ['log_file', 'console', 'notifications'],
255
- 'level': 'DEBUG',
256
- },
257
- 'extensions': {
258
- 'handlers': ['extension_file', 'console'],
259
- 'level': 'DEBUG',
260
- },
261
- 'django': {
262
- 'handlers': ['log_file', 'console'],
263
- 'level': 'ERROR',
264
- },
265
- 'esi': {
266
- 'handlers': ['log_file', 'console'],
267
- 'level': 'DEBUG',
268
- },
269
- }
270
- }
271
-
272
- DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
273
-
274
- ########################################################
275
- # local.py settings
276
-
277
- # Every setting in base.py can be overloaded by redefining it here.
278
- # from .base import *
279
-
280
- # These are required for Django to function properly. Don't touch.
281
- ROOT_URLCONF = "testauth.urls"
282
- WSGI_APPLICATION = "testauth.wsgi.application"
283
- SECRET_KEY = "t$@h+j#yqhmuy$x7$fkhytd&drajgfsb-6+j9pqn*vj0)gq&-2"
284
-
285
- # This is where css/images will be placed for your webserver to read
286
- STATIC_ROOT = "/var/www/testauth/static/"
287
-
288
- # Change this to change the name of the auth site displayed
289
- # in page titles and the site header.
290
- SITE_NAME = "testauth"
291
-
292
- # Change this to enable/disable debug mode, which displays
293
- # useful error messages but can leak sensitive data.
294
- DEBUG = False
295
-
296
- # Add any additional apps to this list.
297
- INSTALLED_APPS += [
298
- "alumni",
299
- ]
300
-
301
- # Enter credentials to use MySQL/MariaDB. Comment out to use sqlite3
302
- """
303
- DATABASES['default'] = {
304
- 'ENGINE': 'django.db.backends.mysql',
305
- 'NAME': 'alliance_auth',
306
- 'USER': '',
307
- 'PASSWORD': '',
308
- 'HOST': '127.0.0.1',
309
- 'PORT': '3306',
310
- 'OPTIONS': {'charset': 'utf8mb4'},
311
- }
312
- """
313
-
314
- # Register an application at https://developers.eveonline.com for Authentication
315
- # & API Access and fill out these settings. Be sure to set the callback URL
316
- # to https://example.com/sso/callback substituting your domain for example.com
317
- # Logging in to auth requires the publicData scope (can be overridden through the
318
- # LOGIN_TOKEN_SCOPES setting). Other apps may require more (see their docs).
319
- ESI_SSO_CLIENT_ID = "dummy"
320
- ESI_SSO_CLIENT_SECRET = "dummy"
321
- ESI_SSO_CALLBACK_URL = "http://localhost:8000"
322
-
323
- # By default emails are validated before new users can log in.
324
- # It's recommended to use a free service like SparkPost or Elastic Email to send email.
325
- # https://www.sparkpost.com/docs/integrations/django/
326
- # https://elasticemail.com/resources/settings/smtp-api/
327
- # Set the default from email to something like 'noreply@example.com'
328
- # Email validation can be turned off by uncommenting the line below. This
329
- # can break some services.
330
- REGISTRATION_VERIFY_EMAIL = False
331
- EMAIL_HOST = ""
332
- EMAIL_PORT = 587
333
- EMAIL_HOST_USER = ""
334
- EMAIL_HOST_PASSWORD = ""
335
- EMAIL_USE_TLS = True
336
- DEFAULT_FROM_EMAIL = ""
337
-
338
- #######################################
339
- # Add any custom settings below here. #
340
- #######################################
testauth/urls.py DELETED
@@ -1,10 +0,0 @@
1
- # Django
2
- from django.urls import include, path
3
-
4
- # Alliance Auth
5
- from allianceauth import urls
6
-
7
- urlpatterns = [
8
- # Alliance Auth URLs
9
- path("", include(urls)),
10
- ]
testauth/wsgi.py DELETED
@@ -1,14 +0,0 @@
1
- """
2
- WSGI config for testauth project.
3
- It exposes the WSGI callable as a module-level variable named ``application``.
4
- For more information on this file, see
5
- https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
6
- """
7
-
8
- import os
9
-
10
- from django.core.wsgi import get_wsgi_application
11
-
12
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testauth.settings.local")
13
-
14
- application = get_wsgi_application()