Compare commits

...

8 Commits

Author SHA1 Message Date
Fabio Caccamo 674178ecbe Updated README 2016-08-05 10:37:36 +02:00
Fabio Caccamo 07a51c1678 Updated version 2016-08-05 10:37:24 +02:00
Fabio Caccamo a58605a385 Renamed var 2016-08-05 10:36:59 +02:00
Fabio Caccamo e1d2c81ebe Merge pull request #6 from cereigido/master
Adding filename to File for Django 1.10 compatibility
2016-08-05 10:17:22 +02:00
Paulo Cereigido e5e55bdfcd adding filename to File from Django 1.10 compatibility 2016-08-05 01:29:53 -03:00
Fabio Caccamo f6ce51c839 Updated README.md 2016-07-12 18:55:01 +02:00
Fabio Caccamo b4b19650f1 Updated version 2016-06-29 16:05:34 +02:00
Fabio Caccamo 3d4f249487 Improved backward compatibility with South 2016-06-29 16:05:13 +02:00
5 changed files with 89 additions and 26 deletions
+2 -22
View File
@@ -5,7 +5,7 @@ You can use the builtin **django-theme** or create your own and **customize** **
##Requirements
- Python 2.6, Python 2.7, Python 3.4
- Django 1.6.5 through Django 1.9
- Django 1.6.5 through Django 1.10
##Installation
- Run `pip install django-admin-interface`
@@ -43,24 +43,4 @@ INSTALLED_APPS = (
- [django-colorfield](https://github.com/jaredly/django-colorfield/)
##License
The MIT License (MIT)
Copyright (c) 2016 Fabio Caccamo - fabio.caccamo@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Released under [MIT License](LICENSE).
+4 -3
View File
@@ -83,12 +83,14 @@ class Theme(models.Model):
else:
Theme.objects.filter(pk = self.pk).update(active = False)
def set_default_logo(self):
logo_path = os.path.normpath(os.path.dirname(__file__) + '/data/logo-django.svg')
logo_filename = 'logo-django.svg'
logo_path = os.path.normpath(os.path.dirname(__file__) + '/data/' + logo_filename)
logo_file = open(logo_path)
self.logo = File(logo_file)
self.logo = File(logo_file, logo_filename)
self.save()
logo_file.close()
@@ -107,4 +109,3 @@ class Theme(models.Model):
post_delete.connect(Theme.post_delete_handler, sender = Theme)
post_save.connect(Theme.post_save_handler, sender = Theme)
@@ -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']
+1 -1
View File
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
__version__ = '0.1.5'
__version__ = '0.1.7'