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.3.1.tar.gz
(446.5 kB
view hashes)
Built Distribution
Close
Hashes for django-material-admin-1.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b022c5c1e858fdb90332fc243b235fee4bef489171641095bd239b1a27d2b189 |
|
MD5 | 951e904cd7793312969d20959848dff8 |
|
BLAKE2b-256 | ad1a29bc672d1b2bc6f759bfa9b1972f78ee2cdbf2457b1997f9ae6184de7ca5 |
Close
Hashes for django_material_admin-1.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81050d09c21ef3cbab06a1984a92d0aab160741c56fdf7125ac5894192ce2eb8 |
|
MD5 | d8f60e4c0a6210be0552cf0b55d32130 |
|
BLAKE2b-256 | 4ca05c5082c0d95e34b29a719bc88432d69aad680936ca50e58fb0cd06cd3c57 |