Django Accounts Center
A complete, polished account-management UI for django-allauth, built on the django-mvp app shell (DaisyUI 5 + Tailwind CSS v4 + django-cotton).
How it works
dac does not fork allauth's page templates. Instead it overrides allauth's three layouts and its ~22 element templates:
allauth/layouts/entrance.html— login, signup, password reset, sign-in codes, … render as a centered card (no app shell) with your site logo.allauth/layouts/manage.html→dac/base.html— email, password, MFA, sessions and connected-accounts pages render inside the normal django-mvp shell with an "Account Center" sub menu beside the content.allauth/elements/*.html— every{% element %}(button, field, form, panel, alert, badge, provider button, table, …) maps to DaisyUI markup.
Because allauth's own stock page templates do the rendering, every allauth
feature and configuration variation works automatically — passkeys,
login-by-code, email verification by code, phone numbers, SOCIALACCOUNT_ONLY,
MFA (TOTP / WebAuthn / recovery codes / trust), user sessions — now and in
future allauth releases. dac adds on top:
- Account Center overview page (
account-centerURL): dashboard cards summarising email, password, 2FA, sessions and connected accounts. - Sidebar user menu integration: django-mvp's
<c-user.sidebar-menu>automatically shows an "Account Center" entry and a POST logout form once dac's URLs are installed. AccountCenterMenu(django-flex-menus): the internal sub menu, with items appearing only for the allauth apps you actually install.DAC_ICONSeasy-icons pack and a prebuiltdac.cssstylesheet.
Integrations are gated sub-apps: the core dac app ships the Account
Center shell (layout, overview page, menu), and each third-party integration
is opted into individually via INSTALLED_APPS — mirroring django-mvp's
guarded-integrations philosophy. Install only what you use:
INSTALLED_APPS = ["dac", "dac.allauth", ...] # future: "dac.stripe", …
Each integration contributes its own labelled menu group, overview cards
(via dac_overview_template / dac_overview_context hooks on its
AppConfig), URLs, and template overrides.
Installation
pip install django-accounts-center[allauth]
1. Settings
INSTALLED_APPS = [
# ...
"django.contrib.sites",
"dac",
"dac.allauth", # BEFORE allauth so template overrides win
"mvp",
"allauth",
"allauth.account",
"allauth.socialaccount", # optional
"allauth.mfa", # optional
"allauth.usersessions", # optional
"easy_icons",
"flex_menu",
"django_cotton",
# ...
]
SITE_ID = 1
MIDDLEWARE = [
# ...
"allauth.account.middleware.AccountMiddleware",
]
AUTHENTICATION_BACKENDS = [
"django.contrib.auth.backends.ModelBackend",
"allauth.account.auth_backends.AuthenticationBackend",
]
TEMPLATES = [{
# ...
"APP_DIRS": True,
"OPTIONS": {"context_processors": [
"django.template.context_processors.request",
# ...
"mvp.context_processors.mvp_config",
]},
}]
# django-mvp shell: show the user menu at the bottom of the sidebar.
MVP_CONFIG = {
"layout": {
"sidebar": {"footer": ["user.sidebar-menu"]},
},
}
# Icons: mvp's Bootstrap Icons pack + dac's account icons.
EASY_ICONS = {
"default": {
"renderer": "easy_icons.renderers.ProviderRenderer",
"config": {"tag": "i"},
"packs": ["mvp.utils.BS5_ICONS", "dac.icons.DAC_ICONS"],
},
}
FLEX_MENUS = {
"renderers": {
"sidebar": "mvp.renderers.SidebarRenderer",
"dock": "mvp.renderers.MobileFooterNavRenderer",
},
}
LOGIN_URL = "account_login"
LOGIN_REDIRECT_URL = "/accounts/"
2. URLs
dac's URLconf includes allauth.urls for you — mount it once:
urlpatterns = [
path("accounts/", include("dac.urls")),
# ...
]
This registers the account-center overview page at /accounts/ plus all of
allauth's URLs (/accounts/login/, /accounts/email/, /accounts/2fa/, …).
3. Migrate
python manage.py migrate
That's it. Anonymous users get centered entrance pages; authenticated users reach the Account Center from the user menu at the bottom of the sidebar.
Customisation
- Re-skin everything: override any
allauth/elements/*.htmltemplate in your project — it applies across all allauth pages at once. - Page-level tweaks: override individual allauth page templates the normal Django way (your project templates win over dac's and allauth's). Prefer element overrides — per-page forks are what this package exists to avoid.
- Sub menu: append items (or a labelled
mvp.menus.MenuGroup) todac.menus.AccountCenterMenufrom your ownmenus.py(e.g. a profile-edit page). Items may declareurl_namesprefixes inextra_contextso breadcrumbs resolve their sub-pages. - Overview page: subclass
dac.views.AccountCenterViewand point theaccount-centerURL at it, or overridedac/account_center.html. - Social login icons:
dac.allauthships brand SVGs for the major providers (Google, GitHub, Microsoft, Apple, Facebook, X, LinkedIn, GitLab, Discord, ORCID) in itsicons/template dir; register them under a django-easy-icons"svg"renderer keyed by allauth provider id (see the exampleEASY_ICONSsetting).provider.htmlrenders them with{% icon provider_id renderer="svg" %}, so a provider without a registered icon raisesIconNotFound(caught in development, not shipped broken), and any icon is overridable via yourEASY_ICONSconfig or a template shadow. - Styling: dac ships a prebuilt
dac.css(Tailwind v4 + DaisyUI 5 over both mvp's and dac's templates). If your project runs its own Tailwind build, add dac's templates as a source alongside mvp's (seeassets/tailwind.css) and override thestylesblock.
Development
git clone https://github.com/SamuelJennings/django-accounts-center.git
cd django-accounts-center
poetry install
npm install
# run the example project
python manage.py runserver
# rebuild the shipped stylesheet after template changes
npm run build:css
# tests
pytest
The example/ project exercises an aggressive allauth configuration
(passkeys, login-by-code, email verification by code, MFA, three social
providers) and tests/ includes an architecture guard
(tests/test_architecture.py) that fails if anyone reintroduces per-page
allauth template forks.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_accounts_center-0.7.0.tar.gz.
File metadata
- Download URL: django_accounts_center-0.7.0.tar.gz
- Upload date:
- Size: 66.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f632f5880a89433f9e65537f41877a7e864ae01a91cb6a01045a25aba5d06097
|
|
| MD5 |
43162763df7579ba24f282e090478c8c
|
|
| BLAKE2b-256 |
e7238a3f9d0a7a403407a47006f20cbb8fbda902fd1b6db0f88da08da38823e9
|
Provenance
The following attestation bundles were made for django_accounts_center-0.7.0.tar.gz:
Publisher:
on-release-main.yml on django-mvp/django-accounts-center
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_accounts_center-0.7.0.tar.gz -
Subject digest:
f632f5880a89433f9e65537f41877a7e864ae01a91cb6a01045a25aba5d06097 - Sigstore transparency entry: 2217826851
- Sigstore integration time:
-
Permalink:
django-mvp/django-accounts-center@45206107cef34ecd1b15aca72d6b4bdb3866c290 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/django-mvp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
on-release-main.yml@45206107cef34ecd1b15aca72d6b4bdb3866c290 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file django_accounts_center-0.7.0-py3-none-any.whl.
File metadata
- Download URL: django_accounts_center-0.7.0-py3-none-any.whl
- Upload date:
- Size: 84.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c0355cf45ab2bf813a7c83e16e4570afb6624a07c7de88cd4b2ce27b2fbcccd
|
|
| MD5 |
79ef21abc2dc4fd196ce1107db47661d
|
|
| BLAKE2b-256 |
e4f81f7f98f8ce3e89b01e27a6f4f760f75677ae4026a30d6f861b44aef374d7
|
Provenance
The following attestation bundles were made for django_accounts_center-0.7.0-py3-none-any.whl:
Publisher:
on-release-main.yml on django-mvp/django-accounts-center
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_accounts_center-0.7.0-py3-none-any.whl -
Subject digest:
6c0355cf45ab2bf813a7c83e16e4570afb6624a07c7de88cd4b2ce27b2fbcccd - Sigstore transparency entry: 2217827421
- Sigstore integration time:
-
Permalink:
django-mvp/django-accounts-center@45206107cef34ecd1b15aca72d6b4bdb3866c290 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/django-mvp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
on-release-main.yml@45206107cef34ecd1b15aca72d6b4bdb3866c290 -
Trigger Event:
workflow_run
-
Statement type: