Material Design For Django Administration
Project description
Django Material Design Admin
Quick start
-
Add "django-material-admin" to your INSTALLED_APPS setting like this:
.. code-block:: python
INSTALLED_APPS = ( ... 'material', 'django.contrib.admin', ... )
-
Include the material templates URLconf in your project urls.py like this:
.. code-block:: python
urlpatterns = [ path('admin/', include('material.urls')), ]
-
Extend Admin config from
MaterialModelAdmin
.. code-block:: python
from material.options import MaterialModelAdmin from material.decorators import register from persons.models import Person @register(Person) class PersonAdmin(MaterialModelAdmin): list_display = ('name', 'first_name', 'last_name')
or
.. code-block:: python
from material.options import MaterialModelAdmin from material.sites import site from persons.models import Person class PersonAdmin(MaterialModelAdmin): list_display = ('name', 'first_name', 'last_name') site.register(User)
-
Add icon to the application in
app.py
https://materializecss.com/icons.html.. code-block:: python
from django.apps import AppConfig class PersonsConfig(AppConfig): name = 'persons' icon_name = 'person'
-
Add icon to the MaterialModelAdmin in
admin.py
https://materializecss.com/icons.html.. code-block:: python
from material.options import MaterialModelAdmin from material.decorators import register from persons.models import Person @register(Person) class MaterialPersonAdmin(MaterialModelAdmin): icon_name = 'person'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-material-admin-1.1.15.tar.gz
(364.7 kB
view hashes)
Built Distribution
Close
Hashes for django-material-admin-1.1.15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 185c384a3c7b328a1580499007293e9046fc8bef96b6050ddac38995e01aa828 |
|
MD5 | ce84290452168af6c9e2c047130e068e |
|
BLAKE2b-256 | de21b823e157b66b46199d7e77e6c735d2b0ed2a95a3ec922da23f73778c3e25 |
Close
Hashes for django_material_admin-1.1.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1caf3465672f53070066af99cd2506baee75bd1bc964e1a69221450fc8be3524 |
|
MD5 | 02c24f68ce8f5982c8462c778c39eb70 |
|
BLAKE2b-256 | 495915b60b27dfa1c5971455765a110437c2f61c76cde835e593d344420840f4 |