Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 73c9a54d94 | |||
| eff414b40c | |||
| ccbf76dc5a | |||
| 5b6e83751b | |||
| 572294f646 | |||
| 4e18d36c79 | |||
| ee9994231b | |||
| fb4cfdb772 | |||
| 8535232598 | |||
| abbb666eae | |||
| d48fc882f1 | |||
| f968bd9ffa | |||
| c0592276de | |||
| 451679d565 | |||
| e579134152 | |||
| 6e57cf558c | |||
| d00428c30a | |||
| 9becccce39 | |||
| 64a9e8371c | |||
| 8a85334f68 | |||
| 41a5ba61c8 | |||
| c780ccfbcf | |||
| 6091c886d7 | |||
| d05009ce44 | |||
| ef1eefb084 | |||
| e57042b1b4 | |||
| 0b0eff8653 | |||
| f6cef18c6b | |||
| e8522fe3d7 | |||
| fcb8a38e50 | |||
| 6c3a645edd | |||
| b9d0ac6dab | |||
| 3f270b0b75 | |||
| 7bc15ba61e | |||
| 37bb3ce0df | |||
| 66b0172195 | |||
| ca2f5c549e | |||
| 21b221f9e9 | |||
| 5fcbef3c5b | |||
| ca2b405989 |
@@ -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:
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
include LICENSE.txt
|
||||
include README.md
|
||||
include README.rst
|
||||
recursive-include admin_interface *
|
||||
recursive-exclude * *.pyc __pycache__ .DS_Store
|
||||
@@ -8,17 +8,24 @@
|
||||
# django-admin-interface
|
||||
django-admin-interface is a modern **responsive flat admin interface customizable by the admin itself**.
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
- Beautiful default **django-theme**
|
||||
- Themes management and customization *(you can **customize admin title, logo and colors**)*
|
||||
- Responsive
|
||||
- List filter dropdown *(optional)*
|
||||
- **`NEW`** **Related modal** *(instead of the old popup window, optional)*
|
||||
- Style optimizations for: `django-ckeditor`, `django-modeltranslation`, `sorl-thumbnail`
|
||||
- `NEW` **Related modal** *(instead of the old popup window, optional)*
|
||||
- `NEW` **Enviroment label** *(development, testing, staging, production)*
|
||||
- Style optimizations for:
|
||||
- `django-ckeditor`
|
||||
- `django-modeltranslation`
|
||||
- `django-tabbed-admin`
|
||||
- `sorl-thumbnail`
|
||||
|
||||
## 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 +34,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',
|
||||
#...
|
||||
@@ -41,7 +48,7 @@ INSTALLED_APPS = (
|
||||
|
||||
#### Upgrade
|
||||
- Run `pip install django-admin-interface --upgrade`
|
||||
- Run ``python manage.py migrate`` *(add ``--fake-initial`` if you are upgrading from 0.1.0 version)*
|
||||
- Run ``python manage.py migrate`` *(add* ``--fake-initial`` *if you are upgrading from 0.1.0 version)*
|
||||
- Run ``python manage.py collectstatic --clear``
|
||||
- Restart your application server
|
||||
|
||||
@@ -51,10 +58,10 @@ This package ships with optional themes as fixtures, they can be installed using
|
||||
##### [Django](https://www.djangoproject.com/) theme (default):
|
||||
Run ``python manage.py loaddata admin_interface_theme_django.json``
|
||||
|
||||
##### [Bootstrap](http://getbootstrap.com/) theme:
|
||||
##### [Bootstrap](http://getbootstrap.com/) theme:
|
||||
Run ``python manage.py loaddata admin_interface_theme_bootstrap.json``
|
||||
|
||||
##### [Foundation](http://foundation.zurb.com/) theme:
|
||||
##### [Foundation](http://foundation.zurb.com/) theme:
|
||||
Run ``python manage.py loaddata admin_interface_theme_foundation.json``
|
||||
|
||||
##### [U.S. Web Design Standards](https://standards.usa.gov/) theme:
|
||||
@@ -63,10 +70,10 @@ Run ``python manage.py loaddata admin_interface_theme_uswds.json``
|
||||
### Add more themes
|
||||
You can add a theme you've created through the admin to this repository by [sending us a PR](http://makeapullrequest.com/). Here are the steps to follow to add :
|
||||
|
||||
1. Export your exact theme as fixture using the `dumpdata` admin command:
|
||||
1. Export your exact theme as fixture using the `dumpdata` admin command:
|
||||
``python manage.py dumpdata admin_interface.Theme --indent 4 -o admin_interface_theme_{{name}}.json --pks=N``
|
||||
|
||||
2. Copy the generated json file into the fixtures folder *(making sure its name starts with `admin_interface_theme_` to avoid clashes with fixtures that might be provided by other third party apps)*.
|
||||
2. Copy the generated json file into the fixtures folder *(making sure its name starts with* `admin_interface_theme_` *to avoid clashes with fixtures that might be provided by other third party apps)*.
|
||||
|
||||
3. Remove the `"pk"` from the fixture and make sure the `active` field is set to `true` *(in this way a theme is automatically activated when installed)*.
|
||||
|
||||
@@ -88,13 +95,9 @@ You can add a theme you've created through the admin to this repository by [send
|
||||
## FAQ
|
||||
- #### I already have a custom `base_site.html`, how can I make it work?
|
||||
|
||||
You can use [django-apptemplates](https://github.com/bittner/django-apptemplates), then add **`{% extends "admin_interface:admin/base_site.html" %}`** to your `base_site.html`
|
||||
You can use [django-apptemplates](https://github.com/bittner/django-apptemplates), then add `{% extends "admin_interface:admin/base_site.html" %}` to your `base_site.html`
|
||||
|
||||
---
|
||||
#### Thanks
|
||||
- [django-flat-theme](https://github.com/elky/django-flat-theme/)
|
||||
- [django-flat-responsive](https://github.com/elky/django-flat-responsive)
|
||||
- [django-colorfield](https://github.com/jaredly/django-colorfield/)
|
||||
|
||||
## License
|
||||
Released under [MIT License](LICENSE).
|
||||
|
||||
+69
-98
@@ -1,5 +1,4 @@
|
||||
|Build Status| |codecov| |Code Health| |PyPI version| |Py versions|
|
||||
|License|
|
||||
|Build Status| |codecov| |Code Health| |PyPI version| |Py versions| |License|
|
||||
|
||||
django-admin-interface
|
||||
======================
|
||||
@@ -7,105 +6,86 @@ django-admin-interface
|
||||
django-admin-interface is a modern **responsive flat admin interface
|
||||
customizable by the admin itself**.
|
||||
|
||||
|django-admin-interface_preview|
|
||||
---------------------------------
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
- Beautiful default **django-theme**
|
||||
- Themes management and customization *(you can **customize admin
|
||||
title, logo and colors**)*
|
||||
- Responsive
|
||||
- List filter dropdown *(optional)*
|
||||
- **``NEW``** **Related modal** *(instead of the old popup window,
|
||||
optional)*
|
||||
- Style optimizations for: ``django-ckeditor``,
|
||||
``django-modeltranslation``, ``sorl-thumbnail``
|
||||
- Beautiful default **django-theme**
|
||||
- Themes management and customization *(you can customize admin title, logo and colors)*
|
||||
- Responsive
|
||||
- List filter dropdown *(optional)*
|
||||
- ``NEW`` **Related modal** (instead of the old popup window, optional)
|
||||
- ``NEW`` **Enviroment label** (development, testing, staging, production)
|
||||
- Style optimizations for:
|
||||
- `django-ckeditor`
|
||||
- `django-modeltranslation`
|
||||
- `django-tabbed-admin`
|
||||
- `sorl-thumbnail`
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
- Python 2.7, 3.4, 3.5, 3.6
|
||||
- Django 1.7, 1.8, 1.9, 1.10, 1.11
|
||||
- Python 2.7, 3.4, 3.5, 3.6
|
||||
- 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`` and
|
||||
``colorfield`` to ``settings.INSTALLED_APPS`` **before**
|
||||
``django.contrib.admin``
|
||||
|
||||
.. code:: python
|
||||
|
||||
INSTALLED_APPS = (
|
||||
#...
|
||||
'admin_interface',
|
||||
'flat_responsive',
|
||||
'flat', # only if django version < 1.9
|
||||
'colorfield',
|
||||
#...
|
||||
'django.contrib.admin',
|
||||
#...
|
||||
)
|
||||
|
||||
- Run ``python manage.py migrate``
|
||||
- Run ``python manage.py collectstatic``
|
||||
- Restart your application server
|
||||
- Run ``pip install django-admin-interface``
|
||||
- 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
|
||||
|
||||
Upgrade
|
||||
~~~~~~~
|
||||
^^^^^^^
|
||||
|
||||
- Run ``pip install django-admin-interface --upgrade``
|
||||
- Run ``python manage.py migrate`` *(add ``--fake-initial`` if you are
|
||||
upgrading from 0.1.0 version)*
|
||||
- Run ``python manage.py collectstatic --clear``
|
||||
- Restart your application server
|
||||
- Run ``pip install django-admin-interface --upgrade``
|
||||
- Run ``python manage.py migrate`` *(add* ``--fake-initial`` *if you are upgrading from 0.1.0 version)*
|
||||
- Run ``python manage.py collectstatic --clear``
|
||||
- Restart your application server
|
||||
|
||||
Optional themes
|
||||
---------------
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
This package ships with optional themes as fixtures, they can be
|
||||
installed using the `loaddata admin
|
||||
command <https://docs.djangoproject.com/en/1.11/ref/django-admin/#django-admin-loaddata>`__.
|
||||
installed using the ``loaddata`` admin command.
|
||||
Optional themes are activated on installation.
|
||||
|
||||
`Django <https://www.djangoproject.com/>`__ theme (default):
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
**Django theme** (default):
|
||||
|
||||
Run ``python manage.py loaddata admin_interface_theme_django.json``
|
||||
|
||||
`Bootstrap <http://getbootstrap.com/>`__ theme:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
**Bootstrap theme**:
|
||||
|
||||
Run ``python manage.py loaddata admin_interface_theme_bootstrap.json``
|
||||
|
||||
`Foundation <http://foundation.zurb.com/>`__ theme:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
**Foundation theme**:
|
||||
|
||||
Run ``python manage.py loaddata admin_interface_theme_foundation.json``
|
||||
|
||||
`U.S. Web Design Standards <https://standards.usa.gov/>`__ theme:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
**U.S. Web Design Standards theme**:
|
||||
|
||||
Run ``python manage.py loaddata admin_interface_theme_uswds.json``
|
||||
|
||||
Add more themes
|
||||
~~~~~~~~~~~~~~~
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
You can add a theme you've created through the admin to this repository
|
||||
by `sending us a PR <http://makeapullrequest.com/>`__. Here are the
|
||||
steps to follow to add :
|
||||
by **sending us a PR**. Here are the steps to follow to add:
|
||||
|
||||
1. Export your exact theme as fixture using the ``dumpdata`` admin
|
||||
command:
|
||||
``python manage.py dumpdata admin_interface.Theme --indent 4 -o admin_interface_theme_{{name}}.json --pks=N``
|
||||
1. Export your exact theme as fixture using the ``dumpdata`` admin command:
|
||||
``python manage.py dumpdata admin_interface.Theme --indent 4 -o admin_interface_theme_{{name}}.json --pks=N``
|
||||
|
||||
2. Copy the generated json file into the fixtures folder *(making sure
|
||||
its name starts with ``admin_interface_theme_`` to avoid clashes with
|
||||
fixtures that might be provided by other third party apps)*.
|
||||
its name starts with ``admin_interface_theme_`` to avoid clashes with
|
||||
fixtures that might be provided by other third party apps)*.
|
||||
|
||||
3. Remove the ``"pk"`` from the fixture and make sure the ``active``
|
||||
field is set to ``true`` *(in this way a theme is automatically
|
||||
activated when installed)*.
|
||||
3. Remove the ``pk`` from the fixture and make sure the ``active``
|
||||
field is set to ``true`` *(in this way a theme is automatically
|
||||
activated when installed)*.
|
||||
|
||||
4. Edit the section above to document your theme.
|
||||
|
||||
@@ -113,69 +93,60 @@ Screenshots
|
||||
-----------
|
||||
|
||||
Admin login
|
||||
~~~~~~~~~~~
|
||||
|
||||
|django-admin-interface\_login|
|
||||
|
||||
|django-admin-interface_login|
|
||||
-------------------------------
|
||||
|
||||
Admin dashboard
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
|django-admin-interface\_dashboard|
|
||||
|
||||
|django-admin-interface_dashboard|
|
||||
-----------------------------------
|
||||
|
||||
Admin themes management
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|django-admin-interface\_themes\_management|
|
||||
|
||||
|django-admin-interface_themes_management|
|
||||
--------------------------------------------
|
||||
|
||||
Admin theme customization
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. figure:: https://cloud.githubusercontent.com/assets/1035294/11240250/7350d942-8df1-11e5-9b28-f2f54c333cdc.gif
|
||||
:alt: django-admin-interface\_theme\_customization
|
||||
|
||||
django-admin-interface\_theme\_customization
|
||||
|django-admin-interface_theme_customization|
|
||||
---------------------------------------------
|
||||
|
||||
FAQ
|
||||
---
|
||||
|
||||
- .. rubric:: I already have a custom ``base_site.html``, how can I
|
||||
make it work?
|
||||
:name: i-already-have-a-custom-base_site.html-how-can-i-make-it-work
|
||||
**I already have a custom** ``base_site.html`` **, how can I make it work?**
|
||||
|
||||
You can use
|
||||
`django-apptemplates <https://github.com/bittner/django-apptemplates>`__,
|
||||
then add **``{% extends "admin_interface:admin/base_site.html" %}``** to
|
||||
your ``base_site.html``
|
||||
|
||||
--------------
|
||||
|
||||
Thanks
|
||||
~~~~~~
|
||||
|
||||
- `django-flat-theme <https://github.com/elky/django-flat-theme/>`__
|
||||
- `django-flat-responsive <https://github.com/elky/django-flat-responsive>`__
|
||||
- `django-colorfield <https://github.com/jaredly/django-colorfield/>`__
|
||||
You can use ``django-apptemplates`, then add ``{% extends "admin_interface:admin/base_site.html" %}`` to your ``base_site.html``
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Released under `MIT License <LICENSE>`__.
|
||||
Released under **MIT License**.
|
||||
|
||||
|
||||
.. |Build Status| image:: https://travis-ci.org/fabiocaccamo/django-admin-interface.svg?branch=master
|
||||
:target: https://travis-ci.org/fabiocaccamo/django-admin-interface
|
||||
|
||||
.. |codecov| image:: https://codecov.io/gh/fabiocaccamo/django-admin-interface/branch/master/graph/badge.svg
|
||||
:target: https://codecov.io/gh/fabiocaccamo/django-admin-interface
|
||||
|
||||
.. |Code Health| image:: https://landscape.io/github/fabiocaccamo/django-admin-interface/master/landscape.svg?style=flat
|
||||
:target: https://landscape.io/github/fabiocaccamo/django-admin-interface/master
|
||||
|
||||
.. |PyPI version| image:: https://badge.fury.io/py/django-admin-interface.svg
|
||||
:target: https://badge.fury.io/py/django-admin-interface
|
||||
|
||||
.. |Py versions| image:: https://img.shields.io/pypi/pyversions/django-admin-interface.svg
|
||||
:target: https://img.shields.io/pypi/pyversions/django-admin-interface.svg
|
||||
|
||||
.. |License| image:: https://img.shields.io/pypi/l/django-admin-interface.svg
|
||||
:target: https://img.shields.io/pypi/l/django-admin-interface.svg
|
||||
.. |django-admin-interface\_login| image:: https://cloud.githubusercontent.com/assets/1035294/11240233/55c8d4ba-8df1-11e5-9568-00fdc987ede8.gif
|
||||
.. |django-admin-interface\_dashboard| image:: https://cloud.githubusercontent.com/assets/1035294/11240239/627c0362-8df1-11e5-81fa-216366a5d8da.gif
|
||||
.. |django-admin-interface\_themes\_management| image:: https://cloud.githubusercontent.com/assets/1035294/11240245/6cd1c342-8df1-11e5-928b-f22217474d3d.gif
|
||||
|
||||
.. |django-admin-interface_preview| image:: https://user-images.githubusercontent.com/1035294/35631521-64b0cab8-06a4-11e8-8f57-c04fdfbb7e8b.gif
|
||||
|
||||
.. |django-admin-interface_login| image:: https://cloud.githubusercontent.com/assets/1035294/11240233/55c8d4ba-8df1-11e5-9568-00fdc987ede8.gif
|
||||
|
||||
.. |django-admin-interface_dashboard| image:: https://cloud.githubusercontent.com/assets/1035294/11240239/627c0362-8df1-11e5-81fa-216366a5d8da.gif
|
||||
|
||||
.. |django-admin-interface_themes_management| image:: https://cloud.githubusercontent.com/assets/1035294/11240245/6cd1c342-8df1-11e5-928b-f22217474d3d.gif
|
||||
|
||||
.. |django-admin-interface_theme_customization| image:: https://cloud.githubusercontent.com/assets/1035294/11240250/7350d942-8df1-11e5-9b28-f2f54c333cdc.gif
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from admin_interface.version import __version__
|
||||
|
||||
default_app_config = 'admin_interface.apps.AdminInterfaceConfig'
|
||||
|
||||
@@ -15,6 +15,13 @@ class ThemeAdmin(admin.ModelAdmin):
|
||||
'classes': ('wide', ),
|
||||
'fields': ('name', 'active', )
|
||||
}),
|
||||
('Enviroment', {
|
||||
'classes': ('wide', ),
|
||||
'fields': (
|
||||
'env',
|
||||
'env_visible',
|
||||
)
|
||||
}),
|
||||
('Logo', {
|
||||
'classes': ('wide', ),
|
||||
'fields': (
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
"fields": {
|
||||
"name": "USWDS",
|
||||
"active": true,
|
||||
"title": "Site administration",
|
||||
"title": "Django administration",
|
||||
"title_color": "#FFFFFF",
|
||||
"title_visible": true,
|
||||
"title_visible": false,
|
||||
"logo": "",
|
||||
"logo_color": "#FFFFFF",
|
||||
"logo_visible": false,
|
||||
"logo_visible": true,
|
||||
"css_header_background_color": "#112E51",
|
||||
"css_header_text_color": "#FFFFFF",
|
||||
"css_header_link_color": "#FFFFFF",
|
||||
|
||||
@@ -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'),
|
||||
),
|
||||
]
|
||||
+33
-20
@@ -13,19 +13,18 @@ from colorfield.fields import ColorField
|
||||
class Theme(models.Model):
|
||||
|
||||
@staticmethod
|
||||
def post_migrate_handler(sender, **kwargs):
|
||||
theme = Theme.get_active_theme()
|
||||
def post_migrate_handler(**kwargs):
|
||||
Theme.get_active_theme()
|
||||
|
||||
@staticmethod
|
||||
def post_delete_handler(instance, **kwargs):
|
||||
theme = Theme.get_active_theme()
|
||||
def post_delete_handler(**kwargs):
|
||||
Theme.get_active_theme()
|
||||
|
||||
@staticmethod
|
||||
def post_save_handler(instance, created, **kwargs):
|
||||
theme = instance
|
||||
if theme.active:
|
||||
Theme.objects.exclude(pk=theme.pk).update(active=False)
|
||||
theme = Theme.get_active_theme()
|
||||
def post_save_handler(instance, **kwargs):
|
||||
if instance.active:
|
||||
Theme.objects.exclude(pk=instance.pk).update(active=False)
|
||||
Theme.get_active_theme()
|
||||
|
||||
@staticmethod
|
||||
def get_active_theme():
|
||||
@@ -74,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')
|
||||
@@ -137,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')
|
||||
|
||||
|
||||
@@ -19,8 +19,10 @@ https://github.com/fabiocaccamo/django-admin-interface
|
||||
{% include "admin_interface/css/list-filter-dropdown.css" %}
|
||||
{% include "admin_interface/css/recent-actions.css" %}
|
||||
{% include "admin_interface/css/related-modal.css" %}
|
||||
{% include "admin_interface/css/jquery.ui.tabs.css" %}
|
||||
{% include "admin_interface/css/modeltranslation.css" %}
|
||||
{% include "admin_interface/css/sorl-thumbnail.css" %}
|
||||
{% include "admin_interface/css/tabbed-admin.css" %}
|
||||
{% include "admin_interface/css/ckeditor.css" %}
|
||||
{% include "admin_interface/css/tinymce.css" %}
|
||||
|
||||
@@ -64,4 +66,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%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -238,9 +243,17 @@ body.admin-interface .paginator a.showall:visited {
|
||||
}
|
||||
/* end fix */
|
||||
|
||||
.admin-interface .inline-group {
|
||||
/* begin fix restrict tabular-inline horizontal-scroll to inline-group instead of whole page */
|
||||
.admin-interface .inline-group[data-inline-type="tabular"] {
|
||||
overflow-x:auto;
|
||||
}
|
||||
/* end fix */
|
||||
|
||||
/* begin fix stacked-inline margin-bottom in responsive small viewport */
|
||||
.admin-interface .inline-group[data-inline-type="stacked"] .module {
|
||||
margin-bottom:0px;
|
||||
}
|
||||
/* end fix */
|
||||
|
||||
/* begin fix issue #10 - Related widget broken in long tabular inline */
|
||||
.admin-interface .inline-group .tabular .related-widget-wrapper {
|
||||
@@ -257,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;
|
||||
}
|
||||
@@ -286,60 +308,28 @@ body.admin-interface .paginator a.showall:visited {
|
||||
width: 100% !important;
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
.admin-interface .aligned .form-row input[type="file"] {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* improve responsive selector */
|
||||
.admin-interface .selector.stacked {
|
||||
width: 480px;
|
||||
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 */
|
||||
.admin-interface .selector:not(.stacked) .selector-chosen select {
|
||||
height: calc(46px + 17.2em) !important;
|
||||
}
|
||||
|
||||
/* equalize horizontal and vertical select padding */
|
||||
/* fix [stacked, not-stacked] equalize horizontal and vertical select padding for selector */
|
||||
.admin-interface .selector .selector-available select,
|
||||
.admin-interface .selector .selector-chosen select {
|
||||
padding: 7px 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* fix [stacked, not-stacked] select options text overflow */
|
||||
.admin-interface .selector .selector-available select option,
|
||||
.admin-interface .selector .selector-chosen select option {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* jQuery UI CSS Framework
|
||||
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/base/jquery.ui.core.css
|
||||
*/
|
||||
|
||||
/*
|
||||
backward compatibility:
|
||||
.ui-tabs-selected: jquery ui < 1.10
|
||||
.ui-tabs-active classes jquery ui >= 1.10
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
|
||||
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
||||
.ui-helper-clearfix { display: inline-block; }
|
||||
/* required comment for clearfix to work in Opera \*/
|
||||
* html .ui-helper-clearfix { height:1%; }
|
||||
.ui-helper-clearfix { display:block; }
|
||||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
.ui-state-disabled { cursor: default !important; }
|
||||
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
/* http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/base/jquery.ui.tabs.css */
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
||||
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
||||
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active, .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
.ui-tabs .ui-tabs-hide {
|
||||
position: absolute;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Custom tabs theme */
|
||||
.admin-interface .ui-tabs {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.admin-interface .ui-tabs,
|
||||
.admin-interface .ui-tabs .ui-widget-header,
|
||||
.admin-interface .ui-tabs .ui-widget-header .ui-state-default {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.admin-interface .ui-tabs .ui-tabs-nav {
|
||||
padding: 10px 0 0 10px;
|
||||
border-bottom: none;
|
||||
}
|
||||
.admin-interface .ui-tabs .ui-tabs-nav li {
|
||||
margin: 0 0 0 -1px;
|
||||
}
|
||||
.admin-interface .ui-tabs .ui-tabs-nav li.required {
|
||||
font-weight: bold;
|
||||
}
|
||||
.admin-interface .ui-tabs .ui-tabs-nav li a {
|
||||
border: 1px solid #eeeeee;
|
||||
background-color: #f8f8f8;
|
||||
border-bottom: none;
|
||||
color: #666666;
|
||||
padding: 7px 14px 8px 14px;
|
||||
margin-top: 1px;
|
||||
-moz-border-radius-topright: 4px;
|
||||
-webkit-border-top-right-radius: 4px;
|
||||
-moz-border-radius-topleft: 4px;
|
||||
-webkit-border-top-left-radius: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.admin-interface .ui-tabs .ui-tabs-nav li.ui-tabs-active a,
|
||||
.admin-interface .ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
|
||||
padding: 8px 14px 8px 14px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: -1px;
|
||||
font-weight: bold;
|
||||
background-color: #FFFFFF;
|
||||
color: {{ theme.css_module_background_color }};
|
||||
border-bottom: 1px solid #FFFFFF;
|
||||
}
|
||||
|
||||
.admin-interface .ui-tabs .ui-tabs-panel {
|
||||
border: 1px solid #eeeeee;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
margin-bottom: 30px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.admin-interface .inline-group .tabular .ui-tabs .ui-tabs-panel {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.admin-interface .inline-group .tabular .ui-tabs .ui-tabs-nav {
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
.admin-interface .inline-group .tabular tr td {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.admin-interface .inline-group .tabular tr.has_original td.original,
|
||||
.admin-interface .inline-group .tabular tr td.delete {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.admin-interface .inline-group .tabular .datetime > input {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.admin-interface .inline-group .tabular .datetime br {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.admin-interface #changelist .row1:not(.selected):hover,
|
||||
.admin-interface #changelist .row2:not(.selected):hover {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.admin-interface .row2 {
|
||||
background: #fcfcfc;
|
||||
}
|
||||
|
||||
.admin-interface .row2 .ui-tabs .ui-tabs-nav li a {
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #ebebeb;
|
||||
}
|
||||
|
||||
.admin-interface .row2 .ui-tabs .ui-tabs-nav li.ui-tabs-active a,
|
||||
.admin-interface .row2 .ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
|
||||
background-color: #fcfcfc;
|
||||
border-bottom: 1px solid #fcfcfc;
|
||||
}
|
||||
@@ -1,65 +1,17 @@
|
||||
/*
|
||||
django-modeltranslation support
|
||||
https://github.com/deschler/django-modeltranslation/pull/313/commits
|
||||
https://github.com/deschler/django-modeltranslation
|
||||
*/
|
||||
|
||||
.admin-interface #content h1 select {
|
||||
text-transform:uppercase;
|
||||
margin-left:15px;
|
||||
text-transform: uppercase;
|
||||
margin-left: 15px;
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
.admin-interface .ui-tabs .ui-tabs-nav {
|
||||
padding:10px 0 0 10px;
|
||||
.admin-interface .ui-tabs .ui-tabs-panel[id^=tab_id_] {
|
||||
border: none;
|
||||
border-top: 1px solid #eeeeee;
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.admin-interface .ui-tabs .ui-tabs-nav li {
|
||||
margin-left:-1px;
|
||||
}
|
||||
|
||||
.admin-interface .ui-tabs .ui-tabs-nav li a {
|
||||
outline:none;
|
||||
background-color:#f8f8f8;
|
||||
border:1px solid #eeeeee;
|
||||
border-bottom:none;
|
||||
text-transform:uppercase;
|
||||
|
||||
padding:7px 14px 8px 14px;
|
||||
margin-top:1px;
|
||||
}
|
||||
|
||||
.admin-interface .ui-tabs .ui-tabs-nav li.ui-tabs-active a,
|
||||
.admin-interface .ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
|
||||
|
||||
padding:8px 14px 8px 14px;
|
||||
margin-top:0px;
|
||||
margin-bottom:-1px;
|
||||
font-weight: bold;
|
||||
background-color:#FFFFFF;
|
||||
color:{{ theme.css_module_background_color }};
|
||||
|
||||
border-bottom:1px solid #FFFFFF;
|
||||
}
|
||||
|
||||
.admin-interface .inline-group .tabular .ui-tabs .ui-tabs-panel {
|
||||
padding:8px;
|
||||
}
|
||||
|
||||
.admin-interface #changelist .row1:not(.selected):hover,
|
||||
.admin-interface #changelist .row2:not(.selected):hover {
|
||||
background:#f9f9f9;
|
||||
}
|
||||
|
||||
.admin-interface .row2 {
|
||||
background:#fcfcfc;
|
||||
}
|
||||
|
||||
.admin-interface .row2 .ui-tabs .ui-tabs-nav li a {
|
||||
background-color:#f5f5f5;
|
||||
border:1px solid #ebebeb;
|
||||
}
|
||||
|
||||
.admin-interface .row2 .ui-tabs .ui-tabs-nav li.ui-tabs-active a,
|
||||
.admin-interface .row2 .ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
|
||||
background-color:#fcfcfc;
|
||||
border-bottom:1px solid #fcfcfc;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
django-tabbed-admin support
|
||||
https://github.com/omji/django-tabbed-admin
|
||||
*/
|
||||
|
||||
/* Hide tabs until ready */
|
||||
/*
|
||||
.admin-interface #tabs ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.admin-interface #tabs ul.ui-tabs-nav {
|
||||
display: block;
|
||||
}
|
||||
*/
|
||||
|
||||
.admin-interface .ui-tabs .ui-tabs-panel[id^=tabs] .module.aligned:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.admin-interface .ui-tabs .ui-tabs-panel[id^=tabs] .module.aligned:last-child .form-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
@media (max-width: 350px){
|
||||
.admin-interface .ui-tabs .ui-tabs-panel[id^=tabs] .vTextField,
|
||||
.admin-interface .inline-related .vTextField {
|
||||
width: 17em;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px){
|
||||
/* fix horizontal overflow - responsive.css:563 */
|
||||
.admin-interface .ui-tabs .ui-tabs-panel[id^=tabs] .aligned .form-row > div:not([class]) {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% load i18n admin_interface_tags %}
|
||||
{% load i18n %}
|
||||
|
||||
<div class="list-filter-dropdown">
|
||||
<h3>{% blocktrans with title as filter_title %} By {{ filter_title }} {% endblocktrans %}</h3>
|
||||
|
||||
@@ -1,21 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from django import template
|
||||
from django import template, VERSION
|
||||
|
||||
from admin_interface.models import Theme
|
||||
from admin_interface.version import __version__
|
||||
|
||||
register = template.Library()
|
||||
|
||||
try:
|
||||
assignment_tag = register.assignment_tag
|
||||
except AttributeError:
|
||||
assignment_tag = register.simple_tag
|
||||
if VERSION < (1, 9):
|
||||
simple_tag = register.assignment_tag
|
||||
else:
|
||||
simple_tag = register.simple_tag
|
||||
|
||||
|
||||
@assignment_tag(takes_context=True)
|
||||
@simple_tag(takes_context=True)
|
||||
def get_admin_interface_theme(context):
|
||||
|
||||
theme = None
|
||||
request = context.get('request', None)
|
||||
|
||||
@@ -31,6 +30,6 @@ def get_admin_interface_theme(context):
|
||||
return theme
|
||||
|
||||
|
||||
@assignment_tag(takes_context=True)
|
||||
def get_admin_interface_version(context):
|
||||
@simple_tag(takes_context=False)
|
||||
def get_admin_interface_version():
|
||||
return __version__
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
__version__ = '0.5.4'
|
||||
__version__ = '0.6.3'
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
[metadata]
|
||||
description-file = README.rst
|
||||
description-file = README.md
|
||||
@@ -1,25 +1,40 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
import os
|
||||
|
||||
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_file_path = os.path.join(package_path, 'README.rst')
|
||||
long_description = ''
|
||||
try:
|
||||
with open(long_description_file_path) as f:
|
||||
long_description = f.read()
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
setup(
|
||||
name='django-admin-interface',
|
||||
name=package_name,
|
||||
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
|
||||
include_package_data=True,
|
||||
version=__version__,
|
||||
description='django-admin-interface is a modern responsive flat admin interface customizable by the admin itself.',
|
||||
long_description=long_description,
|
||||
author='Fabio Caccamo',
|
||||
author_email='fabio.caccamo@gmail.com',
|
||||
url='https://github.com/fabiocaccamo/django-admin-interface',
|
||||
download_url='https://github.com/fabiocaccamo/django-admin-interface/archive/%s.tar.gz' % __version__,
|
||||
url='%s/%s' % (github_url, package_name, ),
|
||||
download_url='%s/%s/archive/%s.tar.gz' % (github_url, package_name, __version__, ),
|
||||
keywords=['django', 'admin', 'interface', 'responsive', 'flat', 'theme', 'custom', 'ui'],
|
||||
requires=['django(>=1.7)'],
|
||||
install_requires=[
|
||||
'django-colorfield>=0.1,<1.0',
|
||||
'django-flat-theme>=1.0,<2.0',
|
||||
'django-flat-responsive>=1.0,<2.0',
|
||||
'django-colorfield >= 0.1, < 1.0',
|
||||
'django-flat-theme >= 1.0, < 2.0',
|
||||
'django-flat-responsive >= 1.0, < 3.0',
|
||||
],
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
@@ -30,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',
|
||||
@@ -45,4 +61,3 @@ setup(
|
||||
license='MIT',
|
||||
test_suite='runtests.runtests'
|
||||
)
|
||||
|
||||
|
||||
+15
-7
@@ -23,8 +23,8 @@ class AdminInterfaceTestCase(TestCase):
|
||||
shutil.rmtree(settings.MEDIA_ROOT, ignore_errors=True)
|
||||
pass
|
||||
|
||||
def __render_template(self, string, context):
|
||||
return Template(string).render(context)
|
||||
def __render_template(self, string, context=None):
|
||||
return Template(string).render(Context(context or {}))
|
||||
|
||||
def __test_active_theme(self):
|
||||
theme = Theme.get_active_theme()
|
||||
@@ -98,7 +98,10 @@ class AdminInterfaceTestCase(TestCase):
|
||||
context = Context({})
|
||||
theme = templatetags.get_admin_interface_theme(context)
|
||||
self.assertEqual(theme.name, 'Django')
|
||||
rendered = self.__render_template('{% load admin_interface_tags %}{% get_admin_interface_theme as theme %}{{ theme.name }}', context)
|
||||
rendered = self.__render_template(
|
||||
'{% load admin_interface_tags %}'\
|
||||
'{% get_admin_interface_theme as theme %}'\
|
||||
'{{ theme.name }}', context)
|
||||
self.assertEqual(rendered, 'Django')
|
||||
|
||||
def test_templatetags_get_theme_with_request(self):
|
||||
@@ -108,14 +111,19 @@ class AdminInterfaceTestCase(TestCase):
|
||||
})
|
||||
theme = templatetags.get_admin_interface_theme(context)
|
||||
self.assertEqual(theme.name, 'Django')
|
||||
rendered = self.__render_template('{% load admin_interface_tags %}{% get_admin_interface_theme as theme %}{{ theme.name }}', context)
|
||||
rendered = self.__render_template(
|
||||
'{% load admin_interface_tags %}'\
|
||||
'{% get_admin_interface_theme as theme %}'\
|
||||
'{{ theme.name }}', context)
|
||||
self.assertEqual(rendered, 'Django')
|
||||
|
||||
def test_templatetags_get_version(self):
|
||||
context = Context({})
|
||||
version = templatetags.get_admin_interface_version(context)
|
||||
version = templatetags.get_admin_interface_version()
|
||||
self.assertEqual(version, __version__)
|
||||
rendered = self.__render_template('{% load admin_interface_tags %}{% get_admin_interface_version as version %}{{ version }}', context)
|
||||
rendered = self.__render_template(
|
||||
'{% load admin_interface_tags %}'\
|
||||
'{% get_admin_interface_version as version %}'\
|
||||
'{{ version }}')
|
||||
self.assertEqual(rendered, __version__)
|
||||
|
||||
def test_repr(self):
|
||||
|
||||
@@ -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