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.admin', 'django.contrib.admin', ... )
-
Include the material templates URLconf in your project urls.py like this:
.. code-block:: python
urlpatterns = [ path('admin/', include('material.admin.urls')), ]
-
Extend Admin config from
MaterialModelAdmin
.. code-block:: python
from material.admin.options import MaterialModelAdmin from material.admin.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.admin.options import MaterialModelAdmin from material.admin.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.admin.options import MaterialModelAdmin from material.admin.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.4.9.tar.gz
(588.5 kB
view hashes)
Built Distribution
Close
Hashes for django-material-admin-1.4.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec646d66d8534fc080a1c043f6cb67aff2451c958240e73d7d2ce6357c737e91 |
|
MD5 | a44712028166c3b2e81896046ba2bc60 |
|
BLAKE2b-256 | f4e23ed953c77ecc7fb6339e1c404f98f3f4ea31d677f19834f456c4dc5ffbf2 |
Close
Hashes for django_material_admin-1.4.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 577b2d848905bae36ab0f0e4a64eec490378cafa0d98268e0d2792577bd60457 |
|
MD5 | 29889ad14efd9efea42f733d9dfb25be |
|
BLAKE2b-256 | 867aa779c9a5a16c4781736cbd59f1bcbc9841c10bc61cf9cbfb06490f314df3 |