============================== Django Material Administration
Quick start
pip install django-material-admin-plus
- Add material.admin and material.admin.default to your INSTALLED_APPS setting instead of django.contrib.admin::
- required
.. code-block:: python
INSTALLED_APPS = (
'material',
'material.admin',
'django.contrib.auth',
...
)
- Include the material templates URLconf in your project urls.py like this:
-
required .. code-block:: python
from django.contrib import admin from django.urls import path
urlpatterns = [ path('admin/', admin.site.urls), ]
- Register your models in admin.py.
.. code-block:: python
from django.contrib.admin import ModelAdmin, register
from persons.models import Person
@register(Person)
class PersonAdmin(ModelAdmin):
list_display = ('name', 'first_name', 'last_name')
- Add icon to the application in app.py and specify the app usage in init.py
https://materializecss.com/icons.html
- optional
init.py
.. code-block:: python
default_app_config = 'persons.apps.PersonsConfig'
apps.py
.. code-block:: python
from django.apps import AppConfig
class PersonsConfig(AppConfig):
name = 'persons'
icon_name = 'person'
- Add icon to the MaterialModelAdmin in admin.py
Material icon's name sources:
https://materializecss.com/icons.html
https://material.io/resources/icons/?style=baseline
- optional
.. code-block:: python
from django.contrib.admin import ModelAdmin, register
from persons.models import Person
@register(Person)
class MaterialPersonAdmin(ModelAdmin):
icon_name = 'person'
- Add Admin site configurations to settings.py file:
- optional ##########################################################
.. code-block:: python
MATERIAL_ADMIN_SITE = {
'HEADER': _('Your site header'), # Admin site header
'TITLE': _('Your site title'), # Admin site title
'FAVICON': 'path/to/favicon', # Admin site favicon (path to static should be specified)
'MAIN_BG_COLOR': 'color', # Admin site main color, css color should be specified
'MAIN_HOVER_COLOR': 'color', # Admin site main hover color, css color should be specified
'PROFILE_PICTURE': 'path/to/image', # Admin site profile picture (path to static should be specified)
'PROFILE_BG': 'path/to/image', # Admin site profile background (path to static should be specified)
'LOGIN_LOGO': 'path/to/image', # Admin site logo on login page (path to static should be specified)
'LOGOUT_BG': 'path/to/image', # Admin site background on login/logout pages (path to static should be specified)
'SHOW_THEMES': True, # Show default admin themes button
'TRAY_REVERSE': True, # Hide object-tools and additional-submit-line by default
'NAVBAR_REVERSE': True, # Hide side navbar by default
'SHOW_COUNTS': True, # Show instances counts for each model
'APP_ICONS': { # Set icons for applications(lowercase), including 3rd party apps, {'application_name': 'material_icon_name', ...}
'sites': 'send',
},
'MODEL_ICONS': { # Set icons for models(lowercase), including 3rd party models, {'model_name': 'material_icon_name', ...}
'site': 'contact_mail',
}
}
##########################################################
Metadata
Release files for django-material-admin-plus 1.8.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_material_admin_plus-1.8.18.tar.gz | 781.3 kB | Without provenance | Details for django_material_admin_plus-1.8.18.tar.gz |
Release files / django_material_admin_plus-1.8.18.tar.gz
| Download URL | django_material_admin_plus-1.8.18.tar.gz |
|---|---|
| Size | 781.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4669257ee8deaf618d6c46da00046665018f0fba6d82ddb39d722be1c867c580
|
|
BLAKE2b-256 checksum How to use checksums |
db23d6f0bb501bb62597d4e65ec4269ee2fecf7e6fd331b12cc329dc5caf5a31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.10
|
Security for django-material-admin-plus 1.8.18
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.