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', 'django.contrib.admin', ... )
-
Include the material templates URLconf in your project urls.py like this:
.. code-block:: python
urlpatterns = [ path('admin/', include('material.urls')), ]
-
Extend Admin config from
MaterialModelAdmin
.. code-block:: python
from material.options import MaterialModelAdmin from material.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.options import MaterialModelAdmin from material.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.options import MaterialModelAdmin from material.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.2.4.tar.gz
(366.6 kB
view hashes)
Built Distribution
Close
Hashes for django-material-admin-1.2.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fd88cb8f0cad4631b5b7b5e9c317193fc91882c9a1c2bf90149ca1bfeebee35 |
|
MD5 | 663ac49d9e03177b8f120c8f86d877e5 |
|
BLAKE2b-256 | 39a9bf36495ac788a9ee548527b1728341ab6d29d4b63a12e135d241ba2b4d2b |
Close
Hashes for django_material_admin-1.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8092f6b9836dc756955252f1c441a05e5f91f3d11e8bd2e79520bccd9ed52ea |
|
MD5 | 5dd7d191791d2b532215658292ff2f58 |
|
BLAKE2b-256 | 795abe0a05e20f31c5e8e624a8c051159172f59ef41e5907a8a099ecd0f88bfa |