Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b4b19650f1 | |||
| 3d4f249487 | |||
| 7c236c6641 | |||
| 91b3809d61 | |||
| f918551971 | |||
| 149c95311f | |||
| 858f077bd4 | |||
| e46daa8f99 | |||
| e3320b2034 | |||
| 8991863fb1 | |||
| 54f120c9ba | |||
| 816c05bebd | |||
| 710370e903 | |||
| 10476e5675 | |||
| bb5867460f | |||
| 0ed341bdfd | |||
| dd8a556d79 | |||
| f1c37feacb | |||
| 6b05143bcc | |||
| 9f22ce4b70 | |||
| 12078589aa | |||
| 98d7153b24 | |||
| d702b0a328 | |||
| 8bc899f107 |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2015 Fabio Caccamo - fabio.caccamo@gmail.com
|
Copyright (c) 2016 Fabio Caccamo - fabio.caccamo@gmail.com
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ django-admin-interface is a modern **flat admin interface customizable by the ad
|
|||||||
You can use the builtin **django-theme** or create your own and **customize** **title, logo and colors**.
|
You can use the builtin **django-theme** or create your own and **customize** **title, logo and colors**.
|
||||||
|
|
||||||
##Requirements
|
##Requirements
|
||||||
- Python 2.6, Python 2.7
|
- Python 2.6, Python 2.7, Python 3.4
|
||||||
- Django 1.6.5 through Django 1.8.4
|
- Django 1.6.5 through Django 1.9
|
||||||
|
|
||||||
##Installation
|
##Installation
|
||||||
- Run `pip install django-admin-interface`
|
- Run `pip install django-admin-interface`
|
||||||
@@ -13,15 +13,15 @@ You can use the builtin **django-theme** or create your own and **customize** **
|
|||||||
```python
|
```python
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
#...
|
#...
|
||||||
|
'admin_interface',
|
||||||
'flat',
|
'flat',
|
||||||
'colorfield',
|
'colorfield',
|
||||||
'admin_interface',
|
|
||||||
#...
|
#...
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
#...
|
#...
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
- Run ``python manage.py migrate admin_interface``
|
- Run ``python manage.py migrate`` *(add ``--fake-initial`` if you are upgrading from 0.1.0 version)*
|
||||||
- Run ``python manage.py collectstatic``
|
- Run ``python manage.py collectstatic``
|
||||||
- Restart your application server
|
- Restart your application server
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ INSTALLED_APPS = (
|
|||||||
##License
|
##License
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2015 Fabio Caccamo - fabio.caccamo@gmail.com
|
Copyright (c) 2016 Fabio Caccamo - fabio.caccamo@gmail.com
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from django.db.models.signals import post_migrate
|
from django.db.models.signals import post_migrate
|
||||||
|
|
||||||
from admin_interface.models import Theme
|
|
||||||
|
|
||||||
|
|
||||||
class AdminInterfaceConfig(AppConfig):
|
class AdminInterfaceConfig(AppConfig):
|
||||||
|
|
||||||
@@ -13,6 +11,6 @@ class AdminInterfaceConfig(AppConfig):
|
|||||||
|
|
||||||
def ready(self):
|
def ready(self):
|
||||||
|
|
||||||
|
from admin_interface.models import Theme
|
||||||
post_migrate.connect(Theme.post_migrate_handler, sender = self)
|
post_migrate.connect(Theme.post_migrate_handler, sender = self)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from south.utils import datetime_utils as datetime
|
||||||
|
from south.db import db
|
||||||
|
from south.v2 import SchemaMigration
|
||||||
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
|
def forwards(self, orm):
|
||||||
|
# Adding model 'Theme'
|
||||||
|
db.create_table(u'admin_interface_theme', (
|
||||||
|
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||||
|
('name', self.gf('django.db.models.fields.CharField')(default='Django', max_length=50)),
|
||||||
|
('active', self.gf('django.db.models.fields.BooleanField')(default=True)),
|
||||||
|
('title', self.gf('django.db.models.fields.CharField')(default='Django administration', max_length=50, blank=True)),
|
||||||
|
('title_visible', self.gf('django.db.models.fields.BooleanField')(default=True)),
|
||||||
|
('logo', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
|
||||||
|
('logo_visible', self.gf('django.db.models.fields.BooleanField')(default=True)),
|
||||||
|
('css_header_background_color', self.gf('colorfield.fields.ColorField')(default='#0C4B33', max_length=10, blank=True)),
|
||||||
|
('css_header_title_color', self.gf('colorfield.fields.ColorField')(default='#F5DD5D', max_length=10, blank=True)),
|
||||||
|
('css_header_text_color', self.gf('colorfield.fields.ColorField')(default='#44B78B', max_length=10, blank=True)),
|
||||||
|
('css_header_link_color', self.gf('colorfield.fields.ColorField')(default='#FFFFFF', max_length=10, blank=True)),
|
||||||
|
('css_header_link_hover_color', self.gf('colorfield.fields.ColorField')(default='#C9F0DD', max_length=10, blank=True)),
|
||||||
|
('css_module_background_color', self.gf('colorfield.fields.ColorField')(default='#44B78B', max_length=10, blank=True)),
|
||||||
|
('css_module_text_color', self.gf('colorfield.fields.ColorField')(default='#FFFFFF', max_length=10, blank=True)),
|
||||||
|
('css_module_link_color', self.gf('colorfield.fields.ColorField')(default='#FFFFFF', max_length=10, blank=True)),
|
||||||
|
('css_module_link_hover_color', self.gf('colorfield.fields.ColorField')(default='#C9F0DD', max_length=10, blank=True)),
|
||||||
|
('css_module_rounded_corners', self.gf('django.db.models.fields.BooleanField')(default=True)),
|
||||||
|
('css_generic_link_color', self.gf('colorfield.fields.ColorField')(default='#0C3C26', max_length=10, blank=True)),
|
||||||
|
('css_generic_link_hover_color', self.gf('colorfield.fields.ColorField')(default='#156641', max_length=10, blank=True)),
|
||||||
|
('css_save_button_background_color', self.gf('colorfield.fields.ColorField')(default='#0C4B33', max_length=10, blank=True)),
|
||||||
|
('css_save_button_background_hover_color', self.gf('colorfield.fields.ColorField')(default='#0C3C26', max_length=10, blank=True)),
|
||||||
|
('css_save_button_text_color', self.gf('colorfield.fields.ColorField')(default='#FFFFFF', max_length=10, blank=True)),
|
||||||
|
('css_delete_button_background_color', self.gf('colorfield.fields.ColorField')(default='#BA2121', max_length=10, blank=True)),
|
||||||
|
('css_delete_button_background_hover_color', self.gf('colorfield.fields.ColorField')(default='#A41515', max_length=10, blank=True)),
|
||||||
|
('css_delete_button_text_color', self.gf('colorfield.fields.ColorField')(default='#FFFFFF', max_length=10, blank=True)),
|
||||||
|
('css', self.gf('django.db.models.fields.TextField')(blank=True)),
|
||||||
|
('list_filter_dropdown', self.gf('django.db.models.fields.BooleanField')(default=False)),
|
||||||
|
))
|
||||||
|
db.send_create_signal('admin_interface', ['Theme'])
|
||||||
|
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
# Deleting model 'Theme'
|
||||||
|
db.delete_table(u'admin_interface_theme')
|
||||||
|
|
||||||
|
|
||||||
|
models = {
|
||||||
|
'admin_interface.theme': {
|
||||||
|
'Meta': {'object_name': 'Theme'},
|
||||||
|
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'css': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||||
|
'css_delete_button_background_color': ('colorfield.fields.ColorField', [], {'default': "'#BA2121'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_delete_button_background_hover_color': ('colorfield.fields.ColorField', [], {'default': "'#A41515'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_delete_button_text_color': ('colorfield.fields.ColorField', [], {'default': "'#FFFFFF'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_generic_link_color': ('colorfield.fields.ColorField', [], {'default': "'#0C3C26'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_generic_link_hover_color': ('colorfield.fields.ColorField', [], {'default': "'#156641'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_header_background_color': ('colorfield.fields.ColorField', [], {'default': "'#0C4B33'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_header_link_color': ('colorfield.fields.ColorField', [], {'default': "'#FFFFFF'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_header_link_hover_color': ('colorfield.fields.ColorField', [], {'default': "'#C9F0DD'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_header_text_color': ('colorfield.fields.ColorField', [], {'default': "'#44B78B'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_header_title_color': ('colorfield.fields.ColorField', [], {'default': "'#F5DD5D'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_module_background_color': ('colorfield.fields.ColorField', [], {'default': "'#44B78B'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_module_link_color': ('colorfield.fields.ColorField', [], {'default': "'#FFFFFF'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_module_link_hover_color': ('colorfield.fields.ColorField', [], {'default': "'#C9F0DD'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_module_rounded_corners': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'css_module_text_color': ('colorfield.fields.ColorField', [], {'default': "'#FFFFFF'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_save_button_background_color': ('colorfield.fields.ColorField', [], {'default': "'#0C4B33'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_save_button_background_hover_color': ('colorfield.fields.ColorField', [], {'default': "'#0C3C26'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
'css_save_button_text_color': ('colorfield.fields.ColorField', [], {'default': "'#FFFFFF'", 'max_length': '10', 'blank': 'True'}),
|
||||||
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'list_filter_dropdown': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||||
|
'logo': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
|
||||||
|
'logo_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'default': "'Django'", 'max_length': '50'}),
|
||||||
|
'title': ('django.db.models.fields.CharField', [], {'default': "'Django administration'", 'max_length': '50', 'blank': 'True'}),
|
||||||
|
'title_visible': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['admin_interface']
|
||||||
@@ -66,15 +66,37 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.breadcrumbs a:hover,
|
div.breadcrumbs a:hover,
|
||||||
div.breadcrumbs a:active,
|
div.breadcrumbs a:active {
|
||||||
fieldset a.collapse-toggle:hover {
|
|
||||||
color:{{ theme.css_module_link_hover_color }} !important;
|
color:{{ theme.css_module_link_hover_color }} !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset.collapsed a.collapse-toggle {
|
fieldset.collapse {
|
||||||
color:{{ theme.css_module_background_color }} !important;
|
border: 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fieldset.collapse.collapsed a.collapse-toggle {
|
||||||
|
color:{{ theme.css_generic_link_color }} !important;
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset.collapse.collapsed a.collapse-toggle:hover,
|
||||||
|
fieldset.collapse.collapsed a.collapse-toggle:active {
|
||||||
|
color:{{ theme.css_generic_link_hover_color }} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset.collapse a.collapse-toggle {
|
||||||
|
color:{{ theme.css_module_link_color }} !important;
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset.collapse a.collapse-toggle:hover,
|
||||||
|
fieldset.collapse a.collapse-toggle:active {
|
||||||
|
color:{{ theme.css_module_link_hover_color }} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.inline-group h2,
|
.inline-group h2,
|
||||||
.inline-group h2 {
|
.inline-group h2 {
|
||||||
background:{{ theme.css_module_background_color }};
|
background:{{ theme.css_module_background_color }};
|
||||||
@@ -198,9 +220,22 @@
|
|||||||
min-width:320px !important;
|
min-width:320px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login #content {
|
||||||
|
padding:0px 30px 10px 30px !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* same lateral padding as in logged view */
|
/* same lateral padding as in logged view */
|
||||||
.login #header {
|
.login #header {
|
||||||
padding:10px 25px !important;
|
padding:15px 30px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login #branding h1 {
|
||||||
|
margin-right:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login #branding h1 img.logo {
|
||||||
|
max-width:100%;
|
||||||
|
margin-right:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* login button right aligned */
|
/* login button right aligned */
|
||||||
@@ -274,6 +309,11 @@
|
|||||||
background-color:#ffffff;
|
background-color:#ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.module.filtered #changelist-filter li.selected a,
|
||||||
|
.module.filtered #changelist-filter li.selected a:hover {
|
||||||
|
color: {{ theme.css_generic_link_color }};
|
||||||
|
}
|
||||||
|
|
||||||
#content-related {
|
#content-related {
|
||||||
{% if theme.css_module_rounded_corners %}border-radius:4px;{% endif %}
|
{% if theme.css_module_rounded_corners %}border-radius:4px;{% endif %}
|
||||||
}
|
}
|
||||||
@@ -380,6 +420,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* sorl-thumbnail - improved AdminImageMixin widget layout */
|
||||||
|
|
||||||
|
a.thumbnail + input[type="checkbox"] {
|
||||||
|
margin:10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ckeditor + light theme - https://github.com/Ikimea/ckeditor-light-theme */
|
/* ckeditor + light theme - https://github.com/Ikimea/ckeditor-light-theme */
|
||||||
|
|
||||||
.cke_inner, .cke_wysiwyg_frame {
|
.cke_inner, .cke_wysiwyg_frame {
|
||||||
@@ -460,5 +507,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block bodyclass %}admin-interface flat-theme{% endblock %}
|
||||||
|
|
||||||
{% block sidebar %}
|
{% block sidebar %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -22,4 +22,3 @@ def get_admin_interface_theme(context):
|
|||||||
|
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
__version__ = '0.1.1'
|
__version__ = '0.1.6'
|
||||||
|
|
||||||
|
|||||||
@@ -10,14 +10,15 @@ setup(
|
|||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
license='MIT License',
|
license='MIT License',
|
||||||
version=__version__,
|
version=__version__,
|
||||||
description='django-admin-interface is a modern admin interface customizable by the admin itself.',
|
description='django-admin-interface is a modern flat admin interface customizable by the admin itself.',
|
||||||
author='Fabio Caccamo',
|
author='Fabio Caccamo',
|
||||||
author_email='fabio.caccamo@gmail.com',
|
author_email='fabio.caccamo@gmail.com',
|
||||||
url='https://github.com/fabiocaccamo/django-admin-interface',
|
url='https://github.com/fabiocaccamo/django-admin-interface',
|
||||||
download_url='https://github.com/fabiocaccamo/django-admin-interface/archive/%s.tar.gz' % __version__,
|
download_url='https://github.com/fabiocaccamo/django-admin-interface/archive/%s.tar.gz' % __version__,
|
||||||
keywords=['django', 'admin', 'interface', 'ui', 'flat', 'theme', 'custom'],
|
keywords=['django', 'admin', 'interface', 'ui', 'flat', 'theme', 'custom'],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'django-colorfield==0.1.10'
|
'django-colorfield==0.1.10',
|
||||||
|
'django-flat-theme==1.1.3'
|
||||||
],
|
],
|
||||||
classifiers=[]
|
classifiers=[]
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user