Skip to main content

Django Accounts Center

The account-management layer for django-mvp projects. It gives a signed-in user one place to manage their account, and gives you a way to put more things there as the project grows.

This package is not usable on its own. It renders on the django-mvp app shell (DaisyUI 5 + Tailwind CSS v4 + django-cotton) and expects it.

What it provides

  • An entrance layout. Sign-in, sign-up and recovery pages render as a centered card with your site logo, outside the app shell.
  • Account-management pages. allauth's email, password, two-factor, session and connected-account pages, rendered in django-mvp's Account Center, with a card apiece on its landing page.
  • An integration system. The machinery that lets a third-party app add its own account-management pages to that Account Center.

Integrations

An integration is a gated sub-app that teaches the Account Center about one third-party package. You enable one by adding it to INSTALLED_APPS:

INSTALLED_APPS = ["dac", "dac.allauth", ...]   # future: "dac.stripe", …

From there the integration contributes its own labelled menu group, any overview cards it needs, and its template overrides. What is installed decides which contributions exist.

Because every integration is gated, a project carries only the dependencies of the integrations it turns on. Installing this package pulls in nothing you have not enabled.

Shipped today: dac.allauth, and it is the only one. One limitation is worth knowing before you write your own: an integration's URLs are still mounted by the core app rather than contributed by the integration.

The allauth integration

dac.allauth does not fork allauth's page templates. 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. On top of that it contributes overview cards for email, password, 2FA, sessions and connected accounts, and a menu group whose items appear only for the allauth apps you install.

The core dac app adds the pieces that are not allauth's business: the shared entrance page and its branded card, and a DAC_ICONS easy-icons pack. The AccountCenterMenu the integrations append to is django-mvp's, re-exported from dac.menus so either import reaches the same menu. django-mvp's <c-user.sidebar-menu> picks up an "Account Center" entry and a POST logout form once the URLs are installed.

Scope

This package is deliberately narrow.

  • It requires django-mvp. Account management was taken out of django-mvp core so it could be maintained on its own, not so it could be used elsewhere. There is no standalone mode.
  • It does not provide authentication. allauth does that. This package presents it.
  • It is not a plugin marketplace. The integration pattern is open, so write one for your own project's apps whenever you need to. The set that ships here is curated: an integration is bundled only when it has broad appeal, a clear purpose, and a well-maintained package behind it. Anything narrower belongs in the project that needs it.

The goals this package steers toward are recorded in GOALS.md.

Installation

pip install django-accounts-center[allauth]

1. Settings

INSTALLED_APPS = [
    # ...
    "django.contrib.sites",
    "dac",
    "dac.allauth",              # BEFORE allauth and mvp so its 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

Two includes at the prefix of your choosing. django-mvp's URLconf carries the Account Center's landing page; dac's carries the pages your installed integrations serve, and includes allauth.urls for you:

urlpatterns = [
    path("accounts/", include("mvp.urls")),
    path("accounts/", include("dac.urls")),
    # ...
]

That puts the landing page at /accounts/ under the name account-center, plus all of allauth's URLs (/accounts/login/, /accounts/email/, /accounts/2fa/, …). The prefix is yours to choose — django-mvp does not fix it, and nothing here does either.

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/*.html template 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.
  • Entrance pages: give your own app a signed-out page by extending dac/entrance.html and filling {% block content %}. It brings the same chrome dac's own signed-out pages use. To choose the card width, override {% block entrance %} instead, wrapping <c-dac.entrance size="lg"> around your {% block content %} — the content block moves inside the override, because a template can declare a block only once. The widths are django-mvp's own: sm, md, lg, xl, 2xl, 3xl and 4xl, or full for a card that fills the page. It defaults to 2xl, and a width outside that list falls back to the default.
  • Sub menu: append items (or a labelled mvp.menus.MenuGroup) to dac.menus.AccountCenterMenu from your own menus.py (e.g. a profile-edit page). That menu is django-mvp's, re-exported here.
  • Overview page: it is django-mvp's, and so is the way to add to it — ship your own mvp/account/overview.html extending that same name and add to its card block. Point the account-center URL at your own subclass of mvp.views.AccountCenterView if the page itself needs to differ.
  • Social login icons: dac.allauth ships brand SVGs for the major providers (Google, GitHub, Microsoft, Apple, Facebook, X, LinkedIn, GitLab, Discord, ORCID) in its icons/ template dir. Register them under a django-easy-icons "svg" renderer keyed by allauth provider id (see the example EASY_ICONS setting). provider.html renders them with {% icon provider_id renderer="svg" %}, so a provider without a registered icon raises IconNotFound (caught in development, not shipped broken), and any icon is overridable via your EASY_ICONS config or a template shadow.
  • Styling: there is nothing here to style. The stylesheet is django-mvp's, and this package composes its components and the DaisyUI utilities behind them rather than shipping CSS of its own. Restyle through django-mvp's theming, or through the allauth element overrides above.

Development

git clone https://github.com/SamuelJennings/django-accounts-center.git
cd django-accounts-center
poetry install

# run the example project
python manage.py runserver

# 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

Metadata

Release files for django-accounts-center 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-accounts-center 0.8.0
File Size Uploaded
django_accounts_center-0.8.0.tar.gz 25.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-accounts-center 0.8.0
File Interpreter ABI Platform
django_accounts_center-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 58.2 kB

Release files / django_accounts_center-0.8.0.tar.gz

Download URL django_accounts_center-0.8.0.tar.gz
Size 25.2 kB
Tags Source
SHA-256 checksum
How to use checksums
db7178708a7d611401f0131997a5b13275170261618c7a20b797233c184c650f
BLAKE2b-256 checksum
How to use checksums
d68cafefbdedc64f700d77f464363fd07e64667f6cbcde4544ddf144ff7630cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / django_accounts_center-0.8.0-py3-none-any.whl

Download URL django_accounts_center-0.8.0-py3-none-any.whl
Size 33.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1678fae6fa07f45ad797b2fb11531e2118c56bd22d8c11e4e849fb7020de126
BLAKE2b-256 checksum
How to use checksums
51d60395519d8f9e41d43f3deb8c6f09992de1c08ea5f6b12d4ec367c2bc7f86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page