Compare commits

..

4 Commits

Author SHA1 Message Date
Fabio Caccamo 451679d565 Updated version 2018-01-31 12:24:22 +01:00
Fabio Caccamo e579134152 Added enviroment display and customization 2018-01-31 12:24:08 +01:00
Fabio Caccamo 6e57cf558c Updated .gitignore [ci skip] 2018-01-31 12:12:01 +01:00
Fabio Caccamo d00428c30a Tested against django 2.0 2017-12-05 12:14:27 +01:00
12 changed files with 129 additions and 13 deletions
+2
View File
@@ -55,3 +55,5 @@ docs/_build/
# PyBuilder # PyBuilder
target/ target/
screenshots
TODO.txt
+4
View File
@@ -9,15 +9,19 @@ env:
- TOX_ENV=py34-18 - TOX_ENV=py34-18
- TOX_ENV=py34-19 - TOX_ENV=py34-19
- TOX_ENV=py34-110 - TOX_ENV=py34-110
- TOX_ENV=py34-20
- TOX_ENV=py34-master - TOX_ENV=py34-master
- TOX_ENV=py35-18 - TOX_ENV=py35-18
- TOX_ENV=py35-19 - TOX_ENV=py35-19
- TOX_ENV=py35-110 - TOX_ENV=py35-110
- TOX_ENV=py35-20
- TOX_ENV=py35-master - TOX_ENV=py35-master
matrix: matrix:
include: include:
- python: "3.6" - python: "3.6"
env: TOX_ENV=py36-111 env: TOX_ENV=py36-111
- python: "3.6"
env: TOX_ENV=py36-20
- python: "3.6" - python: "3.6"
env: TOX_ENV=py36-master env: TOX_ENV=py36-master
allow_failures: allow_failures:
+2 -3
View File
@@ -1,7 +1,6 @@
[![Build Status](https://travis-ci.org/fabiocaccamo/django-admin-interface.svg?branch=master)](https://travis-ci.org/fabiocaccamo/django-admin-interface) [![Build Status](https://travis-ci.org/fabiocaccamo/django-admin-interface.svg?branch=master)](https://travis-ci.org/fabiocaccamo/django-admin-interface)
[![codecov](https://codecov.io/gh/fabiocaccamo/django-admin-interface/branch/master/graph/badge.svg)](https://codecov.io/gh/fabiocaccamo/django-admin-interface) [![codecov](https://codecov.io/gh/fabiocaccamo/django-admin-interface/branch/master/graph/badge.svg)](https://codecov.io/gh/fabiocaccamo/django-admin-interface)
[![Code Health](https://landscape.io/github/fabiocaccamo/django-admin-interface/master/landscape.svg?style=flat)](https://landscape.io/github/fabiocaccamo/django-admin-interface/master) [![Code Health](https://landscape.io/github/fabiocaccamo/django-admin-interface/master/landscape.svg?style=flat)](https://landscape.io/github/fabiocaccamo/django-admin-interface/master)
[![Requirements Status](https://requires.io/github/fabiocaccamo/django-admin-interface/requirements.svg?branch=master)](https://requires.io/github/fabiocaccamo/django-admin-interface/requirements/?branch=master)
[![PyPI version](https://badge.fury.io/py/django-admin-interface.svg)](https://badge.fury.io/py/django-admin-interface) [![PyPI version](https://badge.fury.io/py/django-admin-interface.svg)](https://badge.fury.io/py/django-admin-interface)
[![Py versions](https://img.shields.io/pypi/pyversions/django-admin-interface.svg)](https://img.shields.io/pypi/pyversions/django-admin-interface.svg) [![Py versions](https://img.shields.io/pypi/pyversions/django-admin-interface.svg)](https://img.shields.io/pypi/pyversions/django-admin-interface.svg)
[![License](https://img.shields.io/pypi/l/django-admin-interface.svg)](https://img.shields.io/pypi/l/django-admin-interface.svg) [![License](https://img.shields.io/pypi/l/django-admin-interface.svg)](https://img.shields.io/pypi/l/django-admin-interface.svg)
@@ -19,7 +18,7 @@ django-admin-interface is a modern **responsive flat admin interface customizabl
## Requirements ## Requirements
- Python 2.7, 3.4, 3.5, 3.6 - 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 ## Installation
- Run `pip install django-admin-interface` - Run `pip install django-admin-interface`
@@ -28,7 +27,7 @@ django-admin-interface is a modern **responsive flat admin interface customizabl
INSTALLED_APPS = ( INSTALLED_APPS = (
#... #...
'admin_interface', 'admin_interface',
'flat_responsive', 'flat_responsive', # only if django version < 2.0
'flat', # only if django version < 1.9 'flat', # only if django version < 1.9
'colorfield', 'colorfield',
#... #...
+3 -5
View File
@@ -1,4 +1,4 @@
|Build Status| |codecov| |Code Health| |Requirements Status| |PyPI version| |Py versions| |License| |Build Status| |codecov| |Code Health| |PyPI version| |Py versions| |License|
django-admin-interface django-admin-interface
====================== ======================
@@ -20,13 +20,13 @@ Requirements
------------ ------------
- Python 2.7, 3.4, 3.5, 3.6 - 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 Installation
------------ ------------
- Run ``pip install django-admin-interface`` - 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 migrate``
- Run ``python manage.py collectstatic`` - Run ``python manage.py collectstatic``
- Restart your application server - Restart your application server
@@ -127,8 +127,6 @@ Released under **MIT License**.
.. |Code Health| image:: https://landscape.io/github/fabiocaccamo/django-admin-interface/master/landscape.svg?style=flat .. |Code Health| image:: https://landscape.io/github/fabiocaccamo/django-admin-interface/master/landscape.svg?style=flat
.. |Requirements Status| image:: https://requires.io/github/fabiocaccamo/django-admin-interface/requirements.svg?branch=master
.. |PyPI version| image:: https://badge.fury.io/py/django-admin-interface.svg .. |PyPI version| image:: https://badge.fury.io/py/django-admin-interface.svg
.. |Py versions| image:: https://img.shields.io/pypi/pyversions/django-admin-interface.svg .. |Py versions| image:: https://img.shields.io/pypi/pyversions/django-admin-interface.svg
+7
View File
@@ -15,6 +15,13 @@ class ThemeAdmin(admin.ModelAdmin):
'classes': ('wide', ), 'classes': ('wide', ),
'fields': ('name', 'active', ) 'fields': ('name', 'active', )
}), }),
('Enviroment', {
'classes': ('wide', ),
'fields': (
'env',
'env_visible',
)
}),
('Logo', { ('Logo', {
'classes': ('wide', ), 'classes': ('wide', ),
'fields': ( 'fields': (
@@ -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'),
),
]
+13
View File
@@ -73,6 +73,19 @@ class Theme(models.Model):
upload_to='admin-interface/favicon/', blank=True, upload_to='admin-interface/favicon/', blank=True,
help_text='(.ico|.png|.gif - 16x16|32x32 px)', verbose_name='favicon') 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( css_header_background_color = ColorField(
blank=True, default='#0C4B33', help_text='#0C4B33', blank=True, default='#0C4B33', help_text='#0C4B33',
max_length=10, verbose_name='background color') max_length=10, verbose_name='background color')
@@ -64,4 +64,9 @@ https://github.com/fabiocaccamo/django-admin-interface
<span>{% if theme.title %}{% trans theme.title %}{% else %}{% trans 'Django administration' %}{% endif %}</span> <span>{% if theme.title %}{% trans theme.title %}{% else %}{% trans 'Django administration' %}{% endif %}</span>
{% endif %} {% endif %}
</h1> </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 %} {% endblock %}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
__version__ = '0.5.9' __version__ = '0.6.0'
+1
View File
@@ -45,6 +45,7 @@ setup(
'Framework :: Django :: 1.9', 'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10', 'Framework :: Django :: 1.10',
'Framework :: Django :: 1.11', 'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Intended Audience :: Developers', 'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License', 'License :: OSI Approved :: MIT License',
'Natural Language :: English', 'Natural Language :: English',
+5 -4
View File
@@ -1,9 +1,9 @@
[tox] [tox]
envlist = envlist =
py27-{17,18,19,110,111}, py27-{17,18,19,110,111},
py34-{17,18,19,110,111,master}, py34-{17,18,19,110,111,20,master},
py35-{18,19,110,111,master}, py35-{18,19,110,111,20,master},
py36-{18,19,110,111,master}, py36-{18,19,110,111,20,master},
[testenv] [testenv]
passenv = CI TRAVIS TRAVIS_* passenv = CI TRAVIS TRAVIS_*
deps = deps =
@@ -12,10 +12,11 @@ deps =
19: Django >= 1.9, < 1.10 19: Django >= 1.9, < 1.10
110: Django >= 1.10, < 1.11 110: Django >= 1.10, < 1.11
111: Django >= 1.11, < 1.12 111: Django >= 1.11, < 1.12
20: Django >= 2.0, < 2.1
master: https://github.com/django/django/archive/master.tar.gz master: https://github.com/django/django/archive/master.tar.gz
coverage coverage
codecov codecov
commands = commands =
coverage run --append --source=admin_interface setup.py test coverage run --append --source=admin_interface setup.py test
coverage report -m coverage report -m
codecov codecov