Skip to content

Namespace the theme localStorage key (django.admin.theme) to avoid clashing with main project localStorage #160

Description

@mkst

Code of Conduct

  • I agree to follow Django's Code of Conduct

Feature Description

Rename the localStorage key for the /admin page from theme to django.admin.theme

Problem

We use the theme localStorage for our site, decomp.me. We expect the value to be a json string (e.g. "auto", "light" or "dark", etc). When visiting the /admin panel, our localStorage value is stomped on and instead auto is set (no quotes). We have worked around the fact that this is not JSON (and so we fallback to "auto"), but this still stomps on our users preferences.

Request or proposal

proposal

Additional Details

No response

Implementation Suggestions

I have a branch with the change: https://github.com/django/django/compare/main...mkst:django:namespace-admin-theme-key?expand=1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Idea

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions