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.0.tar.gz
(588.4 kB
view hashes)
Built Distribution
Close
Hashes for django-material-admin-1.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d6f2e39508bae3db202a133f3c794ed3ddfc882f3432b023bb72ff25eec0a00 |
|
MD5 | eb7d7b20be8aa5fbe0752abd9927af13 |
|
BLAKE2b-256 | e37c899087e2f1ae14eeda1eea94fd40465bc06f423b6c4419bd741938ecb27a |
Close
Hashes for django_material_admin-1.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a449165492b82082c8e2a464266daa412dce357be9663e2011509267bdb24acb |
|
MD5 | 70cdb427f0112c22c774f891205c60a1 |
|
BLAKE2b-256 | b7a499c8d6f07a44a5981b87721e95cac9a08f19fb2260d7616576800382c720 |