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.2.tar.gz
(760.7 kB
view hashes)
Built Distribution
Close
Hashes for django-material-admin-1.4.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8197a7b732893ea836ae24659eab7f493b12fba78576a18e994b6fafd34975aa |
|
MD5 | 6491330c43aee1b611161650af9e5087 |
|
BLAKE2b-256 | cf670498ff293e0ee4b55158556c13441f7f7935bf004561e267cf53f7270005 |
Close
Hashes for django_material_admin-1.4.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab5b10f279d913499b195843edb32207c908961f9b3caa580ed8967cc00872ef |
|
MD5 | b08022084aa64dfd27872d04eb26d8c3 |
|
BLAKE2b-256 | 979e2b03ff3f229e4b72ff468c5e108fd746ff91b45437ed989ae789d970928f |