django-admin-interface


Namedjango-admin-interface JSON
Version 0.28.6 PyPI version JSON
download
home_page
Summarydjango's default admin interface with superpowers - customizable themes, popup windows replaced by modals and many other features.
upload_time2024-03-07 09:26:13
maintainer
docs_urlNone
author
requires_python
licenseThe MIT License (MIT) Copyright (c) 2016 - present, Fabio Caccamo - fabio.caccamo@gmail.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords django admin interface responsive flat theme custom ui
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![](https://img.shields.io/pypi/pyversions/django-admin-interface.svg?color=3776AB&logo=python&logoColor=white)](https://www.python.org/)
[![](https://img.shields.io/pypi/djversions/django-admin-interface?color=0C4B33&logo=django&logoColor=white&label=django)](https://www.djangoproject.com/)

[![](https://img.shields.io/pypi/v/django-admin-interface.svg?color=blue&logo=pypi&logoColor=white)](https://pypi.org/project/django-admin-interface/)
[![](https://static.pepy.tech/badge/django-admin-interface/month)](https://pepy.tech/project/django-admin-interface)
[![](https://img.shields.io/github/stars/fabiocaccamo/django-admin-interface?logo=github&style=flat)](https://github.com/fabiocaccamo/django-admin-interface/stargazers)
[![](https://img.shields.io/pypi/l/django-admin-interface.svg?color=blue)](https://github.com/fabiocaccamo/django-admin-interface/blob/main/LICENSE.txt)

[![](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)
[![](https://img.shields.io/github/actions/workflow/status/fabiocaccamo/django-admin-interface/test-package.yml?branch=main&label=build&logo=github)](https://github.com/fabiocaccamo/django-admin-interface)
[![](https://img.shields.io/codecov/c/gh/fabiocaccamo/django-admin-interface?logo=codecov)](https://codecov.io/gh/fabiocaccamo/django-admin-interface)
[![](https://img.shields.io/codacy/grade/21cb657283c04e70b56fb935277a1ad1?logo=codacy)](https://www.codacy.com/app/fabiocaccamo/django-admin-interface)
[![](https://img.shields.io/codeclimate/maintainability/fabiocaccamo/django-admin-interface?logo=code-climate)](https://codeclimate.com/github/fabiocaccamo/django-admin-interface/)
[![](https://img.shields.io/badge/code%20style-black-000000.svg?logo=python&logoColor=black)](https://github.com/psf/black)
[![](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

# django-admin-interface
django-admin-interface is a modern **responsive flat admin interface customizable by the admin itself**.

![django-admin-interface-preview](https://user-images.githubusercontent.com/1035294/35631521-64b0cab8-06a4-11e8-8f57-c04fdfbb7e8b.gif)

## Features
- Beautiful default **django-theme**
- Themes management and customization *(you can **customize admin title, logo and colors**)*
- Responsive
- Related modal *(instead of the old popup window)*
- Environment name/marker
- Language chooser
- Foldable apps *(accordions in the navigation bar)*
- [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
- `NEW` Collapsible inlines
- `NEW` Tabbed fieldsets and inlines
- `NEW` List filter removal links
- `NEW` List filter highlight selected options
- List filter dropdown
- List filter sticky
- Form controls sticky *(pagination and save/delete buttons)*
- Compatibility / style optimizations for:
  - `django-ckeditor`
  - `django-dynamic-raw-id`
  - `django-json-widget`
  - `django-modeltranslation`
  - `django-rangefilter`
  - `django-streamfield`
  - `django-tabbed-admin`
  - `sorl-thumbnail`
- Translated in many languages: `de`, `es`, `fa`, `fr`, `it`, `pl`, `pt_BR`, `ru`, `tr`

## Installation
- Run `pip install django-admin-interface`
- Add `admin_interface` and `colorfield` to `settings.INSTALLED_APPS` **before** `django.contrib.admin`
```python
INSTALLED_APPS = (
    #...
    "admin_interface",
    "colorfield",
    #...
    "django.contrib.admin",
    #...
)

X_FRAME_OPTIONS = "SAMEORIGIN"
SILENCED_SYSTEM_CHECKS = ["security.W019"]
```
- Run `python manage.py migrate`
- Run `python manage.py collectstatic --clear`
- Restart your application server

> [!WARNING]
> if you want use modals instead of popup windows, ensure to add `X_FRAME_OPTIONS = "SAMEORIGIN"` setting.

### Optional features
To make a fieldset start expanded with a `Hide` button to collapse, add the class `"expanded"` to its classes:
```python
class MyModelAdmin(admin.ModelAdmin):
    # ...
    fieldsets = [
        ("Section title", {
            "classes": ("collapse", "expanded"),
            "fields": (...),
        }),
    ]
    # ...
```

## Optional themes
This 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.

##### [Django](https://www.djangoproject.com/) theme (default):
Run `python manage.py loaddata admin_interface_theme_django.json`

##### [Bootstrap](http://getbootstrap.com/) theme:
Run `python manage.py loaddata admin_interface_theme_bootstrap.json`

##### [Foundation](http://foundation.zurb.com/) theme:
Run `python manage.py loaddata admin_interface_theme_foundation.json`

##### [U.S. Web Design Standards](https://standards.usa.gov/) theme:
Run `python manage.py loaddata admin_interface_theme_uswds.json`

### Add more themes
You 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:

1. Export your exact theme as fixture using the `dumpdata` admin command:
`python manage.py dumpdata admin_interface.Theme --indent 4 -o admin_interface_theme_{{name}}.json --pks=N`

2. 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)*.

3. 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)*.

4. Edit the section above to document your theme.

### Add theme support to third-party libraries
You can add **theme support to existing third-party libraries** using the following **CSS variables**:

#### Header

- `--admin-interface-header-background-color`
- `--admin-interface-header-text-color`
- `--admin-interface-header-link-color`
- `--admin-interface-header-link_hover-color`
- `--admin-interface-title-color`
- `--admin-interface-env-color`

#### Logo

- `--admin-interface-logo-color`
- `--admin-interface-logo-default-background-image`
- `--admin-interface-logo-max-width`
- `--admin-interface-logo-max-height`

#### Modules / Links
- `--admin-interface-module-background-color`
- `--admin-interface-module-background-selected-color`
- `--admin-interface-module-border-radius`
- `--admin-interface-module-text-color`
- `--admin-interface-module-link-color`
- `--admin-interface-module-link-selected-color`
- `--admin-interface-module-link-hover-color`
- `--admin-interface-generic-link-color`
- `--admin-interface-generic-link-hover-color`
- `--admin-interface-generic-link-active-color`

#### Buttons
- `--admin-interface-save-button-background-color`
- `--admin-interface-save-button-background-hover-color`
- `--admin-interface-save-button-text-color`
- `--admin-interface-delete-button-background-color`
- `--admin-interface-delete-button-background-hover-color`
- `--admin-interface-delete-button-text-color`

#### Related Modal
- `--admin-interface-related-modal-background-color`
- `--admin-interface-related-modal-background-opacity`
- `--admin-interface-related-modal-border-radius`
- `--admin-interface-related-modal-close-button-display`

## Screenshots
###### Admin login
![django-admin-interface_login](https://cloud.githubusercontent.com/assets/1035294/11240233/55c8d4ba-8df1-11e5-9568-00fdc987ede8.gif)
---
###### Admin dashboard
![django-admin-interface_dashboard](https://cloud.githubusercontent.com/assets/1035294/11240239/627c0362-8df1-11e5-81fa-216366a5d8da.gif)
---
###### Admin themes management
![django-admin-interface_themes_management](https://cloud.githubusercontent.com/assets/1035294/11240245/6cd1c342-8df1-11e5-928b-f22217474d3d.gif)
---
###### Admin theme customization
![django-admin-interface_theme_customization](https://cloud.githubusercontent.com/assets/1035294/11240250/7350d942-8df1-11e5-9b28-f2f54c333cdc.gif)

## Localization
At the moment, this package has been translated into the following languages: `de`, `es`, `fa`, `fr`, `it`, `pl`, `pt_BR`, `tr`.

### Translate into another language

- Run `python -m django makemessages --ignore ".tox" --ignore "venv" --add-location "file" --extension "html,py" --locale "it"` *(example for Italian localization)*

- Update translations in `admin_interface/locale/it/LC_MESSAGES/django.po`

- Run `python -m django compilemessages --ignore ".tox" --ignore "venv"`

### Update translations

If 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:
- Run `tox -e translations`

## Caching

This package uses caching to improve theme load time and overall performance.
You can customise the app caching options using `settings.CACHES["admin_interface"]` setting, otherwise the `"default"` cache will be used:

```python
CACHES = {
    # ...
    "admin_interface": {
        "BACKEND": "django.core.cache.backends.locmem.LocMemCache",
        "TIMEOUT": 60 * 5,
    },
    # ...
}
```

> [!WARNING]
> 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.

## FAQ

### Custom `base-site.html`
> I already have a custom `base_site.html`, how can I make it work?

You can use [django-apptemplates](https://github.com/bittner/django-apptemplates), then add `{% extends "admin_interface:admin/base_site.html" %}` to your `base_site.html`

### Custom `LocaleMiddleware` warning
> 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?

You can simply ignore the warning (this has been discussed [here](https://github.com/fabiocaccamo/django-admin-interface/issues/354))
```python
import warnings

warnings.filterwarnings("ignore", module="admin_interface.templatetags.admin_interface_tags")
```

### Language Chooser not showing
> I have enabled the **Language Chooser**, but it is not visible in the admin, what should I do?

You must configure multilanguage `settings` and `urls` correctly:
```python
LANGUAGES = (
    ("en", _("English")),
    ("it", _("Italiano")),
    ("fr", _("Français")),
    # more than one language is expected here
)
LANGUAGE_CODE = "en"
USE_I18N = True
MIDDLEWARE = [
    # ...
    "django.middleware.locale.LocaleMiddleware",
    # ...
]
```

```python
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.urls import include, path

# ...

urlpatterns = [
    path("i18n/", include("django.conf.urls.i18n")),
]
urlpatterns += i18n_patterns(path("admin/", admin.site.urls))
```

### Open any url in modal window
> 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?

You just need to add `_popup=1` query-string parameter to the urls:
```python
url = reverse(f"admin:myapp_mymodel_change", args=[mymodel_instance.pk])
url = f"{url}?_popup=1"
```

## Testing
```bash
# clone repository
git clone https://github.com/fabiocaccamo/django-admin-interface.git && cd django-admin-interface

# create virtualenv and activate it
python -m venv venv && . venv/bin/activate

# upgrade pip
python -m pip install --upgrade pip

# install requirements
pip install -r requirements.txt -r requirements-test.txt

# install pre-commit to run formatters and linters
pre-commit install --install-hooks

# run tests
tox
# or
python runtests.py
# or
python -m django test --settings "tests.settings"
```

## Contributing
Contributions are always welcome, please follow these steps for submitting good quality PRs:

- :exclamation: **Open an issue**, please don't submit any PR that doesn't refer to an existing issue.
- :computer: **Work on changes**, changes should *preferably* be covered by tests to avoid regressions in the future.
- :globe_with_meridians: **Update the translations** files.
- :test_tube: **Run tests** ensuring that there are no errors.
- :inbox_tray: **Submit a pull-request** and mark it as **"Ready for review"** only if it passes the `CI`.

## License
Released under [MIT License](LICENSE.txt).

---

## Supporting

- :star: Star this project on [GitHub](https://github.com/fabiocaccamo/django-admin-interface)
- :octocat: Follow me on [GitHub](https://github.com/fabiocaccamo)
- :blue_heart: Follow me on [Twitter](https://twitter.com/fabiocaccamo)
- :moneybag: Sponsor me on [Github](https://github.com/sponsors/fabiocaccamo)

## See also

- [`django-colorfield`](https://github.com/fabiocaccamo/django-colorfield) - simple color field for models with a nice color-picker in the admin. 🎨

- [`django-extra-settings`](https://github.com/fabiocaccamo/django-extra-settings) - config and manage typed extra settings using just the django admin. ⚙️

- [`django-maintenance-mode`](https://github.com/fabiocaccamo/django-maintenance-mode) - shows a 503 error page when maintenance-mode is on. 🚧 🛠️

- [`django-redirects`](https://github.com/fabiocaccamo/django-redirects) - redirects with full control. ↪️

- [`django-treenode`](https://github.com/fabiocaccamo/django-treenode) - probably the best abstract model / admin for your tree based stuff. 🌳

- [`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. 📘

- [`python-codicefiscale`](https://github.com/fabiocaccamo/python-codicefiscale) - encode/decode Italian fiscal codes - codifica/decodifica del Codice Fiscale. 🇮🇹 💳

- [`python-fontbro`](https://github.com/fabiocaccamo/python-fontbro) - friendly font operations. 🧢

- [`python-fsutil`](https://github.com/fabiocaccamo/python-fsutil) - file-system utilities for lazy devs. 🧟‍♂️

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "django-admin-interface",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "Fabio Caccamo <fabio.caccamo@gmail.com>",
    "keywords": "django,admin,interface,responsive,flat,theme,custom,ui",
    "author": "",
    "author_email": "Fabio Caccamo <fabio.caccamo@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/04/d4/0662a8464a2bda0c0524dde5c1654e5719b61c93eb766e83e6be7efa78ee/django-admin-interface-0.28.6.tar.gz",
    "platform": null,
    "description": "[![](https://img.shields.io/pypi/pyversions/django-admin-interface.svg?color=3776AB&logo=python&logoColor=white)](https://www.python.org/)\n[![](https://img.shields.io/pypi/djversions/django-admin-interface?color=0C4B33&logo=django&logoColor=white&label=django)](https://www.djangoproject.com/)\n\n[![](https://img.shields.io/pypi/v/django-admin-interface.svg?color=blue&logo=pypi&logoColor=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&style=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&label=build&logo=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&logoColor=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> [!WARNING]\n> 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> [!WARNING]\n> 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> 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> 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> 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\u00e7ais\")),\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> 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 && cd django-admin-interface\n\n# create virtualenv and activate it\npython -m venv venv && . 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-colorfield`](https://github.com/fabiocaccamo/django-colorfield) - simple color field for models with a nice color-picker in the admin. \ud83c\udfa8\n\n- [`django-extra-settings`](https://github.com/fabiocaccamo/django-extra-settings) - config and manage typed extra settings using just the django admin. \u2699\ufe0f\n\n- [`django-maintenance-mode`](https://github.com/fabiocaccamo/django-maintenance-mode) - shows a 503 error page when maintenance-mode is on. \ud83d\udea7 \ud83d\udee0\ufe0f\n\n- [`django-redirects`](https://github.com/fabiocaccamo/django-redirects) - redirects with full control. \u21aa\ufe0f\n\n- [`django-treenode`](https://github.com/fabiocaccamo/django-treenode) - probably the best abstract model / admin for your tree based stuff. \ud83c\udf33\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. \ud83d\udcd8\n\n- [`python-codicefiscale`](https://github.com/fabiocaccamo/python-codicefiscale) - encode/decode Italian fiscal codes - codifica/decodifica del Codice Fiscale. \ud83c\uddee\ud83c\uddf9 \ud83d\udcb3\n\n- [`python-fontbro`](https://github.com/fabiocaccamo/python-fontbro) - friendly font operations. \ud83e\udde2\n\n- [`python-fsutil`](https://github.com/fabiocaccamo/python-fsutil) - file-system utilities for lazy devs. \ud83e\udddf\u200d\u2642\ufe0f\n",
    "bugtrack_url": null,
    "license": "The MIT License (MIT)  Copyright (c) 2016 - present, Fabio Caccamo - fabio.caccamo@gmail.com  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "django's default admin interface with superpowers - customizable themes, popup windows replaced by modals and many other features.",
    "version": "0.28.6",
    "project_urls": {
        "Documentation": "https://github.com/fabiocaccamo/django-admin-interface#readme",
        "Download": "https://github.com/fabiocaccamo/django-admin-interface/releases",
        "Funding": "https://github.com/sponsors/fabiocaccamo/",
        "Homepage": "https://github.com/fabiocaccamo/django-admin-interface",
        "Issues": "https://github.com/fabiocaccamo/django-admin-interface/issues",
        "Twitter": "https://twitter.com/fabiocaccamo"
    },
    "split_keywords": [
        "django",
        "admin",
        "interface",
        "responsive",
        "flat",
        "theme",
        "custom",
        "ui"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6802d8c4d97a36328fe1506d28a15f81ced5e35f38f30ffa06a31981327d6d76",
                "md5": "352a1eed3d3207301831f7368f69de20",
                "sha256": "444dea3caa1c878c2c0210662b0584b8ad9c7235955f0bbd04680733a3526b0f"
            },
            "downloads": -1,
            "filename": "django_admin_interface-0.28.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "352a1eed3d3207301831f7368f69de20",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 250622,
            "upload_time": "2024-03-07T09:26:11",
            "upload_time_iso_8601": "2024-03-07T09:26:11.037080Z",
            "url": "https://files.pythonhosted.org/packages/68/02/d8c4d97a36328fe1506d28a15f81ced5e35f38f30ffa06a31981327d6d76/django_admin_interface-0.28.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "04d40662a8464a2bda0c0524dde5c1654e5719b61c93eb766e83e6be7efa78ee",
                "md5": "88687645fd593ac4a2454263b9c6c549",
                "sha256": "c5dc5ef6865c9683b6ecd630fe588ef369350ee27afb89b24d56e6cdda914355"
            },
            "downloads": -1,
            "filename": "django-admin-interface-0.28.6.tar.gz",
            "has_sig": false,
            "md5_digest": "88687645fd593ac4a2454263b9c6c549",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 196278,
            "upload_time": "2024-03-07T09:26:13",
            "upload_time_iso_8601": "2024-03-07T09:26:13.649164Z",
            "url": "https://files.pythonhosted.org/packages/04/d4/0662a8464a2bda0c0524dde5c1654e5719b61c93eb766e83e6be7efa78ee/django-admin-interface-0.28.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-07 09:26:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fabiocaccamo",
    "github_project": "django-admin-interface#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "django-admin-interface"
}
        
Elapsed time: 0.23104s