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.1.tar.gz
(599.1 kB
view hashes)
Built Distribution
Close
Hashes for django-material-admin-1.5.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58d0131384cdcae12118555b7d128daebdc5d3c821df4e62f54751477fce3e1f |
|
MD5 | 86839c0d447838cb8deef9ceb5a01bf1 |
|
BLAKE2b-256 | 1c1825b4bc16088d4b1621c551a67a453ac65533a08720921c0034120148cab0 |
Close
Hashes for django_material_admin-1.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31f75696f085ab825c285d640feb65fb917f9a62d2b86da834ebc5a996fa8a5b |
|
MD5 | 8e58d22e4de5c4d67ef8d8fb40c29e51 |
|
BLAKE2b-256 | e5087b89e7003c1797011d805965e2f7ce56f2fb19e1d11ffa57ec5ad343a706 |