Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .form_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .listing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
- DJANGO_VERSION=1.8
- DJANGO_VERSION=1.9
- DJANGO_VERSION=1.10
- DJANGO_VERSION=2.2.0

install:
- pip install Django==$DJANGO_VERSION
Expand Down
56 changes: 17 additions & 39 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,17 @@ Overview
========
**"NEW UPDATES"**

- Added Django Admin documentation templates
- Added Django 2.x.x support.

- Fixed Bugs

**"IN VERSION 1.1.5"**
- Added Dashboard Tiles and Icon.

- Added Sortable in admin **change list** page.
- Added edit button on listing.

- 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"
- Added inlined form action buttons

- Icon on dashboard per models.

Documentation
=============
Expand All @@ -73,7 +49,7 @@ Documentation

* Add in urls.py ::

url(r'^admin/', include('djadmin.urls')),
path('admin/', include('djadmin.urls')),

* Run 'python manage.py migrate' for make visitor model ::

Expand Down Expand Up @@ -145,30 +121,32 @@ Documentation

ADMIN_HEADER_TITLE = 'Djadmin Administrator'

* Add 'DASHBOARD_ICONS' for models icons.

Demo
==========
* URL : https://djadmin.herokuapp.com/admin/

* Username : test1234
DASHBOARD_ICONS = {
"MODEL_NAME1": "mdi-car",
"MODEL_NAME2": "mdi-coin",
......
}
* Add Dashboard models that need to show on dashboard.
`ALLOW_DASHBOARD_MODEL = ['Model1', 'Model2', ..]`

* Password : test1234

Screenshot
==========
.. image:: .screen1.png
.. image:: .dashboard.png
:width: 400px

.. image:: .screen2.png
:width: 400px

.. image:: .screen3.png
.. image:: .form_button.png
:width: 400px

.. image:: .screen4.png
:width: 400px

.. image:: .screen5.png
.. image:: .listing.png
:width: 400px

License
Expand Down
84 changes: 80 additions & 4 deletions djadmin/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-10-26 21:47
from __future__ import unicode_literals
# Generated by Django 2.2.5 on 2019-12-09 10:13

from django.conf import settings
from django.db import migrations, models
Expand All @@ -13,9 +11,27 @@ class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('sessions', '0001_initial'),
('contenttypes', '0002_remove_content_type_name'),
]

operations = [
migrations.CreateModel(
name='DjadminField',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, verbose_name='Field Name')),
('type', models.CharField(max_length=30, verbose_name='Field Type')),
('model', models.CharField(max_length=50, verbose_name='Model Name')),
('depth', models.IntegerField(verbose_name='Field Depth')),
('foreignkey_model', models.CharField(blank=True, max_length=50, null=True, verbose_name='Foreign Key Model Name')),
],
options={
'verbose_name': 'Djadmin Field',
'verbose_name_plural': 'Djadmin Fields',
'db_table': 'djadmin_field',
},
),
migrations.CreateModel(
name='Visitor',
fields=[
Expand All @@ -34,12 +50,72 @@ class Migration(migrations.Migration):
('device_name_brand', models.CharField(max_length=20, null=True, verbose_name='Device Brand Name')),
('device_name_model', models.CharField(max_length=20, null=True, verbose_name='Device Model Name')),
('unique_computer_processor', models.CharField(max_length=255, null=True, verbose_name='Computer Processor')),
('latitude', models.DecimalField(decimal_places=6, max_digits=9, null=True, verbose_name='Latitude')),
('longitude', models.DecimalField(decimal_places=6, max_digits=9, null=True, verbose_name='Longitude')),
('http_referer', models.URLField(blank=True, null=True, verbose_name='HTTP_REFERER URL')),
('request_url', models.URLField(null=True, verbose_name='Request URL')),
('name', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')),
('session', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='sessions.Session', verbose_name='Session')),
],
options={
'verbose_name': 'visitor',
'verbose_name_plural': 'visitors',
'ordering': ['visit_datetime'],
'verbose_name': 'visitor',
},
),
migrations.CreateModel(
name='Sortable',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('sort_array', models.TextField(verbose_name='Model Sortable Array')),
('model', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType', verbose_name='Model')),
],
options={
'verbose_name': 'Sortable Model',
'verbose_name_plural': 'Sortable Models',
},
),
migrations.CreateModel(
name='DjadminModelSetting',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('model', models.CharField(max_length=50, verbose_name='Model Name')),
('app_label', models.CharField(max_length=50, verbose_name='Model App Label Name')),
('list_per_page', models.IntegerField(blank=True, help_text='Set list_per_page to control how many items appear on each paginated admin change list page.', null=True, verbose_name='List Per Page')),
('list_max_show_all', models.IntegerField(blank=True, help_text="Set list_max_show_all to control how many items can appear on a 'Show all' admin change list page.", null=True, verbose_name='List Max Show All')),
('actions_on_top', models.BooleanField(default=True, help_text='Controls where on the page the actions bar appears', verbose_name='Actions on Top')),
('actions_on_bottom', models.BooleanField(default=False, verbose_name='Actions on Bottom')),
('has_add_permission', models.BooleanField(default=True, verbose_name='Has Add Permission?')),
('has_change_permission', models.BooleanField(default=True, verbose_name='Has Change Permission?')),
('has_delete_permission', models.BooleanField(default=True, verbose_name='Has Delete Permission?')),
('date_hierarchy', models.ForeignKey(blank=True, help_text='Set date_hierarchy to the name of a DateField or DateTimeField in your model, and the change list page will include a date-based drilldown navigation by that field.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='date_hierarchy', to='djadmin.DjadminField', verbose_name='Date Hierarchy')),
('list_display', models.ManyToManyField(blank=True, help_text='Set list_display to control which fields are displayed on the change list page of the admin.', related_name='list_display', to='djadmin.DjadminField', verbose_name='List Display')),
('list_display_links', models.ManyToManyField(blank=True, help_text='Use list_display_links to control if and which fields in list_display should be linked to the change list page for an object.', related_name='list_display_links', to='djadmin.DjadminField', verbose_name='List Display Link')),
('list_editable', models.ManyToManyField(blank=True, help_text='Set list_editable to a list of field names on the model which will allow editing on the change list page.', related_name='list_editable', to='djadmin.DjadminField', verbose_name='List Editable')),
('list_filter', models.ManyToManyField(blank=True, help_text='Set list_filter to activate filters in the right sidebar of the change list page of the admin', related_name='list_filter', to='djadmin.DjadminField', verbose_name='List Filter')),
('search_fields', models.ManyToManyField(blank=True, help_text='Set search_fields to enable a search box on the admin change list page.', related_name='search_fields', to='djadmin.DjadminField', verbose_name='Search Fields')),
],
options={
'verbose_name': 'Djadmin Model Setting',
'verbose_name_plural': 'Djadmin Model Settings',
'db_table': 'djadmin_model_setting',
'ordering': ['model'],
},
),
migrations.CreateModel(
name='DjadminCard',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, verbose_name='Name of Card')),
('html', models.TextField(verbose_name='HTML Code')),
('location', models.SmallIntegerField(choices=[(0, 'LIST PAGE'), (1, 'FORM PAGE')], help_text='It will help to show this card on selected location for this model', verbose_name='Select Location')),
('date_created', models.DateTimeField(auto_now_add=True)),
('model', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='djadmin.DjadminModelSetting')),
],
options={
'verbose_name': 'Djadmin Card',
'verbose_name_plural': 'Djadmin Cards',
'ordering': ['date_created'],
},
),
]
74 changes: 0 additions & 74 deletions djadmin/migrations/0002_auto_20170128_1519.py

This file was deleted.

70 changes: 0 additions & 70 deletions djadmin/migrations/0003_auto_20170324_0011.py

This file was deleted.

36 changes: 0 additions & 36 deletions djadmin/migrations/0004_auto_20170519_2346.py

This file was deleted.

Loading