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.5.3.tar.gz
(598.4 kB
view hashes)
Built Distribution
Close
Hashes for django-material-admin-1.5.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 654ceea6de37fbcfec8f06d73c3af972168201f1f7565fe40249b2b4859707b3 |
|
MD5 | 54ec7825d2a9e4200e4bca6148231970 |
|
BLAKE2b-256 | dc41ba95f704dee3f7b191d4028690691623977f6d5e6746075b35dd69383f46 |
Close
Hashes for django_material_admin-1.5.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6909fb6958bdff1acfc5961d018be24409c42b5769e054cf5025fe1eff6aece9 |
|
MD5 | 8a61392935ea0f07ab47beea475852d7 |
|
BLAKE2b-256 | 5a42eac5b2522ee54238c718160a3016d525d3145bee7b802d1f914489059a17 |