aa-alumni 0.1.4a0__tar.gz → 0.2.0__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.

Potentially problematic release.


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

Files changed (38) hide show
  1. {aa_alumni-0.1.4a0 → aa_alumni-0.2.0}/LICENSE +1 -1
  2. {aa_alumni-0.1.4a0 → aa_alumni-0.2.0}/PKG-INFO +24 -11
  3. {aa_alumni-0.1.4a0 → aa_alumni-0.2.0}/README.md +10 -3
  4. aa_alumni-0.2.0/alumni/__init__.py +5 -0
  5. {aa_alumni-0.1.4a0 → aa_alumni-0.2.0}/alumni/admin.py +1 -0
  6. {aa_alumni-0.1.4a0 → aa_alumni-0.2.0}/alumni/app_settings.py +1 -1
  7. aa_alumni-0.2.0/alumni/apps.py +10 -0
  8. aa_alumni-0.2.0/alumni/locale/en/LC_MESSAGES/django.po +42 -0
  9. aa_alumni-0.2.0/alumni/migrations/0003_alter_alumnisetup_options_and_more.py +27 -0
  10. aa_alumni-0.2.0/alumni/models.py +56 -0
  11. aa_alumni-0.2.0/alumni/providers.py +33 -0
  12. {aa_alumni-0.1.4a0 → aa_alumni-0.2.0}/alumni/tasks.py +10 -19
  13. aa_alumni-0.2.0/pyproject.toml +75 -0
  14. aa_alumni-0.1.4a0/MANIFEST.in +0 -11
  15. aa_alumni-0.1.4a0/aa_alumni.egg-info/PKG-INFO +0 -78
  16. aa_alumni-0.1.4a0/aa_alumni.egg-info/SOURCES.txt +0 -30
  17. aa_alumni-0.1.4a0/aa_alumni.egg-info/dependency_links.txt +0 -1
  18. aa_alumni-0.1.4a0/aa_alumni.egg-info/requires.txt +0 -1
  19. aa_alumni-0.1.4a0/aa_alumni.egg-info/top_level.txt +0 -2
  20. aa_alumni-0.1.4a0/alumni/__init__.py +0 -1
  21. aa_alumni-0.1.4a0/alumni/apps.py +0 -15
  22. aa_alumni-0.1.4a0/alumni/checks.py +0 -9
  23. aa_alumni-0.1.4a0/alumni/models.py +0 -60
  24. aa_alumni-0.1.4a0/alumni/providers.py +0 -23
  25. aa_alumni-0.1.4a0/pyproject.toml +0 -6
  26. aa_alumni-0.1.4a0/setup.cfg +0 -45
  27. aa_alumni-0.1.4a0/testauth/__init__.py +0 -1
  28. aa_alumni-0.1.4a0/testauth/celery.py +0 -18
  29. aa_alumni-0.1.4a0/testauth/settingsAA3.py +0 -340
  30. aa_alumni-0.1.4a0/testauth/urls.py +0 -10
  31. aa_alumni-0.1.4a0/testauth/wsgi.py +0 -14
  32. {aa_alumni-0.1.4a0 → aa_alumni-0.2.0}/alumni/management/commands/__init__.py +0 -0
  33. {aa_alumni-0.1.4a0 → aa_alumni-0.2.0}/alumni/management/commands/alumni_state.py +0 -0
  34. {aa_alumni-0.1.4a0 → aa_alumni-0.2.0}/alumni/migrations/0001_initial.py +0 -0
  35. {aa_alumni-0.1.4a0 → aa_alumni-0.2.0}/alumni/migrations/0002_auto_20211230_0147.py +0 -0
  36. {aa_alumni-0.1.4a0 → aa_alumni-0.2.0}/alumni/migrations/__init__.py +0 -0
  37. {aa_alumni-0.1.4a0 → aa_alumni-0.2.0}/alumni/signals.py +0 -0
  38. {aa_alumni-0.1.4a0 → aa_alumni-0.2.0}/alumni/tests/__init__.py +0 -0
@@ -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
2
  Name: aa_alumni
3
- Version: 0.1.4a0
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,12 +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,<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
27
32
 
28
33
  # Alliance Auth - Alumni
29
34
 
@@ -34,13 +39,17 @@ License-File: LICENSE
34
39
  ## Installation
35
40
 
36
41
  ### Step 1 - Prepare Auth
42
+
37
43
  Remove/Promote any state with a priority of `1`, Alumni is considered slightly better than the built in Guest State.
44
+
38
45
  ### Step 2 - Install from pip
39
- ```bash
46
+
47
+ ```shell
40
48
  pip install aa-alumni
41
49
  ```
42
50
 
43
51
  ### Step 3 - Configure Auth settings
52
+
44
53
  Configure your Auth settings (`local.py`) as follows:
45
54
 
46
55
  - Add `'alumni'` to `INSTALLED_APPS`
@@ -48,7 +57,7 @@ Configure your Auth settings (`local.py`) as follows:
48
57
 
49
58
  ```python
50
59
  ## Settings for AA-Alumni
51
- # Market Orders
60
+ # Tasks
52
61
  CELERYBEAT_SCHEDULE['alumni_run_alumni_check_all'] = {
53
62
  'task': 'alumni.tasks.run_alumni_check_all',
54
63
  'schedule': crontab(minute=0, hour=0, day_of_week=4),
@@ -61,18 +70,22 @@ CELERYBEAT_SCHEDULE['alumni_run_update_all_models'] = {
61
70
 
62
71
  ### Step 4 - Update AA's State system
63
72
 
64
- ```bash
73
+ ```shell
65
74
  python myauth/manage.py alumni_state
66
75
  ```
67
76
 
68
77
  ### Step 5 - Maintain Alliance Auth
78
+
69
79
  - Run migrations `python manage.py migrate`
70
80
  - Gather your staticfiles `python manage.py collectstatic`
71
81
  - Restart your project `supervisorctl restart myauth:`
72
82
 
73
83
  ### Step 6 - Configure Further
84
+
74
85
  In the Admin interface, visit `alumni > config > add` or `<AUTH-URL>/admin/alumni/config/add/`
75
86
  Select the Alliances and/or Corporations for which characters with historical membership are Alumni
76
87
 
77
88
  ## Contributing
89
+
78
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
+
@@ -7,13 +7,17 @@
7
7
  ## Installation
8
8
 
9
9
  ### Step 1 - Prepare Auth
10
+
10
11
  Remove/Promote any state with a priority of `1`, Alumni is considered slightly better than the built in Guest State.
12
+
11
13
  ### Step 2 - Install from pip
12
- ```bash
14
+
15
+ ```shell
13
16
  pip install aa-alumni
14
17
  ```
15
18
 
16
19
  ### Step 3 - Configure Auth settings
20
+
17
21
  Configure your Auth settings (`local.py`) as follows:
18
22
 
19
23
  - Add `'alumni'` to `INSTALLED_APPS`
@@ -21,7 +25,7 @@ Configure your Auth settings (`local.py`) as follows:
21
25
 
22
26
  ```python
23
27
  ## Settings for AA-Alumni
24
- # Market Orders
28
+ # Tasks
25
29
  CELERYBEAT_SCHEDULE['alumni_run_alumni_check_all'] = {
26
30
  'task': 'alumni.tasks.run_alumni_check_all',
27
31
  'schedule': crontab(minute=0, hour=0, day_of_week=4),
@@ -34,18 +38,21 @@ CELERYBEAT_SCHEDULE['alumni_run_update_all_models'] = {
34
38
 
35
39
  ### Step 4 - Update AA's State system
36
40
 
37
- ```bash
41
+ ```shell
38
42
  python myauth/manage.py alumni_state
39
43
  ```
40
44
 
41
45
  ### Step 5 - Maintain Alliance Auth
46
+
42
47
  - Run migrations `python manage.py migrate`
43
48
  - Gather your staticfiles `python manage.py collectstatic`
44
49
  - Restart your project `supervisorctl restart myauth:`
45
50
 
46
51
  ### Step 6 - Configure Further
52
+
47
53
  In the Admin interface, visit `alumni > config > add` or `<AUTH-URL>/admin/alumni/config/add/`
48
54
  Select the Alliances and/or Corporations for which characters with historical membership are Alumni
49
55
 
50
56
  ## Contributing
57
+
51
58
  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.
@@ -0,0 +1,5 @@
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"
@@ -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)
@@ -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)
@@ -0,0 +1,10 @@
1
+ from django.apps import AppConfig
2
+
3
+ from . import __version__
4
+
5
+
6
+ class AlumniConfig(AppConfig):
7
+ default_auto_field = 'django.db.models.BigAutoField'
8
+ name = "alumni"
9
+ label = "alumni"
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
+ ]
@@ -0,0 +1,56 @@
1
+ from solo.models import SingletonModel
2
+
3
+ from django.db import models
4
+ from django.utils.translation import gettext as _
5
+
6
+ from allianceauth.eveonline.models import (
7
+ EveAllianceInfo, EveCharacter, EveCorporationInfo,
8
+ )
9
+
10
+
11
+ class AlumniSetup(SingletonModel):
12
+ alumni_corporations = models.ManyToManyField(
13
+ EveCorporationInfo,
14
+ blank=True,
15
+ help_text=_("Characters with these Corps in their History will be given Alumni Status"))
16
+ alumni_alliances = models.ManyToManyField(
17
+ EveAllianceInfo,
18
+ blank=True,
19
+ help_text=_("Characters with these Alliances in their History will be given Alumni Status"))
20
+
21
+ def __str__(self):
22
+ return _("Alumni Config")
23
+
24
+ class Meta:
25
+ verbose_name = _("Alumni Config")
26
+ verbose_name_plural = _("Alumni Config")
27
+
28
+
29
+ class CorporationAllianceHistory(models.Model):
30
+ class Meta:
31
+ constraints = [
32
+ models.UniqueConstraint(fields=['corporation_id', 'record_id'], name="CorporationAllianceRecord"),
33
+ ]
34
+ corporation_id = models.PositiveIntegerField(db_index=True)
35
+ alliance_id = models.PositiveIntegerField(blank=True, null=True, db_index=True)
36
+ is_deleted = models.BooleanField(
37
+ default=False,
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"))
41
+ start_date = models.DateTimeField()
42
+
43
+
44
+ class CharacterCorporationHistory(models.Model):
45
+ class Meta:
46
+ constraints = [
47
+ models.UniqueConstraint(fields=['character', 'record_id'], name="CharacterCorporationRecord"),
48
+ ]
49
+ character = models.ForeignKey(EveCharacter, on_delete=models.CASCADE)
50
+ corporation_id = models.PositiveIntegerField()
51
+ is_deleted = models.BooleanField(
52
+ default=False,
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"))
56
+ start_date = models.DateTimeField()
@@ -0,0 +1,33 @@
1
+ from typing import Dict
2
+
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__}"
12
+
13
+ """
14
+ Swagger spec operations:
15
+ get_corporations_corporation_id_alliancehistory
16
+ get_characters_character_id_corporationhistory
17
+ """
18
+
19
+ esi = EsiClientProvider(app_info_text=APP_INFO_TEXT)
20
+
21
+
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
27
+
28
+
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
@@ -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
@@ -0,0 +1,75 @@
1
+ [build-system]
2
+ requires = ["flit_core >=3.2,<4"]
3
+ build-backend = "flit_core.buildapi"
4
+
5
+ [project]
6
+ name = "aa_alumni"
7
+ dynamic = ["version", "description" ]
8
+ readme = "README.md"
9
+ license = {file = "LICENSE"}
10
+ requires-python = ">=3.8"
11
+ authors = [
12
+ { name = "Joel Falknau", email = "joel.falknau@gmail.com" },
13
+ ]
14
+ keywords = [
15
+ "allianceauth",
16
+ "eveonline",
17
+ ]
18
+ classifiers = [
19
+ "Environment :: Web Environment",
20
+ "Framework :: Celery",
21
+ "Framework :: Django",
22
+ "Framework :: Django :: 4.0",
23
+ "Framework :: Django :: 4.2",
24
+ "Intended Audience :: Developers",
25
+ "License :: OSI Approved :: MIT License",
26
+ "Operating System :: OS Independent",
27
+ "Programming Language :: Python",
28
+ "Programming Language :: Python :: 3",
29
+ "Programming Language :: Python :: 3.8",
30
+ "Programming Language :: Python :: 3.9",
31
+ "Programming Language :: Python :: 3.10",
32
+ "Programming Language :: Python :: 3.11",
33
+ "Programming Language :: Python :: 3.12",
34
+ "Programming Language :: Python :: Implementation :: CPython",
35
+ "Topic :: Internet :: WWW/HTTP",
36
+ "Topic :: Internet :: WWW/HTTP :: Dynamic Content"
37
+ ]
38
+ dependencies = [
39
+ "allianceauth>=3.0.0,<5.0.0",
40
+ "django-solo>=2.0.0,<3.0.0"
41
+ ]
42
+
43
+ [project.urls]
44
+ Homepage = "https://gitlab.com/tactical-supremacy/aa-alumni"
45
+ Source = "https://gitlab.com/tactical-supremacy/aa-alumni"
46
+ Tracker = "https://gitlab.com/tactical-supremacy/aa-alumni/-/issues"
47
+
48
+ [tool.flit.module]
49
+ name = "alumni"
50
+
51
+ [tool.isort]
52
+ profile = "django"
53
+ sections = [
54
+ "FUTURE",
55
+ "STDLIB",
56
+ "THIRDPARTY",
57
+ "DJANGO",
58
+ "ALLIANCEAUTH",
59
+ "FIRSTPARTY",
60
+ "LOCALFOLDER"
61
+ ]
62
+ known_allianceauth = ["allianceauth", "esi"]
63
+ known_django = ["django"]
64
+ skip_gitignore = true
65
+
66
+ [tool.flake8]
67
+ exclude = [".git", "*migrations*", ".tox", "dist", "htmlcov"]
68
+ max-line-length = 119
69
+ select = ["C", "E", "F", "W", "B", "B950"]
70
+ ignore = ['E203', 'E231', 'E501', 'W503', 'W291', 'W293']
71
+
72
+ [tool.djlint]
73
+ max_attribute_length=119
74
+ max_line_length=119
75
+ max_blank_lines=1
@@ -1,11 +0,0 @@
1
- include LICENSE
2
- include README.md
3
- include MANIFEST.in
4
- graft alumni
5
-
6
- recursive-include alumni *.py
7
- recursive-include alumni/static *
8
- recursive-include alumni/templates *
9
-
10
- global-exclude __pycache__
11
- global-exclude *.py[co]
@@ -1,78 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: aa-alumni
3
- Version: 0.1.4a0
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
9
- Classifier: Environment :: Web Environment
10
- Classifier: Framework :: Django
11
- Classifier: Framework :: Django :: 4.0
12
- Classifier: Intended Audience :: Developers
13
- Classifier: License :: OSI Approved :: MIT License
14
- Classifier: Operating System :: OS Independent
15
- Classifier: Programming Language :: Python
16
- Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.8
18
- Classifier: Programming Language :: Python :: 3.9
19
- Classifier: Programming Language :: Python :: 3.10
20
- Classifier: Programming Language :: Python :: 3.11
21
- Classifier: Programming Language :: Python :: Implementation :: CPython
22
- Classifier: Topic :: Internet :: WWW/HTTP
23
- Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
24
- Requires-Python: ~=3.8
25
- Description-Content-Type: text/markdown
26
- License-File: LICENSE
27
-
28
- # Alliance Auth - Alumni
29
-
30
- ## Features
31
-
32
- - Integration with Alliance Auth's State System, creates and maintains an Alumni State for past members of an Alliance and/or Corporation.
33
-
34
- ## Installation
35
-
36
- ### Step 1 - Prepare Auth
37
- Remove/Promote any state with a priority of `1`, Alumni is considered slightly better than the built in Guest State.
38
- ### Step 2 - Install from pip
39
- ```bash
40
- pip install aa-alumni
41
- ```
42
-
43
- ### Step 3 - Configure Auth settings
44
- Configure your Auth settings (`local.py`) as follows:
45
-
46
- - Add `'alumni'` to `INSTALLED_APPS`
47
- - Add below lines to your settings file:
48
-
49
- ```python
50
- ## Settings for AA-Alumni
51
- # Market Orders
52
- CELERYBEAT_SCHEDULE['alumni_run_alumni_check_all'] = {
53
- 'task': 'alumni.tasks.run_alumni_check_all',
54
- 'schedule': crontab(minute=0, hour=0, day_of_week=4),
55
- }
56
- CELERYBEAT_SCHEDULE['alumni_run_update_all_models'] = {
57
- 'task': 'alumni.tasks.update_all_models',
58
- 'schedule': crontab(minute=0, hour=0, day_of_week=3),
59
- }
60
- ```
61
-
62
- ### Step 4 - Update AA's State system
63
-
64
- ```bash
65
- python myauth/manage.py alumni_state
66
- ```
67
-
68
- ### Step 5 - Maintain Alliance Auth
69
- - Run migrations `python manage.py migrate`
70
- - Gather your staticfiles `python manage.py collectstatic`
71
- - Restart your project `supervisorctl restart myauth:`
72
-
73
- ### Step 6 - Configure Further
74
- In the Admin interface, visit `alumni > config > add` or `<AUTH-URL>/admin/alumni/config/add/`
75
- Select the Alliances and/or Corporations for which characters with historical membership are Alumni
76
-
77
- ## Contributing
78
- 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.
@@ -1,30 +0,0 @@
1
- LICENSE
2
- MANIFEST.in
3
- README.md
4
- pyproject.toml
5
- setup.cfg
6
- aa_alumni.egg-info/PKG-INFO
7
- aa_alumni.egg-info/SOURCES.txt
8
- aa_alumni.egg-info/dependency_links.txt
9
- aa_alumni.egg-info/requires.txt
10
- aa_alumni.egg-info/top_level.txt
11
- alumni/__init__.py
12
- alumni/admin.py
13
- alumni/app_settings.py
14
- alumni/apps.py
15
- alumni/checks.py
16
- alumni/models.py
17
- alumni/providers.py
18
- alumni/signals.py
19
- alumni/tasks.py
20
- alumni/management/commands/__init__.py
21
- alumni/management/commands/alumni_state.py
22
- alumni/migrations/0001_initial.py
23
- alumni/migrations/0002_auto_20211230_0147.py
24
- alumni/migrations/__init__.py
25
- alumni/tests/__init__.py
26
- testauth/__init__.py
27
- testauth/celery.py
28
- testauth/settingsAA3.py
29
- testauth/urls.py
30
- testauth/wsgi.py
@@ -1 +0,0 @@
1
- allianceauth>=3.0.0
@@ -1,2 +0,0 @@
1
- alumni
2
- testauth
@@ -1 +0,0 @@
1
- __version__ = "0.1.4a"
@@ -1,15 +0,0 @@
1
- from django.apps import AppConfig
2
- from django.core.checks import register
3
-
4
- from . import __version__
5
-
6
-
7
- class AlumniConfig(AppConfig):
8
- default_auto_field = 'django.db.models.BigAutoField'
9
- name = "alumni"
10
- 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)
@@ -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
@@ -1,60 +0,0 @@
1
- from django.core.exceptions import ValidationError
2
- from django.db import models
3
-
4
- from allianceauth.eveonline.models import (
5
- EveAllianceInfo, EveCharacter, EveCorporationInfo,
6
- )
7
-
8
-
9
- class AlumniSetup(models.Model):
10
- alumni_corporations = models.ManyToManyField(
11
- EveCorporationInfo,
12
- blank=True,
13
- help_text="Characters with these Corps in their History will be given Alumni Status")
14
- alumni_alliances = models.ManyToManyField(
15
- EveAllianceInfo,
16
- blank=True,
17
- help_text="Characters with these Alliances in their History will be given Alumni Status")
18
-
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)
26
-
27
- class Meta:
28
- verbose_name_plural = "Alumni Config"
29
-
30
-
31
- class CorporationAllianceHistory(models.Model):
32
- class Meta:
33
- constraints = [
34
- models.UniqueConstraint(fields=['corporation_id', 'record_id'], name="CorporationAllianceRecord"),
35
- ]
36
- corporation_id = models.PositiveIntegerField(db_index=True)
37
- alliance_id = models.PositiveIntegerField(blank=True, null=True, db_index=True)
38
- is_deleted = models.BooleanField(
39
- 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')
43
- start_date = models.DateTimeField()
44
-
45
-
46
- class CharacterCorporationHistory(models.Model):
47
- class Meta:
48
- constraints = [
49
- models.UniqueConstraint(fields=['character', 'record_id'], name="CharacterCorporationRecord"),
50
- ]
51
- character = models.ForeignKey(
52
- EveCharacter,
53
- on_delete=models.CASCADE)
54
- corporation_id = models.PositiveIntegerField()
55
- is_deleted = models.BooleanField(
56
- 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')
60
- start_date = models.DateTimeField()
@@ -1,23 +0,0 @@
1
- from esi.clients import esi_client_factory
2
-
3
- from . import __version__
4
-
5
- """
6
- Swagger spec operations:
7
- get_corporations_corporation_id_alliancehistory
8
- get_characters_character_id_corporationhistory
9
- """
10
-
11
-
12
- class EsiResponseClient:
13
- def __init__(self, token=None):
14
- self._client = None
15
-
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
21
-
22
-
23
- esi = EsiResponseClient()
@@ -1,6 +0,0 @@
1
- [build-system]
2
- requires = [
3
- "setuptools>=42",
4
- "wheel"
5
- ]
6
- build-backend = "setuptools.build_meta"
@@ -1,45 +0,0 @@
1
- [metadata]
2
- name = aa_alumni
3
- version = attr: alumni.__version__
4
- description = Integration with Alliance Auths State System, creates and maintains an Alumni State for past members of an Alliance and/or Corporation
5
- long_description = file: README.md
6
- long_description_content_type = text/markdown
7
- url = https://gitlab.com/tactical-supremacy/aa-alumni
8
- author = Joel Falknau
9
- author_email = joel.falknau@gmail.com
10
- license = MIT
11
- license_file = LICENSE
12
- classifiers =
13
- Environment :: Web Environment
14
- Framework :: Django
15
- Framework :: Django :: 4.0
16
- Intended Audience :: Developers
17
- License :: OSI Approved :: MIT License
18
- Operating System :: OS Independent
19
- Programming Language :: Python
20
- Programming Language :: Python :: 3
21
- Programming Language :: Python :: 3.8
22
- Programming Language :: Python :: 3.9
23
- Programming Language :: Python :: 3.10
24
- Programming Language :: Python :: 3.11
25
- Programming Language :: Python :: Implementation :: CPython
26
- Topic :: Internet :: WWW/HTTP
27
- Topic :: Internet :: WWW/HTTP :: Dynamic Content
28
-
29
- [options]
30
- packages = find:
31
- install_requires =
32
- allianceauth>=3.0.0
33
- python_requires = ~=3.8
34
- include_package_data = True
35
-
36
- [flake8]
37
- exclude = .git, *migrations*, .tox, dist, htmlcov
38
- max-line-length = 119
39
- select = C,E,F,W,B,B950
40
- ignore = E203, E231, E501, W503, W291, W293
41
-
42
- [egg_info]
43
- tag_build =
44
- tag_date = 0
45
-
@@ -1 +0,0 @@
1
- from .celery import app as celery_app # noqa
@@ -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)
@@ -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
- #######################################
@@ -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
- ]
@@ -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()
File without changes