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.5.tar.gz
(760.9 kB
view hashes)
Built Distribution
Close
Hashes for django-material-admin-1.4.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58be9cf5da0bae93672f36f53b72a8f40dc3cf3b002793b1d557e4920846e1b3 |
|
MD5 | cebc074e2518aad09f3e886eb1569d0a |
|
BLAKE2b-256 | c7fd3dd12cd97d8635ecb5fe93ec4d09d325d00cb4348577798a9212ff64d68f |
Close
Hashes for django_material_admin-1.4.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2334ee18f5881a105aca120b7e580af046bcc9d488fe5eded6a555ede1e51d5 |
|
MD5 | f7affbd1cef9eb5f180083ec81efb465 |
|
BLAKE2b-256 | 19e78588f970810744dbc5a7e5127c16fd2d3c3aeb9ae67e743df4e2447c367f |