{"id":13415495,"url":"https://github.com/fabiocaccamo/django-admin-interface","last_synced_at":"2025-05-13T15:11:24.112Z","repository":{"id":38413332,"uuid":"44974847","full_name":"fabiocaccamo/django-admin-interface","owner":"fabiocaccamo","description":":superhero: :zap: django's default admin interface with superpowers - customizable themes, popup windows replaced by modals and many other features.","archived":false,"fork":false,"pushed_at":"2025-05-12T16:56:30.000Z","size":1036,"stargazers_count":1927,"open_issues_count":16,"forks_count":191,"subscribers_count":32,"default_branch":"main","last_synced_at":"2025-05-12T17:59:31.643Z","etag":null,"topics":["admin","colors","custom","customizable","django","enviroment","enviroments","flat","interface","logo","modal","modals","popup","python","responsive","settings","theme","ui","window","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabiocaccamo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["fabiocaccamo"],"polar":"fabiocaccamo","ko_fi":"fabiocaccamo","liberapay":"fabiocaccamo","tidelift":"pypi/django-admin-interface","custom":["https://www.buymeacoffee.com/fabiocaccamo","https://www.paypal.me/fabiocaccamo"]}},"created_at":"2015-10-26T14:46:36.000Z","updated_at":"2025-05-12T06:48:02.000Z","dependencies_parsed_at":"2023-09-28T22:20:40.270Z","dependency_job_id":"34b9757a-3d38-470f-825d-9a3c57e4331b","html_url":"https://github.com/fabiocaccamo/django-admin-interface","commit_stats":{"total_commits":693,"total_committers":33,"mean_commits":21.0,"dds":"0.11832611832611828","last_synced_commit":"3ed84fb071a1bdf620713af0f3a99fe7a2bc71fb"},"previous_names":[],"tags_count":123,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiocaccamo%2Fdjango-admin-interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiocaccamo%2Fdjango-admin-interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiocaccamo%2Fdjango-admin-interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiocaccamo%2Fdjango-admin-interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiocaccamo","download_url":"https://codeload.github.com/fabiocaccamo/django-admin-interface/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253969259,"owners_count":21992263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admin","colors","custom","customizable","django","enviroment","enviroments","flat","interface","logo","modal","modals","popup","python","responsive","settings","theme","ui","window","windows"],"created_at":"2024-07-30T21:00:49.737Z","updated_at":"2025-05-13T15:11:19.096Z","avatar_url":"https://github.com/fabiocaccamo.png","language":"Python","funding_links":["https://github.com/sponsors/fabiocaccamo","https://polar.sh/fabiocaccamo","https://ko-fi.com/fabiocaccamo","https://liberapay.com/fabiocaccamo","https://tidelift.com/funding/github/pypi/django-admin-interface","https://www.buymeacoffee.com/fabiocaccamo","https://www.paypal.me/fabiocaccamo"],"categories":["Third-Party Packages","Admin interface","Packages to install at your project","Python","HarmonyOS","管理界面","django-admin-interface","Best Django Admin Interface Resources","Admin UI","Admin Enhancements"],"sub_categories":["Admin","Alternative Themes","Windows Manager","Admin Themes","Django Admin Themes \u0026 UI Enhancements"],"readme":"[![](https://img.shields.io/pypi/pyversions/django-admin-interface.svg?color=3776AB\u0026logo=python\u0026logoColor=white)](https://www.python.org/)\n[![](https://img.shields.io/pypi/djversions/django-admin-interface?color=0C4B33\u0026logo=django\u0026logoColor=white\u0026label=django)](https://www.djangoproject.com/)\n\n[![](https://img.shields.io/pypi/v/django-admin-interface.svg?color=blue\u0026logo=pypi\u0026logoColor=white)](https://pypi.org/project/django-admin-interface/)\n[![](https://static.pepy.tech/badge/django-admin-interface/month)](https://pepy.tech/project/django-admin-interface)\n[![](https://img.shields.io/github/stars/fabiocaccamo/django-admin-interface?logo=github\u0026style=flat)](https://github.com/fabiocaccamo/django-admin-interface/stargazers)\n[![](https://img.shields.io/pypi/l/django-admin-interface.svg?color=blue)](https://github.com/fabiocaccamo/django-admin-interface/blob/main/LICENSE.txt)\n\n[![](https://results.pre-commit.ci/badge/github/fabiocaccamo/django-admin-interface/main.svg)](https://results.pre-commit.ci/latest/github/fabiocaccamo/django-admin-interface/main)\n[![](https://img.shields.io/github/actions/workflow/status/fabiocaccamo/django-admin-interface/test-package.yml?branch=main\u0026label=build\u0026logo=github)](https://github.com/fabiocaccamo/django-admin-interface)\n[![](https://img.shields.io/codecov/c/gh/fabiocaccamo/django-admin-interface?logo=codecov)](https://codecov.io/gh/fabiocaccamo/django-admin-interface)\n[![](https://img.shields.io/codacy/grade/21cb657283c04e70b56fb935277a1ad1?logo=codacy)](https://www.codacy.com/app/fabiocaccamo/django-admin-interface)\n[![](https://img.shields.io/codeclimate/maintainability/fabiocaccamo/django-admin-interface?logo=code-climate)](https://codeclimate.com/github/fabiocaccamo/django-admin-interface/)\n[![](https://img.shields.io/badge/code%20style-black-000000.svg?logo=python\u0026logoColor=black)](https://github.com/psf/black)\n[![](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n# django-admin-interface\ndjango-admin-interface is a modern **responsive flat admin interface customizable by the admin itself**.\n\n![django-admin-interface-preview](https://user-images.githubusercontent.com/1035294/35631521-64b0cab8-06a4-11e8-8f57-c04fdfbb7e8b.gif)\n\n## Features\n- Beautiful default **django-theme**\n- Themes management and customization *(you can **customize admin title, logo and colors**)*\n- Responsive\n- Related modal *(instead of the old popup window)*\n- Environment name/marker\n- Language chooser\n- Foldable apps *(accordions in the navigation bar)*\n- [Collapsible fieldsets](https://docs.djangoproject.com/en/4.0/ref/contrib/admin/#django.contrib.admin.ModelAdmin.fieldsets) can have their initial state expanded instead of collapsed\n- `NEW` Collapsible inlines\n- `NEW` Tabbed fieldsets and inlines\n- `NEW` List filter removal links\n- `NEW` List filter highlight selected options\n- List filter dropdown\n- List filter sticky\n- Form controls sticky *(pagination and save/delete buttons)*\n- Compatibility / style optimizations for:\n  - `django-ckeditor`\n  - `django-dynamic-raw-id`\n  - `django-json-widget`\n  - `django-modeltranslation`\n  - `django-rangefilter`\n  - `django-streamfield`\n  - `django-tabbed-admin`\n  - `sorl-thumbnail`\n- Translated in many languages: `de`, `es`, `fa`, `fr`, `it`, `pl`, `pt_BR`, `ru`, `tr`\n\n## Installation\n- Run `pip install django-admin-interface`\n- Add `admin_interface` and `colorfield` to `settings.INSTALLED_APPS` **before** `django.contrib.admin`\n```python\nINSTALLED_APPS = (\n    #...\n    \"admin_interface\",\n    \"colorfield\",\n    #...\n    \"django.contrib.admin\",\n    #...\n)\n\nX_FRAME_OPTIONS = \"SAMEORIGIN\"\nSILENCED_SYSTEM_CHECKS = [\"security.W019\"]\n```\n- Run `python manage.py migrate`\n- Run `python manage.py collectstatic --clear`\n- Restart your application server\n\n\u003e [!WARNING]\n\u003e if you want use modals instead of popup windows, ensure to add `X_FRAME_OPTIONS = \"SAMEORIGIN\"` setting.\n\n### Optional features\nTo make a fieldset start expanded with a `Hide` button to collapse, add the class `\"expanded\"` to its classes:\n```python\nclass MyModelAdmin(admin.ModelAdmin):\n    # ...\n    fieldsets = [\n        (\"Section title\", {\n            \"classes\": (\"collapse\", \"expanded\"),\n            \"fields\": (...),\n        }),\n    ]\n    # ...\n```\n\n## Optional themes\nThis package ships with optional themes as fixtures, they can be installed using the [loaddata admin command](https://docs.djangoproject.com/en/1.11/ref/django-admin/#django-admin-loaddata). Optional themes are activated on installation.\n\n##### [Django](https://www.djangoproject.com/) theme (default):\nRun `python manage.py loaddata admin_interface_theme_django.json`\n\n##### [Bootstrap](http://getbootstrap.com/) theme:\nRun `python manage.py loaddata admin_interface_theme_bootstrap.json`\n\n##### [Foundation](http://foundation.zurb.com/) theme:\nRun `python manage.py loaddata admin_interface_theme_foundation.json`\n\n##### [U.S. Web Design Standards](https://standards.usa.gov/) theme:\nRun `python manage.py loaddata admin_interface_theme_uswds.json`\n\n### Add more themes\nYou can add a theme you've created through the admin to this repository by [sending us a PR](http://makeapullrequest.com/). Here are the steps to follow to add:\n\n1. Export your exact theme as fixture using the `dumpdata` admin command:\n`python manage.py dumpdata admin_interface.Theme --indent 4 -o admin_interface_theme_{{name}}.json --pks=N`\n\n2. Copy the generated json file into the fixtures folder *(making sure its name starts with* `admin_interface_theme_` *to avoid clashes with fixtures that might be provided by other third party apps)*.\n\n3. Remove the `pk` from the fixture and make sure the `active` field is set to `true` *(in this way a theme is automatically activated when installed)*.\n\n4. Edit the section above to document your theme.\n\n### Add theme support to third-party libraries\nYou can add **theme support to existing third-party libraries** using the following **CSS variables**:\n\n#### Header\n\n- `--admin-interface-header-background-color`\n- `--admin-interface-header-text-color`\n- `--admin-interface-header-link-color`\n- `--admin-interface-header-link_hover-color`\n- `--admin-interface-title-color`\n- `--admin-interface-env-color`\n\n#### Logo\n\n- `--admin-interface-logo-color`\n- `--admin-interface-logo-default-background-image`\n- `--admin-interface-logo-max-width`\n- `--admin-interface-logo-max-height`\n\n#### Modules / Links\n- `--admin-interface-module-background-color`\n- `--admin-interface-module-background-selected-color`\n- `--admin-interface-module-border-radius`\n- `--admin-interface-module-text-color`\n- `--admin-interface-module-link-color`\n- `--admin-interface-module-link-selected-color`\n- `--admin-interface-module-link-hover-color`\n- `--admin-interface-generic-link-color`\n- `--admin-interface-generic-link-hover-color`\n- `--admin-interface-generic-link-active-color`\n\n#### Buttons\n- `--admin-interface-save-button-background-color`\n- `--admin-interface-save-button-background-hover-color`\n- `--admin-interface-save-button-text-color`\n- `--admin-interface-delete-button-background-color`\n- `--admin-interface-delete-button-background-hover-color`\n- `--admin-interface-delete-button-text-color`\n\n#### Related Modal\n- `--admin-interface-related-modal-background-color`\n- `--admin-interface-related-modal-background-opacity`\n- `--admin-interface-related-modal-border-radius`\n- `--admin-interface-related-modal-close-button-display`\n\n## Screenshots\n###### Admin login\n![django-admin-interface_login](https://cloud.githubusercontent.com/assets/1035294/11240233/55c8d4ba-8df1-11e5-9568-00fdc987ede8.gif)\n---\n###### Admin dashboard\n![django-admin-interface_dashboard](https://cloud.githubusercontent.com/assets/1035294/11240239/627c0362-8df1-11e5-81fa-216366a5d8da.gif)\n---\n###### Admin themes management\n![django-admin-interface_themes_management](https://cloud.githubusercontent.com/assets/1035294/11240245/6cd1c342-8df1-11e5-928b-f22217474d3d.gif)\n---\n###### Admin theme customization\n![django-admin-interface_theme_customization](https://cloud.githubusercontent.com/assets/1035294/11240250/7350d942-8df1-11e5-9b28-f2f54c333cdc.gif)\n\n## Localization\nAt the moment, this package has been translated into the following languages: `de`, `es`, `fa`, `fr`, `it`, `pl`, `pt_BR`, `tr`.\n\n### Translate into another language\n\n- Run `python -m django makemessages --ignore \".tox\" --ignore \"venv\" --add-location \"file\" --extension \"html,py\" --locale \"it\"` *(example for Italian localization)*\n\n- Update translations in `admin_interface/locale/it/LC_MESSAGES/django.po`\n\n- Run `python -m django compilemessages --ignore \".tox\" --ignore \"venv\"`\n\n### Update translations\n\nIf you do some changes to the project, remember to update translations, because if the translations files are not up-to-date, the `lint` step in the CI will fail:\n- Run `tox -e translations`\n\n## Caching\n\nThis package uses caching to improve theme load time and overall performance.\nYou can customise the app caching options using `settings.CACHES[\"admin_interface\"]` setting, otherwise the `\"default\"` cache will be used:\n\n```python\nCACHES = {\n    # ...\n    \"admin_interface\": {\n        \"BACKEND\": \"django.core.cache.backends.locmem.LocMemCache\",\n        \"TIMEOUT\": 60 * 5,\n    },\n    # ...\n}\n```\n\n\u003e [!WARNING]\n\u003e There is a [known compatibility issue](https://github.com/fabiocaccamo/django-admin-interface/issues/356) when using this package with `django-redis`, more specifically, using the `JSONSerializer` the following error is raised: `TypeError: Object of type Theme is not JSON serializable`, to mitigate this problem, simply use a specific cache for this app that does not use any `json` serializer.\n\n## FAQ\n\n### Custom `base-site.html`\n\u003e I already have a custom `base_site.html`, how can I make it work?\n\nYou can use [django-apptemplates](https://github.com/bittner/django-apptemplates), then add `{% extends \"admin_interface:admin/base_site.html\" %}` to your `base_site.html`\n\n### Custom `LocaleMiddleware` warning\n\u003e I'm using a `django.middleware.locale.LocaleMiddleware` subclass, but I see an unnecessary warning for missing `django.middleware.locale.LocaleMiddleware`, what can I do?\n\nYou can simply ignore the warning (this has been discussed [here](https://github.com/fabiocaccamo/django-admin-interface/issues/354))\n```python\nimport warnings\n\nwarnings.filterwarnings(\"ignore\", module=\"admin_interface.templatetags.admin_interface_tags\")\n```\n\n### Language Chooser not showing\n\u003e I have enabled the **Language Chooser**, but it is not visible in the admin, what should I do?\n\nYou must configure multilanguage `settings` and `urls` correctly:\n```python\nLANGUAGES = (\n    (\"en\", _(\"English\")),\n    (\"it\", _(\"Italiano\")),\n    (\"fr\", _(\"Français\")),\n    # more than one language is expected here\n)\nLANGUAGE_CODE = \"en\"\nUSE_I18N = True\nMIDDLEWARE = [\n    # ...\n    \"django.middleware.locale.LocaleMiddleware\",\n    # ...\n]\n```\n\n```python\nfrom django.conf.urls.i18n import i18n_patterns\nfrom django.contrib import admin\nfrom django.urls import include, path\n\n# ...\n\nurlpatterns = [\n    path(\"i18n/\", include(\"django.conf.urls.i18n\")),\n]\nurlpatterns += i18n_patterns(path(\"admin/\", admin.site.urls))\n```\n\n### Open any url in modal window\n\u003e I have an application with some cross-links in the admin and I would like to open them in modal windows instead of same/new window, how can I do?\n\nYou just need to add `_popup=1` query-string parameter to the urls:\n```python\nurl = reverse(f\"admin:myapp_mymodel_change\", args=[mymodel_instance.pk])\nurl = f\"{url}?_popup=1\"\n```\n\n## Testing\n```bash\n# clone repository\ngit clone https://github.com/fabiocaccamo/django-admin-interface.git \u0026\u0026 cd django-admin-interface\n\n# create virtualenv and activate it\npython -m venv venv \u0026\u0026 . venv/bin/activate\n\n# upgrade pip\npython -m pip install --upgrade pip\n\n# install requirements\npip install -r requirements.txt -r requirements-test.txt\n\n# install pre-commit to run formatters and linters\npre-commit install --install-hooks\n\n# run tests\ntox\n# or\npython runtests.py\n# or\npython -m django test --settings \"tests.settings\"\n```\n\n## Contributing\nContributions are always welcome, please follow these steps for submitting good quality PRs:\n\n- :exclamation: **Open an issue**, please don't submit any PR that doesn't refer to an existing issue.\n- :computer: **Work on changes**, changes should *preferably* be covered by tests to avoid regressions in the future.\n- :globe_with_meridians: **Update the translations** files.\n- :test_tube: **Run tests** ensuring that there are no errors.\n- :inbox_tray: **Submit a pull-request** and mark it as **\"Ready for review\"** only if it passes the `CI`.\n\n## License\nReleased under [MIT License](LICENSE.txt).\n\n---\n\n## Supporting\n\n- :star: Star this project on [GitHub](https://github.com/fabiocaccamo/django-admin-interface)\n- :octocat: Follow me on [GitHub](https://github.com/fabiocaccamo)\n- :blue_heart: Follow me on [Twitter](https://twitter.com/fabiocaccamo)\n- :moneybag: Sponsor me on [Github](https://github.com/sponsors/fabiocaccamo)\n\n## See also\n\n- [`django-cache-cleaner`](https://github.com/fabiocaccamo/django-cache-cleaner) - clear the entire cache or individual caches easily using the admin panel or management command. 🧹✨\n\n- [`django-colorfield`](https://github.com/fabiocaccamo/django-colorfield) - simple color field for models with a nice color-picker in the admin. 🎨\n\n- [`django-extra-settings`](https://github.com/fabiocaccamo/django-extra-settings) - config and manage typed extra settings using just the django admin. ⚙️\n\n- [`django-maintenance-mode`](https://github.com/fabiocaccamo/django-maintenance-mode) - shows a 503 error page when maintenance-mode is on. 🚧 🛠️\n\n- [`django-redirects`](https://github.com/fabiocaccamo/django-redirects) - redirects with full control. ↪️\n\n- [`django-treenode`](https://github.com/fabiocaccamo/django-treenode) - probably the best abstract model / admin for your tree based stuff. 🌳\n\n- [`python-benedict`](https://github.com/fabiocaccamo/python-benedict) - dict subclass with keylist/keypath support, I/O shortcuts (base64, csv, json, pickle, plist, query-string, toml, xml, yaml) and many utilities. 📘\n\n- [`python-codicefiscale`](https://github.com/fabiocaccamo/python-codicefiscale) - encode/decode Italian fiscal codes - codifica/decodifica del Codice Fiscale. 🇮🇹 💳\n\n- [`python-fontbro`](https://github.com/fabiocaccamo/python-fontbro) - friendly font operations. 🧢\n\n- [`python-fsutil`](https://github.com/fabiocaccamo/python-fsutil) - file-system utilities for lazy devs. 🧟‍♂️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiocaccamo%2Fdjango-admin-interface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiocaccamo%2Fdjango-admin-interface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiocaccamo%2Fdjango-admin-interface/lists"}