Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sainipray/djadmin
Djadmin is a django admin theme
https://github.com/sainipray/djadmin
customization django django-admin django-application django-configuration django-settings django-templates material-colors materializecss
Last synced: about 1 month ago
JSON representation
Djadmin is a django admin theme
- Host: GitHub
- URL: https://github.com/sainipray/djadmin
- Owner: sainipray
- License: mit
- Created: 2016-10-31T18:09:31.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-12-10T04:35:43.000Z (almost 4 years ago)
- Last Synced: 2024-09-28T16:40:12.580Z (about 2 months ago)
- Topics: customization, django, django-admin, django-application, django-configuration, django-settings, django-templates, material-colors, materializecss
- Language: JavaScript
- Homepage:
- Size: 2.45 MB
- Stars: 42
- Watchers: 6
- Forks: 17
- Open Issues: 7
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
===============
Djadmin
===============Djadmin is a django admin theme
.. image:: https://img.shields.io/pypi/v/djadmin.svg
:target: https://pypi.python.org/pypi/djadmin.. image:: https://api.travis-ci.org/sainipray/djadmin.svg
:target: https://travis-ci.org/sainipray/djadmin/.. image:: https://img.shields.io/pypi/pyversions/djadmin.svg
:target: https://travis-ci.org/sainipray/djadmin/Overview
========
**"NEW UPDATES"**- Added Django Admin documentation templates
- Fixed Bugs
**"IN VERSION 1.1.5"**
- Added Sortable in admin **change list** page.
- Added Language dropdown.
- Added Configuration Page in admin (In Development).
- Added Some fields in DjadminModelSettings Model.
- Fixed Bugs
**"FEATURES ADDED IN VERSION 1.1.3"**
- Dynamic Django Admin - Admin options like : list_display, list_display_link etc will work dynamic.- Material Design - Djadmin is based on material design.
- Djadmin Cards - It will show html design card on "Change list" or "Change form" page according to model.
- Visior - Add visitor model for administrator location on each time login and show graph of login device
- Forget Password Option - Admin can enable or disable forget password option on admin login page
- Theme Color - Change theme color of admin
- Admin Header Title - Change django admin header title
- Image preview or File information on change form if form has Image field or File field
- Added "Next" and "Prev" for change form. It will display when model have 2 or more rows data and model has default django primary key field "id"
Documentation
=============- Installation -
* Run ::pip install djadmin
* Add 'djadmin' to your INSTALLED_APPS just before 'django.contrib.admin' ::
'djadmin',
* Add middleware in MIDDLEWARE_CLASSES list ::
'djadmin.middleware.DJMiddleware',
* Please make sure you already have 'django.template.context_processors.request' in context_processors of settings. If you don't have, please add it
* Add in urls.py ::
url(r'^admin/', include('djadmin.urls')),
* Run 'python manage.py migrate' for make visitor model ::
python manage.py migrate
* Run 'python manage.py collectstatic' ::
python manage.py collectstatic
* Now you have successfully install djadmin in your project
- Customization -
* Add 'DJADMIN_DYNAMIC_FIELD_DISPLAY' for Enable Django admin dynamic options for models, After enable this option it's need to "migrate" model. default: False ::DJADMIN_DYNAMIC_FIELD_DISPLAY = True
* Inherit DjadminMixin in your admin class of model, No need of inherit 'admin.ModelAdmin'::
from djadmin.mixins import DjadminMixin
from main.models import Book
@admin.register(Book)
class BookAdmin(DjadminMixin):
pass* Another way for register DjadminMixin to Model ::
from djadmin.mixins import DjadminMixin
from main.models import Book
admin.site.register(Book, DjadminMixin)After that you will see DjadminMixin Inherit model name in "DjadmiModelSetting" of admin like below snapshot
then change field values with given field.You will get field to showNote: If any field already define in your admin class of model then that field value in DjadmiModelSetting will not work for field.
* Add 'DJADMIN_FIELD_DEPTH' for define field depth.When any model has ForeignKey relation with another model and next model also has Foreignkey relation with another that define relation depth.default = 1 ::
DJADMIN_FIELD_DEPTH = 2
Ex:
class Publisher(models.Model):
name = models.CharField(max_length=30)class Book(models.Model):
pub = models.ForeignKey(Publisher)class Author(models.Model):
book = models.ForeignKey(Book)So, If we have Author model then depth 2 will create field in Author model: "**book__pub__name**" for access Publisher name from Author model instance.
* Add 'ALLOW_FORGET_PASSWORD_ADMIN' for Enable Forget password option in login page, default: Disable ::
ALLOW_FORGET_PASSWORD_ADMIN = True
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = ''
SERVER_EMAIL = ''
EMAIL_HOST = '' #Ex: Gmail : smtp.gmail.com
EMAIL_PORT = #Ex: Gmail : 587
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'* Add 'ADMIN_COLOR_THEME' for change admin color. you can write directly name of color. default: cyan ::
ADMIN_COLOR_THEME = 'red'
* Add 'ADMIN_HEADER_TITLE' for change admin header title ::
ADMIN_HEADER_TITLE = 'Djadmin Administrator'
Demo
==========
* URL : https://djadmin.herokuapp.com/admin/* Username : test1234
* Password : test1234
Screenshot
==========
.. image:: .screen1.png
:width: 400px.. image:: .screen2.png
:width: 400px.. image:: .screen3.png
:width: 400px.. image:: .screen4.png
:width: 400px.. image:: .screen5.png
:width: 400pxLicense
=======Djadmin is an Open Source project licensed under the terms of the `MIT license `_