Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 451679d565 | |||
| e579134152 | |||
| 6e57cf558c | |||
| d00428c30a | |||
| 9becccce39 | |||
| 64a9e8371c | |||
| 8a85334f68 | |||
| 41a5ba61c8 | |||
| c780ccfbcf | |||
| 6091c886d7 | |||
| d05009ce44 | |||
| ef1eefb084 |
@@ -55,3 +55,5 @@ docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
screenshots
|
||||
TODO.txt
|
||||
|
||||
@@ -9,15 +9,19 @@ env:
|
||||
- TOX_ENV=py34-18
|
||||
- TOX_ENV=py34-19
|
||||
- TOX_ENV=py34-110
|
||||
- TOX_ENV=py34-20
|
||||
- TOX_ENV=py34-master
|
||||
- TOX_ENV=py35-18
|
||||
- TOX_ENV=py35-19
|
||||
- TOX_ENV=py35-110
|
||||
- TOX_ENV=py35-20
|
||||
- TOX_ENV=py35-master
|
||||
matrix:
|
||||
include:
|
||||
- python: "3.6"
|
||||
env: TOX_ENV=py36-111
|
||||
- python: "3.6"
|
||||
env: TOX_ENV=py36-20
|
||||
- python: "3.6"
|
||||
env: TOX_ENV=py36-master
|
||||
allow_failures:
|
||||
|
||||
@@ -18,7 +18,7 @@ django-admin-interface is a modern **responsive flat admin interface customizabl
|
||||
|
||||
## Requirements
|
||||
- Python 2.7, 3.4, 3.5, 3.6
|
||||
- Django 1.7, 1.8, 1.9, 1.10, 1.11
|
||||
- Django 1.7, 1.8, 1.9, 1.10, 1.11, 2.0
|
||||
|
||||
## Installation
|
||||
- Run `pip install django-admin-interface`
|
||||
@@ -27,7 +27,7 @@ django-admin-interface is a modern **responsive flat admin interface customizabl
|
||||
INSTALLED_APPS = (
|
||||
#...
|
||||
'admin_interface',
|
||||
'flat_responsive',
|
||||
'flat_responsive', # only if django version < 2.0
|
||||
'flat', # only if django version < 1.9
|
||||
'colorfield',
|
||||
#...
|
||||
|
||||
+2
-2
@@ -20,13 +20,13 @@ Requirements
|
||||
------------
|
||||
|
||||
- Python 2.7, 3.4, 3.5, 3.6
|
||||
- Django 1.7, 1.8, 1.9, 1.10, 1.11
|
||||
- Django 1.7, 1.8, 1.9, 1.10, 1.11, 2.0
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
- Run ``pip install django-admin-interface``
|
||||
- Add ``admin_interface``, ``flat_responsive``, ``flat`` *(only if django version < 1.9)* and ``colorfield`` to ``settings.INSTALLED_APPS`` **before** ``django.contrib.admin``
|
||||
- Add ``admin_interface``, ``flat_responsive`` *(only if django version < 2.0)*, ``flat`` *(only if django version < 1.9)* and ``colorfield`` to ``settings.INSTALLED_APPS`` **before** ``django.contrib.admin``
|
||||
- Run ``python manage.py migrate``
|
||||
- Run ``python manage.py collectstatic``
|
||||
- Restart your application server
|
||||
|
||||
@@ -15,6 +15,13 @@ class ThemeAdmin(admin.ModelAdmin):
|
||||
'classes': ('wide', ),
|
||||
'fields': ('name', 'active', )
|
||||
}),
|
||||
('Enviroment', {
|
||||
'classes': ('wide', ),
|
||||
'fields': (
|
||||
'env',
|
||||
'env_visible',
|
||||
)
|
||||
}),
|
||||
('Logo', {
|
||||
'classes': ('wide', ),
|
||||
'fields': (
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
import colorfield.fields
|
||||
|
||||
|
||||
@@ -14,33 +16,165 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='Theme',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('name', models.CharField(default=b'Django', max_length=50)),
|
||||
('active', models.BooleanField(default=True)),
|
||||
('title', models.CharField(default=b'Django administration', max_length=50, blank=True)),
|
||||
('title_visible', models.BooleanField(default=True, verbose_name=b'visible')),
|
||||
('logo', models.FileField(upload_to=b'admin-interface/logo/', blank=True)),
|
||||
('logo_visible', models.BooleanField(default=True, verbose_name=b'visible')),
|
||||
('css_header_background_color', colorfield.fields.ColorField(default=b'#0C4B33', help_text=b'#0C4B33', max_length=10, verbose_name=b'background color', blank=True)),
|
||||
('css_header_title_color', colorfield.fields.ColorField(default=b'#F5DD5D', help_text=b'#F5DD5D', max_length=10, verbose_name=b'title color', blank=True)),
|
||||
('css_header_text_color', colorfield.fields.ColorField(default=b'#44B78B', help_text=b'#44B78B', max_length=10, verbose_name=b'text color', blank=True)),
|
||||
('css_header_link_color', colorfield.fields.ColorField(default=b'#FFFFFF', help_text=b'#FFFFFF', max_length=10, verbose_name=b'link color', blank=True)),
|
||||
('css_header_link_hover_color', colorfield.fields.ColorField(default=b'#C9F0DD', help_text=b'#C9F0DD', max_length=10, verbose_name=b'link hover color', blank=True)),
|
||||
('css_module_background_color', colorfield.fields.ColorField(default=b'#44B78B', help_text=b'#44B78B', max_length=10, verbose_name=b'background color', blank=True)),
|
||||
('css_module_text_color', colorfield.fields.ColorField(default=b'#FFFFFF', help_text=b'#FFFFFF', max_length=10, verbose_name=b'text color', blank=True)),
|
||||
('css_module_link_color', colorfield.fields.ColorField(default=b'#FFFFFF', help_text=b'#FFFFFF', max_length=10, verbose_name=b'link color', blank=True)),
|
||||
('css_module_link_hover_color', colorfield.fields.ColorField(default=b'#C9F0DD', help_text=b'#C9F0DD', max_length=10, verbose_name=b'link hover color', blank=True)),
|
||||
('css_module_rounded_corners', models.BooleanField(default=True, verbose_name=b'rounded corners')),
|
||||
('css_generic_link_color', colorfield.fields.ColorField(default=b'#0C3C26', help_text=b'#0C3C26', max_length=10, verbose_name=b'link color', blank=True)),
|
||||
('css_generic_link_hover_color', colorfield.fields.ColorField(default=b'#156641', help_text=b'#156641', max_length=10, verbose_name=b'link hover color', blank=True)),
|
||||
('css_save_button_background_color', colorfield.fields.ColorField(default=b'#0C4B33', help_text=b'#0C4B33', max_length=10, verbose_name=b'background color', blank=True)),
|
||||
('css_save_button_background_hover_color', colorfield.fields.ColorField(default=b'#0C3C26', help_text=b'#0C3C26', max_length=10, verbose_name=b'background hover color', blank=True)),
|
||||
('css_save_button_text_color', colorfield.fields.ColorField(default=b'#FFFFFF', help_text=b'#FFFFFF', max_length=10, verbose_name=b'text color', blank=True)),
|
||||
('css_delete_button_background_color', colorfield.fields.ColorField(default=b'#BA2121', help_text=b'#BA2121', max_length=10, verbose_name=b'background color', blank=True)),
|
||||
('css_delete_button_background_hover_color', colorfield.fields.ColorField(default=b'#A41515', help_text=b'#A41515', max_length=10, verbose_name=b'background hover color', blank=True)),
|
||||
('css_delete_button_text_color', colorfield.fields.ColorField(default=b'#FFFFFF', help_text=b'#FFFFFF', max_length=10, verbose_name=b'text color', blank=True)),
|
||||
('css', models.TextField(blank=True)),
|
||||
('list_filter_dropdown', models.BooleanField(default=False)),
|
||||
('id',
|
||||
models.AutoField(
|
||||
verbose_name='ID',
|
||||
serialize=False,
|
||||
auto_created=True,
|
||||
primary_key=True)),
|
||||
('name',
|
||||
models.CharField(
|
||||
default=b'Django',
|
||||
max_length=50)),
|
||||
('active',
|
||||
models.BooleanField(
|
||||
default=True)),
|
||||
('title',
|
||||
models.CharField(
|
||||
default=b'Django administration',
|
||||
max_length=50,
|
||||
blank=True)),
|
||||
('title_visible',
|
||||
models.BooleanField(
|
||||
default=True,
|
||||
verbose_name=b'visible')),
|
||||
('logo',
|
||||
models.FileField(
|
||||
upload_to=b'admin-interface/logo/',
|
||||
blank=True)),
|
||||
('logo_visible',
|
||||
models.BooleanField(
|
||||
default=True,
|
||||
verbose_name=b'visible')),
|
||||
('css_header_background_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#0C4B33',
|
||||
help_text=b'#0C4B33',
|
||||
max_length=10,
|
||||
verbose_name=b'background color',
|
||||
blank=True)),
|
||||
('css_header_title_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#F5DD5D',
|
||||
help_text=b'#F5DD5D',
|
||||
max_length=10,
|
||||
verbose_name=b'title color',
|
||||
blank=True)),
|
||||
('css_header_text_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#44B78B',
|
||||
help_text=b'#44B78B',
|
||||
max_length=10,
|
||||
verbose_name=b'text color',
|
||||
blank=True)),
|
||||
('css_header_link_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#FFFFFF',
|
||||
help_text=b'#FFFFFF',
|
||||
max_length=10,
|
||||
verbose_name=b'link color',
|
||||
blank=True)),
|
||||
('css_header_link_hover_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#C9F0DD',
|
||||
help_text=b'#C9F0DD',
|
||||
max_length=10,
|
||||
verbose_name=b'link hover color',
|
||||
blank=True)),
|
||||
('css_module_background_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#44B78B',
|
||||
help_text=b'#44B78B',
|
||||
max_length=10,
|
||||
verbose_name=b'background color',
|
||||
blank=True)),
|
||||
('css_module_text_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#FFFFFF',
|
||||
help_text=b'#FFFFFF',
|
||||
max_length=10,
|
||||
verbose_name=b'text color',
|
||||
blank=True)),
|
||||
('css_module_link_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#FFFFFF',
|
||||
help_text=b'#FFFFFF',
|
||||
max_length=10,
|
||||
verbose_name=b'link color',
|
||||
blank=True)),
|
||||
('css_module_link_hover_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#C9F0DD',
|
||||
help_text=b'#C9F0DD',
|
||||
max_length=10,
|
||||
verbose_name=b'link hover color',
|
||||
blank=True)),
|
||||
('css_module_rounded_corners',
|
||||
models.BooleanField(
|
||||
default=True,
|
||||
verbose_name=b'rounded corners')),
|
||||
('css_generic_link_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#0C3C26',
|
||||
help_text=b'#0C3C26',
|
||||
max_length=10,
|
||||
verbose_name=b'link color',
|
||||
blank=True)),
|
||||
('css_generic_link_hover_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#156641',
|
||||
help_text=b'#156641',
|
||||
max_length=10,
|
||||
verbose_name=b'link hover color',
|
||||
blank=True)),
|
||||
('css_save_button_background_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#0C4B33',
|
||||
help_text=b'#0C4B33',
|
||||
max_length=10,
|
||||
verbose_name=b'background color',
|
||||
blank=True)),
|
||||
('css_save_button_background_hover_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#0C3C26',
|
||||
help_text=b'#0C3C26',
|
||||
max_length=10,
|
||||
verbose_name=b'background hover color',
|
||||
blank=True)),
|
||||
('css_save_button_text_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#FFFFFF',
|
||||
help_text=b'#FFFFFF',
|
||||
max_length=10,
|
||||
verbose_name=b'text color',
|
||||
blank=True)),
|
||||
('css_delete_button_background_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#BA2121',
|
||||
help_text=b'#BA2121',
|
||||
max_length=10,
|
||||
verbose_name=b'background color',
|
||||
blank=True)),
|
||||
('css_delete_button_background_hover_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#A41515',
|
||||
help_text=b'#A41515',
|
||||
max_length=10,
|
||||
verbose_name=b'background hover color',
|
||||
blank=True)),
|
||||
('css_delete_button_text_color',
|
||||
colorfield.fields.ColorField(
|
||||
default=b'#FFFFFF',
|
||||
help_text=b'#FFFFFF',
|
||||
max_length=10,
|
||||
verbose_name=b'text color',
|
||||
blank=True)),
|
||||
('css',
|
||||
models.TextField(
|
||||
blank=True)),
|
||||
('list_filter_dropdown',
|
||||
models.BooleanField(
|
||||
default=False)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Theme',
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
import colorfield.fields
|
||||
|
||||
|
||||
@@ -15,26 +17,44 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='list_filter_dropdown',
|
||||
field=models.BooleanField(default=False, verbose_name=b'use dropdown'),
|
||||
field=models.BooleanField(
|
||||
default=False,
|
||||
verbose_name=b'use dropdown'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='theme',
|
||||
name='related_modal_active',
|
||||
field=models.BooleanField(default=True, verbose_name=b'active'),
|
||||
field=models.BooleanField(
|
||||
default=True,
|
||||
verbose_name=b'active'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='theme',
|
||||
name='related_modal_background_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default=b'#000000', help_text=b'#000000', max_length=10, verbose_name=b'background color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default=b'#000000',
|
||||
help_text=b'#000000',
|
||||
max_length=10,
|
||||
verbose_name=b'background color'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='theme',
|
||||
name='related_modal_background_opacity',
|
||||
field=models.FloatField(choices=[(0.1, b'10%'), (0.2, b'20%'), (0.3, b'30%'), (0.4, b'40%'), (0.5, b'50%'), (0.6, b'60%'), (0.7, b'70%'), (0.8, b'80%'), (0.9, b'90%')], default=0.2, help_text=b'20%', verbose_name=b'background opacity'),
|
||||
field=models.FloatField(
|
||||
choices=[
|
||||
(0.1, b'10%'), (0.2, b'20%'), (0.3, b'30%'),
|
||||
(0.4, b'40%'), (0.5, b'50%'), (0.6, b'60%'),
|
||||
(0.7, b'70%'), (0.8, b'80%'), (0.9, b'90%')],
|
||||
default=0.2,
|
||||
help_text=b'20%',
|
||||
verbose_name=b'background opacity'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='theme',
|
||||
name='related_modal_rounded_corners',
|
||||
field=models.BooleanField(default=True, verbose_name=b'rounded corners'),
|
||||
field=models.BooleanField(
|
||||
default=True,
|
||||
verbose_name=b'rounded corners'),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import colorfield.fields
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
@@ -15,11 +17,19 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='theme',
|
||||
name='logo_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#FFFFFF', help_text='#FFFFFF', max_length=10, verbose_name='logo color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#FFFFFF',
|
||||
help_text='#FFFFFF',
|
||||
max_length=10,
|
||||
verbose_name='logo color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='logo',
|
||||
field=models.FileField(blank=True, help_text='(leave blank to use the default Django logo)', upload_to='admin-interface/logo/'),
|
||||
field=models.FileField(
|
||||
blank=True,
|
||||
help_text='(leave blank to use the default Django logo)',
|
||||
upload_to='admin-interface/logo/'),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.1 on 2017-05-23 15:37
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
@@ -15,6 +15,8 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='theme',
|
||||
name='recent_actions_visible',
|
||||
field=models.BooleanField(default=True, verbose_name='visible'),
|
||||
field=models.BooleanField(
|
||||
default=True,
|
||||
verbose_name='visible'),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.2 on 2017-06-09 14:52
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import colorfield.fields
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
@@ -16,136 +17,250 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_delete_button_background_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#BA2121', help_text='#BA2121', max_length=10, verbose_name='background color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#BA2121',
|
||||
help_text='#BA2121',
|
||||
max_length=10,
|
||||
verbose_name='background color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_delete_button_background_hover_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#A41515', help_text='#A41515', max_length=10, verbose_name='background hover color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#A41515',
|
||||
help_text='#A41515',
|
||||
max_length=10,
|
||||
verbose_name='background hover color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_delete_button_text_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#FFFFFF', help_text='#FFFFFF', max_length=10, verbose_name='text color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#FFFFFF',
|
||||
help_text='#FFFFFF',
|
||||
max_length=10,
|
||||
verbose_name='text color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_generic_link_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#0C3C26', help_text='#0C3C26', max_length=10, verbose_name='link color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#0C3C26',
|
||||
help_text='#0C3C26',
|
||||
max_length=10,
|
||||
verbose_name='link color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_generic_link_hover_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#156641', help_text='#156641', max_length=10, verbose_name='link hover color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#156641',
|
||||
help_text='#156641',
|
||||
max_length=10,
|
||||
verbose_name='link hover color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_header_background_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#0C4B33', help_text='#0C4B33', max_length=10, verbose_name='background color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#0C4B33',
|
||||
help_text='#0C4B33',
|
||||
max_length=10,
|
||||
verbose_name='background color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_header_link_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#FFFFFF', help_text='#FFFFFF', max_length=10, verbose_name='link color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#FFFFFF',
|
||||
help_text='#FFFFFF',
|
||||
max_length=10,
|
||||
verbose_name='link color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_header_link_hover_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#C9F0DD', help_text='#C9F0DD', max_length=10, verbose_name='link hover color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#C9F0DD',
|
||||
help_text='#C9F0DD',
|
||||
max_length=10,
|
||||
verbose_name='link hover color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_header_text_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#44B78B', help_text='#44B78B', max_length=10, verbose_name='text color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#44B78B',
|
||||
help_text='#44B78B',
|
||||
max_length=10,
|
||||
verbose_name='text color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_module_background_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#44B78B', help_text='#44B78B', max_length=10, verbose_name='background color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#44B78B',
|
||||
help_text='#44B78B',
|
||||
max_length=10,
|
||||
verbose_name='background color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_module_link_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#FFFFFF', help_text='#FFFFFF', max_length=10, verbose_name='link color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#FFFFFF',
|
||||
help_text='#FFFFFF',
|
||||
max_length=10,
|
||||
verbose_name='link color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_module_link_hover_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#C9F0DD', help_text='#C9F0DD', max_length=10, verbose_name='link hover color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#C9F0DD',
|
||||
help_text='#C9F0DD',
|
||||
max_length=10,
|
||||
verbose_name='link hover color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_module_rounded_corners',
|
||||
field=models.BooleanField(default=True, verbose_name='rounded corners'),
|
||||
field=models.BooleanField(
|
||||
default=True,
|
||||
verbose_name='rounded corners'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_module_text_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#FFFFFF', help_text='#FFFFFF', max_length=10, verbose_name='text color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#FFFFFF',
|
||||
help_text='#FFFFFF',
|
||||
max_length=10,
|
||||
verbose_name='text color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_save_button_background_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#0C4B33', help_text='#0C4B33', max_length=10, verbose_name='background color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#0C4B33',
|
||||
help_text='#0C4B33',
|
||||
max_length=10,
|
||||
verbose_name='background color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_save_button_background_hover_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#0C3C26', help_text='#0C3C26', max_length=10, verbose_name='background hover color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#0C3C26',
|
||||
help_text='#0C3C26',
|
||||
max_length=10,
|
||||
verbose_name='background hover color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='css_save_button_text_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#FFFFFF', help_text='#FFFFFF', max_length=10, verbose_name='text color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#FFFFFF',
|
||||
help_text='#FFFFFF',
|
||||
max_length=10,
|
||||
verbose_name='text color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='list_filter_dropdown',
|
||||
field=models.BooleanField(default=False, verbose_name='use dropdown'),
|
||||
field=models.BooleanField(
|
||||
default=False,
|
||||
verbose_name='use dropdown'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='logo_visible',
|
||||
field=models.BooleanField(default=True, verbose_name='visible'),
|
||||
field=models.BooleanField(
|
||||
default=True,
|
||||
verbose_name='visible'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='name',
|
||||
field=models.CharField(default='Django', max_length=50),
|
||||
field=models.CharField(
|
||||
default='Django',
|
||||
max_length=50),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='related_modal_active',
|
||||
field=models.BooleanField(default=True, verbose_name='active'),
|
||||
field=models.BooleanField(
|
||||
default=True,
|
||||
verbose_name='active'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='related_modal_background_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#000000', help_text='#000000', max_length=10, verbose_name='background color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#000000',
|
||||
help_text='#000000',
|
||||
max_length=10,
|
||||
verbose_name='background color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='related_modal_background_opacity',
|
||||
field=models.FloatField(choices=[(0.1, '10%'), (0.2, '20%'), (0.3, '30%'), (0.4, '40%'), (0.5, '50%'), (0.6, '60%'), (0.7, '70%'), (0.8, '80%'), (0.9, '90%')], default=0.2, help_text='20%', verbose_name='background opacity'),
|
||||
field=models.FloatField(
|
||||
choices=[
|
||||
(0.1, '10%'), (0.2, '20%'), (0.3, '30%'),
|
||||
(0.4, '40%'), (0.5, '50%'), (0.6, '60%'),
|
||||
(0.7, '70%'), (0.8, '80%'), (0.9, '90%')],
|
||||
default=0.2,
|
||||
help_text='20%',
|
||||
verbose_name='background opacity'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='related_modal_rounded_corners',
|
||||
field=models.BooleanField(default=True, verbose_name='rounded corners'),
|
||||
field=models.BooleanField(
|
||||
default=True,
|
||||
verbose_name='rounded corners'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='title',
|
||||
field=models.CharField(blank=True, default='Django administration', max_length=50),
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
default='Django administration',
|
||||
max_length=50),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='title_color',
|
||||
field=colorfield.fields.ColorField(blank=True, default='#F5DD5D', help_text='#F5DD5D', max_length=10, verbose_name='title color'),
|
||||
field=colorfield.fields.ColorField(
|
||||
blank=True,
|
||||
default='#F5DD5D',
|
||||
help_text='#F5DD5D',
|
||||
max_length=10,
|
||||
verbose_name='title color'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='title_visible',
|
||||
field=models.BooleanField(default=True, verbose_name='visible'),
|
||||
field=models.BooleanField(
|
||||
default=True,
|
||||
verbose_name='visible'),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11 on 2017-08-24 10:49
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
@@ -15,6 +15,10 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='theme',
|
||||
name='favicon',
|
||||
field=models.FileField(blank=True, help_text='(.ico|.png|.gif - 16x16|32x32 px)', upload_to='admin-interface/favicon/', verbose_name='favicon'),
|
||||
field=models.FileField(
|
||||
blank=True,
|
||||
help_text='(.ico|.png|.gif - 16x16|32x32 px)',
|
||||
upload_to='admin-interface/favicon/',
|
||||
verbose_name='favicon'),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('admin_interface', '0007_add_favicon'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='theme',
|
||||
name='related_modal_background_opacity',
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
('0.1', '10%'), ('0.2', '20%'), ('0.3', '30%'),
|
||||
('0.4', '40%'), ('0.5', '50%'), ('0.6', '60%'),
|
||||
('0.7', '70%'), ('0.8', '80%'), ('0.9', '90%')],
|
||||
default='0.3',
|
||||
help_text='20%',
|
||||
max_length=5,
|
||||
verbose_name='background opacity'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11 on 2018-01-31 11:00
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('admin_interface', '0008_change_related_modal_background_opacity_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='theme',
|
||||
name='env',
|
||||
field=models.CharField(choices=[('development', 'Development'), ('testing', 'Testing'), ('staging', 'Staging'), ('production', 'Production')], default='development', max_length=50, verbose_name='enviroment'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='theme',
|
||||
name='env_visible',
|
||||
field=models.BooleanField(default=True, verbose_name='visible'),
|
||||
),
|
||||
]
|
||||
+25
-11
@@ -73,6 +73,19 @@ class Theme(models.Model):
|
||||
upload_to='admin-interface/favicon/', blank=True,
|
||||
help_text='(.ico|.png|.gif - 16x16|32x32 px)', verbose_name='favicon')
|
||||
|
||||
env_choices = (
|
||||
('development', 'Development', ),
|
||||
('testing', 'Testing', ),
|
||||
('staging', 'Staging', ),
|
||||
('production', 'Production', ),
|
||||
)
|
||||
env = models.CharField(
|
||||
max_length=50,
|
||||
choices=env_choices,
|
||||
default='development', verbose_name='enviroment')
|
||||
env_visible = models.BooleanField(
|
||||
default=True, verbose_name='visible')
|
||||
|
||||
css_header_background_color = ColorField(
|
||||
blank=True, default='#0C4B33', help_text='#0C4B33',
|
||||
max_length=10, verbose_name='background color')
|
||||
@@ -136,19 +149,20 @@ class Theme(models.Model):
|
||||
blank=True, default='#000000', help_text='#000000',
|
||||
max_length=10, verbose_name='background color')
|
||||
related_modal_background_opacity_choices = (
|
||||
(0.1, '10%', ),
|
||||
(0.2, '20%', ),
|
||||
(0.3, '30%', ),
|
||||
(0.4, '40%', ),
|
||||
(0.5, '50%', ),
|
||||
(0.6, '60%', ),
|
||||
(0.7, '70%', ),
|
||||
(0.8, '80%', ),
|
||||
(0.9, '90%', ),
|
||||
('0.1', '10%', ),
|
||||
('0.2', '20%', ),
|
||||
('0.3', '30%', ),
|
||||
('0.4', '40%', ),
|
||||
('0.5', '50%', ),
|
||||
('0.6', '60%', ),
|
||||
('0.7', '70%', ),
|
||||
('0.8', '80%', ),
|
||||
('0.9', '90%', ),
|
||||
)
|
||||
related_modal_background_opacity = models.FloatField(
|
||||
related_modal_background_opacity = models.CharField(
|
||||
max_length=5,
|
||||
choices=related_modal_background_opacity_choices,
|
||||
default=0.2, help_text='20%', verbose_name='background opacity')
|
||||
default='0.3', help_text='20%', verbose_name='background opacity')
|
||||
related_modal_rounded_corners = models.BooleanField(
|
||||
default=True, verbose_name='rounded corners')
|
||||
|
||||
|
||||
@@ -64,4 +64,9 @@ https://github.com/fabiocaccamo/django-admin-interface
|
||||
<span>{% if theme.title %}{% trans theme.title %}{% else %}{% trans 'Django administration' %}{% endif %}</span>
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block welcome-msg %}
|
||||
{% get_admin_interface_theme as theme %}
|
||||
{% if theme.env_visible %}<span class="enviroment-label {{ theme.env }}"></span> - {% endif %}{{ block.super }}<br>
|
||||
{% endblock %}
|
||||
@@ -181,6 +181,11 @@ body.admin-interface .paginator a.showall:visited {
|
||||
width: auto;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
/* fix inline horizontal scroll caused by checkbox-row */
|
||||
.admin-interface form .form-row > div.checkbox-row {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -265,13 +270,22 @@ body.admin-interface .paginator a.showall:visited {
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
.admin-interface .inline-group .tabular tr td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.admin-interface .inline-group .tabular tr td.delete {
|
||||
text-align:right;
|
||||
padding-right:15px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.admin-interface .inline-group .tabular tr td input[type="checkbox"] {
|
||||
margin: 7px 0px;
|
||||
}
|
||||
|
||||
.admin-interface .inline-group .tabular tr td.delete a.inline-deletelink {
|
||||
margin-top:2px;
|
||||
margin-top:4px;
|
||||
overflow:hidden;
|
||||
text-indent:9999px;
|
||||
}
|
||||
@@ -297,57 +311,76 @@ body.admin-interface .paginator a.showall:visited {
|
||||
}
|
||||
|
||||
/* improve responsive selector */
|
||||
.admin-interface .selector.stacked {
|
||||
width: 480px;
|
||||
|
||||
/* fix [stacked, not-stacked] equalize horizontal and vertical select padding for selector (stacked and not) */
|
||||
.admin-interface .selector .selector-available select,
|
||||
.admin-interface .selector .selector-chosen select {
|
||||
padding: 7px 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* fix [not-stacked] selector */
|
||||
.admin-interface .selector:not(.stacked) {
|
||||
width: auto;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.admin-interface .selector.stacked .selector-chooser {
|
||||
margin-left: calc(50% - 25px);
|
||||
}
|
||||
|
||||
@media (min-width: 767px) and (max-width: 1124px){
|
||||
.admin-interface .selector {
|
||||
width: 610px;
|
||||
display: block;
|
||||
}
|
||||
.admin-interface .selector .selector-available,
|
||||
.admin-interface .selector .selector-chosen {
|
||||
width: 285px;
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
.admin-interface .selector .selector-filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.admin-interface .selector .selector-filter label {
|
||||
margin: 0;
|
||||
}
|
||||
.admin-interface .selector .selector-available input {
|
||||
width: auto;
|
||||
flex: 1 1;
|
||||
}
|
||||
.admin-interface .selector select {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px){
|
||||
.admin-interface .selector.stacked {
|
||||
margin-right: 0px;
|
||||
}
|
||||
.admin-interface .selector.stacked .selector-available select {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
/* equalize selectors height by adding the height of the .selector-available filter-bar */
|
||||
/* fix [not-stacked] equalize selectors height by adding the height of the .selector-available filter-bar */
|
||||
.admin-interface .selector:not(.stacked) .selector-chosen select {
|
||||
height: calc(46px + 17.2em) !important;
|
||||
}
|
||||
|
||||
/* equalize horizontal and vertical select padding */
|
||||
.admin-interface .selector .selector-available select,
|
||||
.admin-interface .selector .selector-chosen select {
|
||||
padding: 7px 10px;
|
||||
@media (max-width: 1024px){
|
||||
.admin-interface .related-widget-wrapper-link + .selector:not(.stacked) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 767px) and (max-width: 1124px){
|
||||
|
||||
.admin-interface .selector:not(.stacked) .selector-available,
|
||||
.admin-interface .selector:not(.stacked) .selector-chosen {
|
||||
width: 285px;
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
.admin-interface .selector:not(.stacked) .selector-filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.admin-interface .selector:not(.stacked) .selector-filter label {
|
||||
margin: 0;
|
||||
}
|
||||
.admin-interface .selector:not(.stacked) .selector-available input {
|
||||
width: auto;
|
||||
flex: 1 1;
|
||||
}
|
||||
.admin-interface .selector:not(.stacked) select {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/* fix [not-stacked] in tabular inline context */
|
||||
.admin-interface .tabular.inline-related .selector:not(.stacked) {
|
||||
width: 795px;
|
||||
float: none;
|
||||
display: inline-block;
|
||||
margin-right: 22px;
|
||||
}
|
||||
|
||||
.admin-interface .tabular.inline-related .form-row .related-widget-wrapper-link:first-child {
|
||||
float: right;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* fix [stacked] in tabular inline context */
|
||||
.admin-interface .tabular.inline-related .selector.stacked {
|
||||
width: 480px;
|
||||
float: none;
|
||||
display: inline-block;
|
||||
margin-right: 22px;
|
||||
}
|
||||
|
||||
/* fix [stacked] chooser align center */
|
||||
.admin-interface .selector.stacked .selector-chooser {
|
||||
margin-left:calc(50% - 30px);
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -97,10 +97,7 @@ https://github.com/Ikimea/ckeditor-light-theme
|
||||
|
||||
@media (max-width: 767px){
|
||||
|
||||
.django-ckeditor-widget {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.admin-interface .django-ckeditor-widget,
|
||||
.admin-interface .cke {
|
||||
width: 100% !important;
|
||||
}
|
||||
@@ -117,4 +114,13 @@ https://github.com/Ikimea/ckeditor-light-theme
|
||||
.admin-interface .cke_contents {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.admin-interface .tabular .django-ckeditor-widget,
|
||||
.admin-interface .tabular .cke {
|
||||
width: 400px !important;
|
||||
}
|
||||
|
||||
.admin-interface .tabular .cke_contents {
|
||||
height: 90px !important;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
__version__ = '0.5.6'
|
||||
__version__ = '0.6.0'
|
||||
|
||||
@@ -4,18 +4,19 @@
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
import os
|
||||
# import pypandoc
|
||||
|
||||
exec(open('admin_interface/version.py').read())
|
||||
|
||||
github_url = 'https://github.com/fabiocaccamo'
|
||||
package_name = 'django-admin-interface'
|
||||
package_path = os.path.abspath(os.path.dirname(__file__))
|
||||
# long_description = pypandoc.convert(os.path.join(package_path, 'README.md'), 'rst')
|
||||
long_description_file_path = os.path.join(package_path, 'README.rst')
|
||||
long_description = ''
|
||||
with open(long_description_file_path) as f:
|
||||
long_description = f.read()
|
||||
try:
|
||||
with open(long_description_file_path) as f:
|
||||
long_description = f.read()
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
setup(
|
||||
name=package_name,
|
||||
@@ -44,6 +45,7 @@ setup(
|
||||
'Framework :: Django :: 1.9',
|
||||
'Framework :: Django :: 1.10',
|
||||
'Framework :: Django :: 1.11',
|
||||
'Framework :: Django :: 2.0',
|
||||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Natural Language :: English',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[tox]
|
||||
envlist =
|
||||
py27-{17,18,19,110,111},
|
||||
py34-{17,18,19,110,111,master},
|
||||
py35-{18,19,110,111,master},
|
||||
py36-{18,19,110,111,master},
|
||||
py34-{17,18,19,110,111,20,master},
|
||||
py35-{18,19,110,111,20,master},
|
||||
py36-{18,19,110,111,20,master},
|
||||
[testenv]
|
||||
passenv = CI TRAVIS TRAVIS_*
|
||||
deps =
|
||||
@@ -12,10 +12,11 @@ deps =
|
||||
19: Django >= 1.9, < 1.10
|
||||
110: Django >= 1.10, < 1.11
|
||||
111: Django >= 1.11, < 1.12
|
||||
20: Django >= 2.0, < 2.1
|
||||
master: https://github.com/django/django/archive/master.tar.gz
|
||||
coverage
|
||||
codecov
|
||||
commands =
|
||||
coverage run --append --source=admin_interface setup.py test
|
||||
coverage report -m
|
||||
codecov
|
||||
codecov
|
||||
Reference in New Issue
Block a user