aa-pootest 0.1.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 aa-pootest authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.4
2
+ Name: aa-pootest
3
+ Version: 0.1.0
4
+ Summary: POO Test plugin app for Alliance Auth.
5
+ Author: PooAmped
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+ Classifier: Environment :: Web Environment
9
+ Classifier: Framework :: Django
10
+ Classifier: Framework :: Django :: 5.2
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Internet :: WWW/HTTP
19
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
20
+ License-File: LICENSE
21
+ Requires-Dist: allianceauth>=5
22
+ Requires-Dist: coverage ; extra == "test"
23
+ Requires-Dist: factory_boy ; extra == "test"
24
+ Requires-Dist: allianceauth-app-utils>=1.32 ; extra == "test"
25
+ Project-URL: Homepage, https://github.com/PooAmped/aa-pootest
26
+ Project-URL: Source, https://github.com/PooAmped/aa-pootest
27
+ Project-URL: Tracker, https://github.com/PooAmped/aa-pootest/issues
28
+ Provides-Extra: test
29
+
30
+ # aa-pootest
31
+
32
+ A minimal **test plugin** for [Alliance Auth](https://gitlab.com/allianceauth/allianceauth) (AA).
33
+
34
+ It adds a single permission-gated page ("POO Test") to the AA sidebar that renders
35
+ a *Hello, World!* card. Use it to verify your AA dev/prod setup can install and load
36
+ a custom plugin, or as a starting point for your own app.
37
+
38
+ ![License](https://img.shields.io/badge/license-MIT-green)
39
+
40
+ - **Distribution (pip) name:** `aa-pootest`
41
+ - **Django app / module name:** `pootest`
42
+
43
+ ## Features
44
+
45
+ - Fully functional Alliance Auth app with a view and a basic permission
46
+ - Sidebar menu entry (visible only to users with the access permission)
47
+ - Installable with the standard AA plugin workflow
48
+
49
+ ## Installation
50
+
51
+ > Run all commands inside your Alliance Auth virtual environment.
52
+
53
+ ### 1. Install the package
54
+
55
+ From a local checkout (editable, for development):
56
+
57
+ ```bash
58
+ pip install -e aa-pootest
59
+ ```
60
+
61
+ Or from a built/published package:
62
+
63
+ ```bash
64
+ pip install aa-pootest
65
+ ```
66
+
67
+ Or directly from git:
68
+
69
+ ```bash
70
+ pip install git+https://github.com/PooAmped/aa-pootest
71
+ ```
72
+
73
+ ### 2. Enable the app
74
+
75
+ Add the app's **module name** to `INSTALLED_APPS` in `myauth/settings/local.py`:
76
+
77
+ ```python
78
+ INSTALLED_APPS += [
79
+ "pootest",
80
+ ]
81
+ ```
82
+
83
+ ### 3. Run migrations & collect static files
84
+
85
+ ```bash
86
+ python manage.py migrate
87
+ python manage.py collectstatic --noinput
88
+ ```
89
+
90
+ ### 4. Restart Alliance Auth
91
+
92
+ ```bash
93
+ supervisorctl restart myauth:
94
+ ```
95
+
96
+ ### 5. Grant access
97
+
98
+ In the AA admin site, grant the permission
99
+ `pootest | general | Can access this app` to the relevant **state** or **group**.
100
+ Users with that permission will then see the **POO Test** entry in the sidebar.
101
+
102
+ ## Settings
103
+
104
+ | Name | Description | Default |
105
+ | -------------------- | --------------------- | ------- |
106
+ | `POOTEST_SETTING_ONE`| Example optional value| `None` |
107
+
108
+ Override in `myauth/settings/local.py` if desired.
109
+
110
+ ## License
111
+
112
+ MIT — see [LICENSE](LICENSE).
113
+
@@ -0,0 +1,83 @@
1
+ # aa-pootest
2
+
3
+ A minimal **test plugin** for [Alliance Auth](https://gitlab.com/allianceauth/allianceauth) (AA).
4
+
5
+ It adds a single permission-gated page ("POO Test") to the AA sidebar that renders
6
+ a *Hello, World!* card. Use it to verify your AA dev/prod setup can install and load
7
+ a custom plugin, or as a starting point for your own app.
8
+
9
+ ![License](https://img.shields.io/badge/license-MIT-green)
10
+
11
+ - **Distribution (pip) name:** `aa-pootest`
12
+ - **Django app / module name:** `pootest`
13
+
14
+ ## Features
15
+
16
+ - Fully functional Alliance Auth app with a view and a basic permission
17
+ - Sidebar menu entry (visible only to users with the access permission)
18
+ - Installable with the standard AA plugin workflow
19
+
20
+ ## Installation
21
+
22
+ > Run all commands inside your Alliance Auth virtual environment.
23
+
24
+ ### 1. Install the package
25
+
26
+ From a local checkout (editable, for development):
27
+
28
+ ```bash
29
+ pip install -e aa-pootest
30
+ ```
31
+
32
+ Or from a built/published package:
33
+
34
+ ```bash
35
+ pip install aa-pootest
36
+ ```
37
+
38
+ Or directly from git:
39
+
40
+ ```bash
41
+ pip install git+https://github.com/PooAmped/aa-pootest
42
+ ```
43
+
44
+ ### 2. Enable the app
45
+
46
+ Add the app's **module name** to `INSTALLED_APPS` in `myauth/settings/local.py`:
47
+
48
+ ```python
49
+ INSTALLED_APPS += [
50
+ "pootest",
51
+ ]
52
+ ```
53
+
54
+ ### 3. Run migrations & collect static files
55
+
56
+ ```bash
57
+ python manage.py migrate
58
+ python manage.py collectstatic --noinput
59
+ ```
60
+
61
+ ### 4. Restart Alliance Auth
62
+
63
+ ```bash
64
+ supervisorctl restart myauth:
65
+ ```
66
+
67
+ ### 5. Grant access
68
+
69
+ In the AA admin site, grant the permission
70
+ `pootest | general | Can access this app` to the relevant **state** or **group**.
71
+ Users with that permission will then see the **POO Test** entry in the sidebar.
72
+
73
+ ## Settings
74
+
75
+ | Name | Description | Default |
76
+ | -------------------- | --------------------- | ------- |
77
+ | `POOTEST_SETTING_ONE`| Example optional value| `None` |
78
+
79
+ Override in `myauth/settings/local.py` if desired.
80
+
81
+ ## License
82
+
83
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,6 @@
1
+ """POO Test plugin app for Alliance Auth."""
2
+
3
+ # pylint: disable = invalid-name
4
+ default_app_config = "pootest.apps.PootestConfig"
5
+
6
+ __version__ = "0.1.0"
@@ -0,0 +1,8 @@
1
+ """Admin site setup."""
2
+
3
+ # Register your models with the Django admin site here, e.g.:
4
+ #
5
+ # from django.contrib import admin
6
+ # from .models import MyModel
7
+ #
8
+ # admin.site.register(MyModel)
@@ -0,0 +1,6 @@
1
+ """App settings."""
2
+
3
+ from django.conf import settings
4
+
5
+ # Example optional setting. Override in your AA `settings/local.py` if needed.
6
+ POOTEST_SETTING_ONE = getattr(settings, "POOTEST_SETTING_ONE", None)
@@ -0,0 +1,9 @@
1
+ from django.apps import AppConfig
2
+
3
+ from . import __version__
4
+
5
+
6
+ class PootestConfig(AppConfig):
7
+ name = "pootest"
8
+ label = "pootest"
9
+ verbose_name = f"POO Test v{__version__}"
@@ -0,0 +1,35 @@
1
+ from django.utils.translation import gettext_lazy as _
2
+
3
+ from allianceauth import hooks
4
+ from allianceauth.services.hooks import MenuItemHook, UrlHook
5
+
6
+ from . import urls
7
+
8
+
9
+ class PootestMenuItem(MenuItemHook):
10
+ """This class ensures only authorized users will see the menu entry."""
11
+
12
+ def __init__(self):
13
+ # setup menu entry for sidebar
14
+ MenuItemHook.__init__(
15
+ self,
16
+ _("POO Test"),
17
+ "fas fa-poo fa-fw",
18
+ "pootest:index",
19
+ navactive=["pootest:"],
20
+ )
21
+
22
+ def render(self, request):
23
+ if request.user.has_perm("pootest.basic_access"):
24
+ return MenuItemHook.render(self, request)
25
+ return ""
26
+
27
+
28
+ @hooks.register("menu_item_hook")
29
+ def register_menu():
30
+ return PootestMenuItem()
31
+
32
+
33
+ @hooks.register("url_hook")
34
+ def register_urls():
35
+ return UrlHook(urls, "pootest", r"^pootest/")
@@ -0,0 +1,30 @@
1
+ from django.db import migrations, models
2
+
3
+
4
+ class Migration(migrations.Migration):
5
+
6
+ initial = True
7
+
8
+ dependencies = []
9
+
10
+ operations = [
11
+ migrations.CreateModel(
12
+ name="General",
13
+ fields=[
14
+ (
15
+ "id",
16
+ models.AutoField(
17
+ auto_created=True,
18
+ primary_key=True,
19
+ serialize=False,
20
+ verbose_name="ID",
21
+ ),
22
+ ),
23
+ ],
24
+ options={
25
+ "permissions": (("basic_access", "Can access this app"),),
26
+ "managed": False,
27
+ "default_permissions": (),
28
+ },
29
+ ),
30
+ ]
File without changes
@@ -0,0 +1,12 @@
1
+ """Models."""
2
+
3
+ from django.db import models
4
+
5
+
6
+ class General(models.Model):
7
+ """A meta model for app permissions."""
8
+
9
+ class Meta:
10
+ managed = False
11
+ default_permissions = ()
12
+ permissions = (("basic_access", "Can access this app"),)
@@ -0,0 +1,15 @@
1
+ {% extends 'allianceauth/base-bs5.html' %}
2
+ {% load humanize %}
3
+ {% load i18n %}
4
+
5
+ {% block page_title %}POO Test{% endblock %}
6
+
7
+ {% block header_nav_brand %}POO Test{% endblock %}
8
+
9
+ {% block header_nav_user_character_control %}
10
+ {% comment %}
11
+ Leave empty to remove user control nav items for this app
12
+ {% endcomment %}
13
+ {% endblock %}
14
+
15
+ {% block content %}{% endblock %}
@@ -0,0 +1,23 @@
1
+ {% extends 'pootest/base.html' %}
2
+ {% load i18n %}
3
+ {% load humanize %}
4
+
5
+ {% block content %}
6
+
7
+ <div class="card card-default card-tabs">
8
+ <div class="card-body">
9
+ <h5 class="card-title">Welcome</h5>
10
+ <p class="card-text">{{ text }}</p>
11
+ </div>
12
+ </div>
13
+
14
+ {% endblock %}
15
+
16
+ {% block extra_javascript %}
17
+ {% endblock %}
18
+
19
+ {% block extra_css %}
20
+ {% endblock %}
21
+
22
+ {% block extra_script %}
23
+ {% endblock %}
@@ -0,0 +1,11 @@
1
+ """Routes."""
2
+
3
+ from django.urls import path
4
+
5
+ from . import views
6
+
7
+ app_name = "pootest"
8
+
9
+ urlpatterns = [
10
+ path("", views.index, name="index"),
11
+ ]
@@ -0,0 +1,15 @@
1
+ """Views."""
2
+
3
+ from django.contrib.auth.decorators import login_required, permission_required
4
+ from django.shortcuts import render
5
+
6
+
7
+ @login_required
8
+ @permission_required("pootest.basic_access")
9
+ def index(request):
10
+ """Render index view."""
11
+ context = {
12
+ "text": "Hello, World! This is aa-pootest.",
13
+ "page_title": "Welcome",
14
+ }
15
+ return render(request, "pootest/index.html", context)
@@ -0,0 +1,63 @@
1
+ [build-system]
2
+ requires = ["flit_core >=3.2,<4"]
3
+ build-backend = "flit_core.buildapi"
4
+
5
+ [project]
6
+ name = "aa-pootest"
7
+ dynamic = ["version", "description"]
8
+ readme = "README.md"
9
+ license = {file = "LICENSE"}
10
+ requires-python = ">=3.10"
11
+ authors = [
12
+ { name = "PooAmped" },
13
+ ]
14
+ classifiers = [
15
+ "Environment :: Web Environment",
16
+ "Framework :: Django",
17
+ "Framework :: Django :: 5.2",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Topic :: Internet :: WWW/HTTP",
26
+ "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
27
+ ]
28
+ dependencies = [
29
+ "allianceauth>=5",
30
+ ]
31
+
32
+ [project.optional-dependencies]
33
+ test = ["coverage", "factory_boy", "allianceauth-app-utils>=1.32"]
34
+
35
+ [project.urls]
36
+ Homepage = "https://github.com/PooAmped/aa-pootest"
37
+ Source = "https://github.com/PooAmped/aa-pootest"
38
+ Tracker = "https://github.com/PooAmped/aa-pootest/issues"
39
+
40
+ [tool.flit.module]
41
+ name = "pootest"
42
+
43
+ [tool.isort]
44
+ profile = "black"
45
+ multi_line_output = 3
46
+ sections = [
47
+ "FUTURE",
48
+ "STDLIB",
49
+ "THIRDPARTY",
50
+ "DJANGO",
51
+ "ALLIANCEAUTH",
52
+ "FIRSTPARTY",
53
+ "LOCALFOLDER"
54
+ ]
55
+ known_allianceauth = ["allianceauth", "app_utils"]
56
+ known_django = ["django", "django_webtest", "esi", "eveuniverse"]
57
+
58
+ [tool.pylint.'MASTER']
59
+ ignore-patterns = ["__init__.py", "auth_hooks.py", "apps.py", "admin.py"]
60
+ ignore-paths = ["^.*/tests/.*$", "^.*/migrations/.*$"]
61
+
62
+ [tool.pylint.'FORMAT']
63
+ max-line-length = 120