aa-customizer 1.0.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aa_customizer-1.0.13/PKG-INFO +315 -0
- aa_customizer-1.0.13/README.md +286 -0
- aa_customizer-1.0.13/aa_customizer/__init__.py +4 -0
- aa_customizer-1.0.13/aa_customizer/admin.py +136 -0
- aa_customizer-1.0.13/aa_customizer/apps.py +12 -0
- aa_customizer-1.0.13/aa_customizer/context_processors.py +25 -0
- aa_customizer-1.0.13/aa_customizer/forms.py +41 -0
- aa_customizer-1.0.13/aa_customizer/migrations/0001_initial.py +146 -0
- aa_customizer-1.0.13/aa_customizer/migrations/0002_url_fields_css_html.py +156 -0
- aa_customizer-1.0.13/aa_customizer/migrations/0003_alter_custombranding_custom_css_and_more.py +78 -0
- aa_customizer-1.0.13/aa_customizer/migrations/0003_restore_change_view_permissions.py +30 -0
- aa_customizer-1.0.13/aa_customizer/migrations/0004_merge_20260321_0059.py +19 -0
- aa_customizer-1.0.13/aa_customizer/migrations/0005_custombranding_sidebar_logo.py +33 -0
- aa_customizer-1.0.13/aa_customizer/migrations/0006_custombranding_login_layout.py +21 -0
- aa_customizer-1.0.13/aa_customizer/migrations/0007_custombranding_split_panel.py +52 -0
- aa_customizer-1.0.13/aa_customizer/migrations/__init__.py +0 -0
- aa_customizer-1.0.13/aa_customizer/models.py +318 -0
- aa_customizer-1.0.13/aa_customizer/static/aa_customizer/css/aa-customizer.css +120 -0
- aa_customizer-1.0.13/aa_customizer/templates/aa_customizer/partials/login_branding.html +18 -0
- aa_customizer-1.0.13/aa_customizer/templates/aa_customizer/partials/navbar_logo.html +9 -0
- aa_customizer-1.0.13/aa_customizer/templates/allianceauth/base-bs5.html +141 -0
- aa_customizer-1.0.13/aa_customizer/templates/allianceauth/icons.html +21 -0
- aa_customizer-1.0.13/aa_customizer/templates/menu/menu-logo.html +13 -0
- aa_customizer-1.0.13/aa_customizer/templates/public/base.html +87 -0
- aa_customizer-1.0.13/aa_customizer/templates/public/login.html +27 -0
- aa_customizer-1.0.13/aa_customizer/templates/public/middle_box.html +68 -0
- aa_customizer-1.0.13/aa_customizer/templatetags/__init__.py +0 -0
- aa_customizer-1.0.13/aa_customizer/templatetags/aa_customizer_tags.py +90 -0
- aa_customizer-1.0.13/aa_customizer.egg-info/PKG-INFO +315 -0
- aa_customizer-1.0.13/aa_customizer.egg-info/SOURCES.txt +33 -0
- aa_customizer-1.0.13/aa_customizer.egg-info/dependency_links.txt +1 -0
- aa_customizer-1.0.13/aa_customizer.egg-info/requires.txt +3 -0
- aa_customizer-1.0.13/aa_customizer.egg-info/top_level.txt +1 -0
- aa_customizer-1.0.13/pyproject.toml +54 -0
- aa_customizer-1.0.13/setup.cfg +4 -0
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aa-customizer
|
|
3
|
+
Version: 1.0.13
|
|
4
|
+
Summary: Branding & customization plugin for Alliance Auth — custom logos, login backgrounds, favicons, and more.
|
|
5
|
+
Author: Thrainkrilleve
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Thrainkrilleve/aa-customizer
|
|
8
|
+
Project-URL: Repository, https://github.com/Thrainkrilleve/aa-customizer
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/Thrainkrilleve/aa-customizer/issues
|
|
10
|
+
Keywords: alliance auth,eve online,branding,customization
|
|
11
|
+
Classifier: Environment :: Web Environment
|
|
12
|
+
Classifier: Framework :: Django
|
|
13
|
+
Classifier: Intended Audience :: System Administrators
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
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 :: 3.12
|
|
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
|
+
Requires-Dist: allianceauth>=4.0.0
|
|
27
|
+
Requires-Dist: django-solo
|
|
28
|
+
Requires-Dist: Pillow
|
|
29
|
+
|
|
30
|
+
# AA Customizer
|
|
31
|
+
|
|
32
|
+
A branding & customization plugin for [Alliance Auth](https://allianceauth.readthedocs.io).
|
|
33
|
+
|
|
34
|
+
Gives administrators a simple admin-panel UI to customize their Alliance Auth installation without touching code or replacing static files.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Screenshots
|
|
39
|
+
|
|
40
|
+
### Split Screen layout
|
|
41
|
+

|
|
42
|
+
|
|
43
|
+
### Centered Card layout (default)
|
|
44
|
+

|
|
45
|
+
|
|
46
|
+
### Side Bar Icon
|
|
47
|
+

|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Features
|
|
52
|
+
|
|
53
|
+
| Feature | What it does |
|
|
54
|
+
|---|---|
|
|
55
|
+
| **Custom site name** | Overrides `SITE_NAME` from `local.py` across the whole site |
|
|
56
|
+
| **Login background** | URL or uploaded image; falls back to a CSS color, then the default AA space background |
|
|
57
|
+
| **Login layout** | Centered Card, Split Screen (background left), or Split Screen (login left) |
|
|
58
|
+
| **Login logo** | URL or uploaded image shown at the top of the login card |
|
|
59
|
+
| **Login title & subtitle** | Welcome heading and description text on the login card |
|
|
60
|
+
| **Login extra HTML** | Raw HTML injected below the EVE SSO button (notices, Discord links, etc.) |
|
|
61
|
+
| **Custom favicon** | URL or uploaded image replacing all Alliance Auth browser-tab icons |
|
|
62
|
+
| **Navbar logo** | URL or uploaded image alongside the site name in the top navigation bar |
|
|
63
|
+
| **Sidebar logo** | URL or uploaded image replacing the Alliance Auth logo in the sidebar |
|
|
64
|
+
| **Custom CSS — URL** | External stylesheet linked in every page `<head>`, loaded after the active theme |
|
|
65
|
+
| **Custom CSS — inline** | CSS text injected via `<style>` on every page, loaded after the active theme |
|
|
66
|
+
| **Extra `<head>` HTML** | Raw HTML at the end of `<head>` on every page (analytics, font imports, meta tags) |
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Requirements
|
|
71
|
+
|
|
72
|
+
- Alliance Auth ≥ 4.0.0 (Bootstrap 5 template set)
|
|
73
|
+
- `django-solo`
|
|
74
|
+
- `Pillow`
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Installation
|
|
79
|
+
|
|
80
|
+
### Bare Metal install
|
|
81
|
+
|
|
82
|
+
**1 — Install the package**
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Activate your Alliance Auth virtualenv first, then:
|
|
86
|
+
pip install aa-customizer
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**2 — Add to `INSTALLED_APPS`**
|
|
90
|
+
|
|
91
|
+
Open your `local.py` and add above INSTALLED_APPS =:
|
|
92
|
+
```python
|
|
93
|
+
INSTALLED_APPS.insert(0, 'aa_customizer')
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
> Django searches each app's `templates/` folder in `INSTALLED_APPS` order and uses the first match.
|
|
97
|
+
> Placing `aa_customizer` first ensures its template overrides are picked up before the Alliance Auth originals.
|
|
98
|
+
|
|
99
|
+
**3 — Add the context processor**
|
|
100
|
+
|
|
101
|
+
In `local.py`, add to the settings section to append the existing `TEMPLATES` list:
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
TEMPLATES[0]["OPTIONS"]["context_processors"].append(
|
|
105
|
+
"aa_customizer.context_processors.aa_customizer"
|
|
106
|
+
)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**4 — Run migrations**
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
python manage.py migrate aa_customizer
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**5 — Collect static files**
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
python manage.py collectstatic
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**6 — (Optional) Configure media file serving**
|
|
122
|
+
|
|
123
|
+
Only needed if you want to use **file uploads** instead of image URLs.
|
|
124
|
+
|
|
125
|
+
In `local.py`:
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
MEDIA_ROOT = "/path/to/your/media/"
|
|
129
|
+
MEDIA_URL = "/media/"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Make sure your web server (nginx, Apache, etc.) is configured to serve files from `MEDIA_ROOT` at `MEDIA_URL`.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### Docker install
|
|
137
|
+
|
|
138
|
+
The recommended approach for Docker is to use **URL fields** for all images (point at an external CDN, Imgur, GitHub raw assets, etc.) so you don't need to mount a media volume just to serve a few files.
|
|
139
|
+
|
|
140
|
+
**1 — Install the package inside the container**
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Activate your Alliance Auth virtualenv first, then:
|
|
144
|
+
pip install aa-customizer
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
Add `aa-customizer` to your pip requirements file (e.g. `requirements.txt` or the equivalent in your Docker setup), then rebuild:
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
auth migrate
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
auth collectstatic
|
|
156
|
+
```
|
|
157
|
+
```
|
|
158
|
+
exit
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**2 — Add to `INSTALLED_APPS`**
|
|
162
|
+
|
|
163
|
+
Open your `local.py` and add above INSTALLED_APPS =:
|
|
164
|
+
```python
|
|
165
|
+
INSTALLED_APPS.insert(0, 'aa_customizer')
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
> Django searches each app's `templates/` folder in `INSTALLED_APPS` order and uses the first match.
|
|
169
|
+
> Placing `aa_customizer` first ensures its template overrides are picked up before the Alliance Auth originals.
|
|
170
|
+
|
|
171
|
+
**3 — Add the context processor**
|
|
172
|
+
|
|
173
|
+
In `local.py`, add to the settings section to append the existing `TEMPLATES` list:
|
|
174
|
+
|
|
175
|
+
```python
|
|
176
|
+
TEMPLATES[0]["OPTIONS"]["context_processors"].append(
|
|
177
|
+
"aa_customizer.context_processors.aa_customizer"
|
|
178
|
+
)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**4 — (Optional) Media file uploads**
|
|
182
|
+
|
|
183
|
+
If you want to upload images through the admin instead of using URLs, you need a media volume:
|
|
184
|
+
|
|
185
|
+
In `local.py`:
|
|
186
|
+
```python
|
|
187
|
+
MEDIA_ROOT = "/home/allianceserver/aa-docker/media/"
|
|
188
|
+
MEDIA_URL = "/media/"
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Mount the volume in `docker-compose.yml` for both the gunicorn and nginx services:
|
|
192
|
+
```yaml
|
|
193
|
+
volumes:
|
|
194
|
+
- ./media:/home/allianceserver/aa-docker/media
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
And configure nginx to serve it:
|
|
198
|
+
```nginx
|
|
199
|
+
location /media/ {
|
|
200
|
+
alias /home/allianceserver/aa-docker/media/;
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
For most Docker installs, **using URL fields is simpler** — just paste an image link and skip all of the above.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Usage
|
|
209
|
+
|
|
210
|
+
1. Log in to the Alliance Auth **admin panel** (`/admin/`).
|
|
211
|
+
2. Find **AA Customizer → Custom Branding** in the left-hand sidebar.
|
|
212
|
+
3. Fill in whichever fields you want to customize and click **Save**.
|
|
213
|
+
|
|
214
|
+
Changes take effect immediately on the next page load — no server restart needed.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Field reference
|
|
219
|
+
|
|
220
|
+
### Site
|
|
221
|
+
|
|
222
|
+
| Field | Description |
|
|
223
|
+
|---|---|
|
|
224
|
+
| **Site Name** | Overrides `SITE_NAME` from `local.py` |
|
|
225
|
+
|
|
226
|
+
### Login Page — Background
|
|
227
|
+
|
|
228
|
+
| Field | Description |
|
|
229
|
+
|---|---|
|
|
230
|
+
| **Login Background — URL** | URL of a background image (takes priority over an upload) |
|
|
231
|
+
| **Login Background — Upload** | Uploaded background image (bare metal / media volume only) |
|
|
232
|
+
| **Login Background Color** | CSS color fallback when no image is set (e.g. `#1a1a2e`) |
|
|
233
|
+
|
|
234
|
+
### Login Page — Layout
|
|
235
|
+
|
|
236
|
+
| Field | Description |
|
|
237
|
+
|---|---|
|
|
238
|
+
| **Login Page Layout** | `Centered Card` — login card centered over the full-page background (default). `Split Screen — Background Left` — background on the left, dark login panel on the right. `Split Screen — Login Left` — mirrors it. |
|
|
239
|
+
| **Split Panel — Show Overlay Text** | Tick to show text on the background panel; untick to hide it entirely |
|
|
240
|
+
| **Split Panel — Overlay Text** | Text shown on the background panel. Leave blank to auto-display the site name |
|
|
241
|
+
| **Split Panel — Text Position** | Vertical position of the overlay text: `Top`, `Center`, or `Bottom` |
|
|
242
|
+
|
|
243
|
+
### Login Page — Branding
|
|
244
|
+
|
|
245
|
+
| Field | Description |
|
|
246
|
+
|---|---|
|
|
247
|
+
| **Login Logo — URL** | URL of a logo image (takes priority) |
|
|
248
|
+
| **Login Logo — Upload** | Uploaded logo image |
|
|
249
|
+
| **Login Logo Max Width (px)** | Maximum display width of the login logo |
|
|
250
|
+
| **Login Page Title** | Custom heading shown above the SSO button |
|
|
251
|
+
| **Login Page Subtitle** | Optional description text below the title |
|
|
252
|
+
| **Login Page Extra HTML** | Raw HTML injected below the EVE SSO button (notices, links, etc.) |
|
|
253
|
+
|
|
254
|
+
### Favicon
|
|
255
|
+
|
|
256
|
+
| Field | Description |
|
|
257
|
+
|---|---|
|
|
258
|
+
| **Favicon — URL** | URL of a favicon image (takes priority) |
|
|
259
|
+
| **Favicon — Upload** | Uploaded favicon image |
|
|
260
|
+
|
|
261
|
+
### Navigation Bar Logo
|
|
262
|
+
|
|
263
|
+
| Field | Description |
|
|
264
|
+
|---|---|
|
|
265
|
+
| **Navbar Logo — URL** | URL of a navbar logo image (takes priority) |
|
|
266
|
+
| **Navbar Logo — Upload** | Uploaded navbar logo image |
|
|
267
|
+
| **Navbar Logo Height (px)** | Display height of the navbar logo |
|
|
268
|
+
|
|
269
|
+
### Sidebar Logo
|
|
270
|
+
|
|
271
|
+
| Field | Description |
|
|
272
|
+
|---|---|
|
|
273
|
+
| **Sidebar Logo — URL** | URL of an image to replace the AA logo in the sidebar (takes priority) |
|
|
274
|
+
| **Sidebar Logo — Upload** | Uploaded sidebar logo image |
|
|
275
|
+
| **Sidebar Logo Width (px)** | Display width of the sidebar logo |
|
|
276
|
+
|
|
277
|
+
### Custom CSS
|
|
278
|
+
|
|
279
|
+
| Field | Description |
|
|
280
|
+
|---|---|
|
|
281
|
+
| **Custom CSS — URL** | External stylesheet URL linked in every page `<head>` |
|
|
282
|
+
| **Custom CSS** | Inline CSS injected via `<style>` on every page |
|
|
283
|
+
|
|
284
|
+
### Extra HTML
|
|
285
|
+
|
|
286
|
+
| Field | Description |
|
|
287
|
+
|---|---|
|
|
288
|
+
| **Extra `<head>` HTML** | Raw HTML injected at the end of `<head>` on every page |
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## Image recommendations
|
|
293
|
+
|
|
294
|
+
| Field | Recommended size / format |
|
|
295
|
+
|---|---|
|
|
296
|
+
| Login background | ≥ 1920 × 1080 px, JPEG or PNG |
|
|
297
|
+
| Login logo | ≥ 256 × 256 px, transparent PNG |
|
|
298
|
+
| Favicon | ≥ 192 × 192 px, PNG or ICO |
|
|
299
|
+
| Navbar logo | Transparent PNG, height ≤ 64 px |
|
|
300
|
+
| Sidebar logo | Transparent PNG, width ≤ 256 px |
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Security notes
|
|
305
|
+
|
|
306
|
+
- **Raw HTML fields** (`Login Page Extra HTML`, `Extra <head> HTML`) are rendered without sanitization and are only editable by Django admin users (staff/superusers).
|
|
307
|
+
- **Custom CSS URL** is validated as a URL by Django's field validator; only `http`/`https` schemes are accepted.
|
|
308
|
+
- AA Customizer works alongside Alliance Auth's built-in **Custom CSS** admin (`/admin/custom_css/customcss/`). The customizer's CSS loads after the built-in one, so it takes precedence.
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## License
|
|
313
|
+
|
|
314
|
+
MIT
|
|
315
|
+
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# AA Customizer
|
|
2
|
+
|
|
3
|
+
A branding & customization plugin for [Alliance Auth](https://allianceauth.readthedocs.io).
|
|
4
|
+
|
|
5
|
+
Gives administrators a simple admin-panel UI to customize their Alliance Auth installation without touching code or replacing static files.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Screenshots
|
|
10
|
+
|
|
11
|
+
### Split Screen layout
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
### Centered Card layout (default)
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
### Side Bar Icon
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
| Feature | What it does |
|
|
25
|
+
|---|---|
|
|
26
|
+
| **Custom site name** | Overrides `SITE_NAME` from `local.py` across the whole site |
|
|
27
|
+
| **Login background** | URL or uploaded image; falls back to a CSS color, then the default AA space background |
|
|
28
|
+
| **Login layout** | Centered Card, Split Screen (background left), or Split Screen (login left) |
|
|
29
|
+
| **Login logo** | URL or uploaded image shown at the top of the login card |
|
|
30
|
+
| **Login title & subtitle** | Welcome heading and description text on the login card |
|
|
31
|
+
| **Login extra HTML** | Raw HTML injected below the EVE SSO button (notices, Discord links, etc.) |
|
|
32
|
+
| **Custom favicon** | URL or uploaded image replacing all Alliance Auth browser-tab icons |
|
|
33
|
+
| **Navbar logo** | URL or uploaded image alongside the site name in the top navigation bar |
|
|
34
|
+
| **Sidebar logo** | URL or uploaded image replacing the Alliance Auth logo in the sidebar |
|
|
35
|
+
| **Custom CSS — URL** | External stylesheet linked in every page `<head>`, loaded after the active theme |
|
|
36
|
+
| **Custom CSS — inline** | CSS text injected via `<style>` on every page, loaded after the active theme |
|
|
37
|
+
| **Extra `<head>` HTML** | Raw HTML at the end of `<head>` on every page (analytics, font imports, meta tags) |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Requirements
|
|
42
|
+
|
|
43
|
+
- Alliance Auth ≥ 4.0.0 (Bootstrap 5 template set)
|
|
44
|
+
- `django-solo`
|
|
45
|
+
- `Pillow`
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Installation
|
|
50
|
+
|
|
51
|
+
### Bare Metal install
|
|
52
|
+
|
|
53
|
+
**1 — Install the package**
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Activate your Alliance Auth virtualenv first, then:
|
|
57
|
+
pip install aa-customizer
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**2 — Add to `INSTALLED_APPS`**
|
|
61
|
+
|
|
62
|
+
Open your `local.py` and add above INSTALLED_APPS =:
|
|
63
|
+
```python
|
|
64
|
+
INSTALLED_APPS.insert(0, 'aa_customizer')
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
> Django searches each app's `templates/` folder in `INSTALLED_APPS` order and uses the first match.
|
|
68
|
+
> Placing `aa_customizer` first ensures its template overrides are picked up before the Alliance Auth originals.
|
|
69
|
+
|
|
70
|
+
**3 — Add the context processor**
|
|
71
|
+
|
|
72
|
+
In `local.py`, add to the settings section to append the existing `TEMPLATES` list:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
TEMPLATES[0]["OPTIONS"]["context_processors"].append(
|
|
76
|
+
"aa_customizer.context_processors.aa_customizer"
|
|
77
|
+
)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**4 — Run migrations**
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
python manage.py migrate aa_customizer
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**5 — Collect static files**
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
python manage.py collectstatic
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**6 — (Optional) Configure media file serving**
|
|
93
|
+
|
|
94
|
+
Only needed if you want to use **file uploads** instead of image URLs.
|
|
95
|
+
|
|
96
|
+
In `local.py`:
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
MEDIA_ROOT = "/path/to/your/media/"
|
|
100
|
+
MEDIA_URL = "/media/"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Make sure your web server (nginx, Apache, etc.) is configured to serve files from `MEDIA_ROOT` at `MEDIA_URL`.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
### Docker install
|
|
108
|
+
|
|
109
|
+
The recommended approach for Docker is to use **URL fields** for all images (point at an external CDN, Imgur, GitHub raw assets, etc.) so you don't need to mount a media volume just to serve a few files.
|
|
110
|
+
|
|
111
|
+
**1 — Install the package inside the container**
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# Activate your Alliance Auth virtualenv first, then:
|
|
115
|
+
pip install aa-customizer
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
Add `aa-customizer` to your pip requirements file (e.g. `requirements.txt` or the equivalent in your Docker setup), then rebuild:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
auth migrate
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
auth collectstatic
|
|
127
|
+
```
|
|
128
|
+
```
|
|
129
|
+
exit
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**2 — Add to `INSTALLED_APPS`**
|
|
133
|
+
|
|
134
|
+
Open your `local.py` and add above INSTALLED_APPS =:
|
|
135
|
+
```python
|
|
136
|
+
INSTALLED_APPS.insert(0, 'aa_customizer')
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
> Django searches each app's `templates/` folder in `INSTALLED_APPS` order and uses the first match.
|
|
140
|
+
> Placing `aa_customizer` first ensures its template overrides are picked up before the Alliance Auth originals.
|
|
141
|
+
|
|
142
|
+
**3 — Add the context processor**
|
|
143
|
+
|
|
144
|
+
In `local.py`, add to the settings section to append the existing `TEMPLATES` list:
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
TEMPLATES[0]["OPTIONS"]["context_processors"].append(
|
|
148
|
+
"aa_customizer.context_processors.aa_customizer"
|
|
149
|
+
)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**4 — (Optional) Media file uploads**
|
|
153
|
+
|
|
154
|
+
If you want to upload images through the admin instead of using URLs, you need a media volume:
|
|
155
|
+
|
|
156
|
+
In `local.py`:
|
|
157
|
+
```python
|
|
158
|
+
MEDIA_ROOT = "/home/allianceserver/aa-docker/media/"
|
|
159
|
+
MEDIA_URL = "/media/"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Mount the volume in `docker-compose.yml` for both the gunicorn and nginx services:
|
|
163
|
+
```yaml
|
|
164
|
+
volumes:
|
|
165
|
+
- ./media:/home/allianceserver/aa-docker/media
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
And configure nginx to serve it:
|
|
169
|
+
```nginx
|
|
170
|
+
location /media/ {
|
|
171
|
+
alias /home/allianceserver/aa-docker/media/;
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
For most Docker installs, **using URL fields is simpler** — just paste an image link and skip all of the above.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Usage
|
|
180
|
+
|
|
181
|
+
1. Log in to the Alliance Auth **admin panel** (`/admin/`).
|
|
182
|
+
2. Find **AA Customizer → Custom Branding** in the left-hand sidebar.
|
|
183
|
+
3. Fill in whichever fields you want to customize and click **Save**.
|
|
184
|
+
|
|
185
|
+
Changes take effect immediately on the next page load — no server restart needed.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Field reference
|
|
190
|
+
|
|
191
|
+
### Site
|
|
192
|
+
|
|
193
|
+
| Field | Description |
|
|
194
|
+
|---|---|
|
|
195
|
+
| **Site Name** | Overrides `SITE_NAME` from `local.py` |
|
|
196
|
+
|
|
197
|
+
### Login Page — Background
|
|
198
|
+
|
|
199
|
+
| Field | Description |
|
|
200
|
+
|---|---|
|
|
201
|
+
| **Login Background — URL** | URL of a background image (takes priority over an upload) |
|
|
202
|
+
| **Login Background — Upload** | Uploaded background image (bare metal / media volume only) |
|
|
203
|
+
| **Login Background Color** | CSS color fallback when no image is set (e.g. `#1a1a2e`) |
|
|
204
|
+
|
|
205
|
+
### Login Page — Layout
|
|
206
|
+
|
|
207
|
+
| Field | Description |
|
|
208
|
+
|---|---|
|
|
209
|
+
| **Login Page Layout** | `Centered Card` — login card centered over the full-page background (default). `Split Screen — Background Left` — background on the left, dark login panel on the right. `Split Screen — Login Left` — mirrors it. |
|
|
210
|
+
| **Split Panel — Show Overlay Text** | Tick to show text on the background panel; untick to hide it entirely |
|
|
211
|
+
| **Split Panel — Overlay Text** | Text shown on the background panel. Leave blank to auto-display the site name |
|
|
212
|
+
| **Split Panel — Text Position** | Vertical position of the overlay text: `Top`, `Center`, or `Bottom` |
|
|
213
|
+
|
|
214
|
+
### Login Page — Branding
|
|
215
|
+
|
|
216
|
+
| Field | Description |
|
|
217
|
+
|---|---|
|
|
218
|
+
| **Login Logo — URL** | URL of a logo image (takes priority) |
|
|
219
|
+
| **Login Logo — Upload** | Uploaded logo image |
|
|
220
|
+
| **Login Logo Max Width (px)** | Maximum display width of the login logo |
|
|
221
|
+
| **Login Page Title** | Custom heading shown above the SSO button |
|
|
222
|
+
| **Login Page Subtitle** | Optional description text below the title |
|
|
223
|
+
| **Login Page Extra HTML** | Raw HTML injected below the EVE SSO button (notices, links, etc.) |
|
|
224
|
+
|
|
225
|
+
### Favicon
|
|
226
|
+
|
|
227
|
+
| Field | Description |
|
|
228
|
+
|---|---|
|
|
229
|
+
| **Favicon — URL** | URL of a favicon image (takes priority) |
|
|
230
|
+
| **Favicon — Upload** | Uploaded favicon image |
|
|
231
|
+
|
|
232
|
+
### Navigation Bar Logo
|
|
233
|
+
|
|
234
|
+
| Field | Description |
|
|
235
|
+
|---|---|
|
|
236
|
+
| **Navbar Logo — URL** | URL of a navbar logo image (takes priority) |
|
|
237
|
+
| **Navbar Logo — Upload** | Uploaded navbar logo image |
|
|
238
|
+
| **Navbar Logo Height (px)** | Display height of the navbar logo |
|
|
239
|
+
|
|
240
|
+
### Sidebar Logo
|
|
241
|
+
|
|
242
|
+
| Field | Description |
|
|
243
|
+
|---|---|
|
|
244
|
+
| **Sidebar Logo — URL** | URL of an image to replace the AA logo in the sidebar (takes priority) |
|
|
245
|
+
| **Sidebar Logo — Upload** | Uploaded sidebar logo image |
|
|
246
|
+
| **Sidebar Logo Width (px)** | Display width of the sidebar logo |
|
|
247
|
+
|
|
248
|
+
### Custom CSS
|
|
249
|
+
|
|
250
|
+
| Field | Description |
|
|
251
|
+
|---|---|
|
|
252
|
+
| **Custom CSS — URL** | External stylesheet URL linked in every page `<head>` |
|
|
253
|
+
| **Custom CSS** | Inline CSS injected via `<style>` on every page |
|
|
254
|
+
|
|
255
|
+
### Extra HTML
|
|
256
|
+
|
|
257
|
+
| Field | Description |
|
|
258
|
+
|---|---|
|
|
259
|
+
| **Extra `<head>` HTML** | Raw HTML injected at the end of `<head>` on every page |
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Image recommendations
|
|
264
|
+
|
|
265
|
+
| Field | Recommended size / format |
|
|
266
|
+
|---|---|
|
|
267
|
+
| Login background | ≥ 1920 × 1080 px, JPEG or PNG |
|
|
268
|
+
| Login logo | ≥ 256 × 256 px, transparent PNG |
|
|
269
|
+
| Favicon | ≥ 192 × 192 px, PNG or ICO |
|
|
270
|
+
| Navbar logo | Transparent PNG, height ≤ 64 px |
|
|
271
|
+
| Sidebar logo | Transparent PNG, width ≤ 256 px |
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Security notes
|
|
276
|
+
|
|
277
|
+
- **Raw HTML fields** (`Login Page Extra HTML`, `Extra <head> HTML`) are rendered without sanitization and are only editable by Django admin users (staff/superusers).
|
|
278
|
+
- **Custom CSS URL** is validated as a URL by Django's field validator; only `http`/`https` schemes are accepted.
|
|
279
|
+
- AA Customizer works alongside Alliance Auth's built-in **Custom CSS** admin (`/admin/custom_css/customcss/`). The customizer's CSS loads after the built-in one, so it takes precedence.
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## License
|
|
284
|
+
|
|
285
|
+
MIT
|
|
286
|
+
|