Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 18e1425156 | |||
| 1f39ceb0ad | |||
| 48cb73a604 | |||
| c5bbbbc855 | |||
| 793a019460 | |||
| 674178ecbe | |||
| 07a51c1678 | |||
| a58605a385 | |||
| e1d2c81ebe | |||
| e5e55bdfcd | |||
| f6ce51c839 |
@@ -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`
|
||||
@@ -14,7 +14,7 @@ You can use the builtin **django-theme** or create your own and **customize** **
|
||||
INSTALLED_APPS = (
|
||||
#...
|
||||
'admin_interface',
|
||||
'flat',
|
||||
'flat', #if django version < 1.9
|
||||
'colorfield',
|
||||
#...
|
||||
'django.contrib.admin',
|
||||
@@ -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).
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
{% extends "admin/base.html" %}
|
||||
{% load i18n staticfiles admin_interface_tags %}
|
||||
|
||||
{% block title %}
|
||||
{% get_admin_interface_theme as theme %}
|
||||
{% if theme.title %}{% trans theme.title %}{% else %}{% trans 'Django administration' %}{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extrastyle %}
|
||||
{% get_admin_interface_theme as theme %}
|
||||
<style type="text/css">
|
||||
@@ -122,20 +127,25 @@
|
||||
}
|
||||
|
||||
.button:active, input[type=submit]:active, input[type=button]:active,
|
||||
.button:focus, input[type=submit]:focus, input[type=button]:focus,
|
||||
.button:hover, input[type=submit]:hover, input[type=button]:hover {
|
||||
background:{{ theme.css_save_button_background_hover_color }};
|
||||
color:{{ theme.css_save_button_text_color }};
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.button.default, input[type=submit].default, .submit-row input.default {
|
||||
background:{{ theme.css_save_button_background_color }};
|
||||
color:{{ theme.css_save_button_text_color }};
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.button.default:active, input[type=submit].default:active,
|
||||
.button.default:focus, input[type=submit].default:focus,
|
||||
.button.default:hover, input[type=submit].default:hover {
|
||||
background:{{ theme.css_save_button_background_hover_color }};
|
||||
color:{{ theme.css_save_button_text_color }};
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.submit-row a.deletelink:link,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
__version__ = '0.1.6'
|
||||
__version__ = '0.1.9'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user