Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9becccce39 | |||
| 64a9e8371c | |||
| 8a85334f68 | |||
| 41a5ba61c8 | |||
| c780ccfbcf | |||
| 6091c886d7 | |||
| d05009ce44 | |||
| ef1eefb084 | |||
| e57042b1b4 | |||
| 0b0eff8653 | |||
| f6cef18c6b | |||
| e8522fe3d7 | |||
| fcb8a38e50 | |||
| 6c3a645edd | |||
| b9d0ac6dab | |||
| 3f270b0b75 | |||
| 7bc15ba61e | |||
| 37bb3ce0df | |||
| 66b0172195 | |||
| ca2f5c549e | |||
| 21b221f9e9 | |||
| 5fcbef3c5b | |||
| ca2b405989 |
@@ -1,5 +1,4 @@
|
|||||||
include LICENSE.txt
|
include LICENSE.txt
|
||||||
include README.md
|
include README.md
|
||||||
include README.rst
|
|
||||||
recursive-include admin_interface *
|
recursive-include admin_interface *
|
||||||
recursive-exclude * *.pyc __pycache__ .DS_Store
|
recursive-exclude * *.pyc __pycache__ .DS_Store
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
[](https://travis-ci.org/fabiocaccamo/django-admin-interface)
|
[](https://travis-ci.org/fabiocaccamo/django-admin-interface)
|
||||||
[](https://codecov.io/gh/fabiocaccamo/django-admin-interface)
|
[](https://codecov.io/gh/fabiocaccamo/django-admin-interface)
|
||||||
[](https://landscape.io/github/fabiocaccamo/django-admin-interface/master)
|
[](https://landscape.io/github/fabiocaccamo/django-admin-interface/master)
|
||||||
|
[](https://requires.io/github/fabiocaccamo/django-admin-interface/requirements/?branch=master)
|
||||||
[](https://badge.fury.io/py/django-admin-interface)
|
[](https://badge.fury.io/py/django-admin-interface)
|
||||||
[](https://img.shields.io/pypi/pyversions/django-admin-interface.svg)
|
[](https://img.shields.io/pypi/pyversions/django-admin-interface.svg)
|
||||||
[](https://img.shields.io/pypi/l/django-admin-interface.svg)
|
[](https://img.shields.io/pypi/l/django-admin-interface.svg)
|
||||||
@@ -13,7 +14,7 @@ django-admin-interface is a modern **responsive flat admin interface customizabl
|
|||||||
- Themes management and customization *(you can **customize admin title, logo and colors**)*
|
- Themes management and customization *(you can **customize admin title, logo and colors**)*
|
||||||
- Responsive
|
- Responsive
|
||||||
- List filter dropdown *(optional)*
|
- List filter dropdown *(optional)*
|
||||||
- **`NEW`** **Related modal** *(instead of the old popup window, optional)*
|
- `NEW` **Related modal** *(instead of the old popup window, optional)*
|
||||||
- Style optimizations for: `django-ckeditor`, `django-modeltranslation`, `sorl-thumbnail`
|
- Style optimizations for: `django-ckeditor`, `django-modeltranslation`, `sorl-thumbnail`
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
@@ -41,7 +42,7 @@ INSTALLED_APPS = (
|
|||||||
|
|
||||||
#### Upgrade
|
#### Upgrade
|
||||||
- Run `pip install django-admin-interface --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``
|
- Run ``python manage.py collectstatic --clear``
|
||||||
- Restart your application server
|
- Restart your application server
|
||||||
|
|
||||||
@@ -51,10 +52,10 @@ This package ships with optional themes as fixtures, they can be installed using
|
|||||||
##### [Django](https://www.djangoproject.com/) theme (default):
|
##### [Django](https://www.djangoproject.com/) theme (default):
|
||||||
Run ``python manage.py loaddata admin_interface_theme_django.json``
|
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``
|
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``
|
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](https://standards.usa.gov/) theme:
|
||||||
@@ -63,10 +64,10 @@ Run ``python manage.py loaddata admin_interface_theme_uswds.json``
|
|||||||
### Add more themes
|
### 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 :
|
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``
|
``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)*.
|
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 +89,9 @@ You can add a theme you've created through the admin to this repository by [send
|
|||||||
## FAQ
|
## FAQ
|
||||||
- #### 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`
|
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
|
## License
|
||||||
Released under [MIT License](LICENSE).
|
Released under [MIT License](LICENSE).
|
||||||
|
|||||||
+61
-98
@@ -1,5 +1,4 @@
|
|||||||
|Build Status| |codecov| |Code Health| |PyPI version| |Py versions|
|
|Build Status| |codecov| |Code Health| |Requirements Status| |PyPI version| |Py versions| |License|
|
||||||
|License|
|
|
||||||
|
|
||||||
django-admin-interface
|
django-admin-interface
|
||||||
======================
|
======================
|
||||||
@@ -10,102 +9,75 @@ customizable by the admin itself**.
|
|||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
- Beautiful default **django-theme**
|
- Beautiful default **django-theme**
|
||||||
- Themes management and customization *(you can **customize admin
|
- Themes management and customization *(you can customize admin title, logo and colors)*
|
||||||
title, logo and colors**)*
|
- Responsive
|
||||||
- Responsive
|
- List filter dropdown *(optional)*
|
||||||
- List filter dropdown *(optional)*
|
- ``NEW`` **Related modal** (instead of the old popup window, optional)
|
||||||
- **``NEW``** **Related modal** *(instead of the old popup window,
|
- Style optimizations for: ``django-ckeditor``, ``django-modeltranslation``, ``sorl-thumbnail``
|
||||||
optional)*
|
|
||||||
- Style optimizations for: ``django-ckeditor``,
|
|
||||||
``django-modeltranslation``, ``sorl-thumbnail``
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
- Run ``pip install django-admin-interface``
|
- Run ``pip install django-admin-interface``
|
||||||
- Add ``admin_interface``, ``flat_responsive``, ``flat`` and
|
- Add ``admin_interface``, ``flat_responsive``, ``flat`` *(only if django version < 1.9)* and ``colorfield`` to ``settings.INSTALLED_APPS`` **before** ``django.contrib.admin``
|
||||||
``colorfield`` to ``settings.INSTALLED_APPS`` **before**
|
- Run ``python manage.py migrate``
|
||||||
``django.contrib.admin``
|
- Run ``python manage.py collectstatic``
|
||||||
|
- Restart your application server
|
||||||
.. 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
|
|
||||||
|
|
||||||
Upgrade
|
Upgrade
|
||||||
~~~~~~~
|
^^^^^^^
|
||||||
|
|
||||||
- Run ``pip install django-admin-interface --upgrade``
|
- Run ``pip install django-admin-interface --upgrade``
|
||||||
- Run ``python manage.py migrate`` *(add ``--fake-initial`` if you are
|
- Run ``python manage.py migrate`` *(add* ``--fake-initial`` *if you are upgrading from 0.1.0 version)*
|
||||||
upgrading from 0.1.0 version)*
|
- Run ``python manage.py collectstatic --clear``
|
||||||
- Run ``python manage.py collectstatic --clear``
|
- Restart your application server
|
||||||
- Restart your application server
|
|
||||||
|
|
||||||
Optional themes
|
Optional themes
|
||||||
---------------
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
This package ships with optional themes as fixtures, they can be
|
This package ships with optional themes as fixtures, they can be
|
||||||
installed using the `loaddata admin
|
installed using the ``loaddata`` admin command.
|
||||||
command <https://docs.djangoproject.com/en/1.11/ref/django-admin/#django-admin-loaddata>`__.
|
|
||||||
Optional themes are activated on installation.
|
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``
|
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``
|
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``
|
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``
|
Run ``python manage.py loaddata admin_interface_theme_uswds.json``
|
||||||
|
|
||||||
Add more themes
|
Add more themes
|
||||||
~~~~~~~~~~~~~~~
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
You can add a theme you've created through the admin to this repository
|
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
|
by **sending us a PR**. Here are the steps to follow to add:
|
||||||
steps to follow to add :
|
|
||||||
|
|
||||||
1. Export your exact theme as fixture using the ``dumpdata`` admin
|
1. Export your exact theme as fixture using the ``dumpdata`` admin command:
|
||||||
command:
|
``python manage.py dumpdata admin_interface.Theme --indent 4 -o admin_interface_theme_{{name}}.json --pks=N``
|
||||||
``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
|
2. Copy the generated json file into the fixtures folder *(making sure
|
||||||
its name starts with ``admin_interface_theme_`` to avoid clashes with
|
its name starts with ``admin_interface_theme_`` to avoid clashes with
|
||||||
fixtures that might be provided by other third party apps)*.
|
fixtures that might be provided by other third party apps)*.
|
||||||
|
|
||||||
3. Remove the ``"pk"`` from the fixture and make sure the ``active``
|
3. Remove the ``pk`` from the fixture and make sure the ``active``
|
||||||
field is set to ``true`` *(in this way a theme is automatically
|
field is set to ``true`` *(in this way a theme is automatically
|
||||||
activated when installed)*.
|
activated when installed)*.
|
||||||
|
|
||||||
4. Edit the section above to document your theme.
|
4. Edit the section above to document your theme.
|
||||||
|
|
||||||
@@ -113,69 +85,60 @@ Screenshots
|
|||||||
-----------
|
-----------
|
||||||
|
|
||||||
Admin login
|
Admin login
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
|django-admin-interface\_login|
|
|
||||||
|
|django-admin-interface_login|
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
Admin dashboard
|
Admin dashboard
|
||||||
~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
|django-admin-interface\_dashboard|
|
|
||||||
|
|django-admin-interface_dashboard|
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
Admin themes management
|
Admin themes management
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
|django-admin-interface\_themes\_management|
|
|
||||||
|
|django-admin-interface_themes_management|
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
|
|
||||||
Admin theme customization
|
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
|
FAQ
|
||||||
---
|
---
|
||||||
|
|
||||||
- .. rubric:: I already have a custom ``base_site.html``, how can I
|
**I already have a custom** ``base_site.html`` **, how can I make it work?**
|
||||||
make it work?
|
|
||||||
:name: i-already-have-a-custom-base_site.html-how-can-i-make-it-work
|
|
||||||
|
|
||||||
You can use
|
You can use ``django-apptemplates`, then add ``{% extends "admin_interface:admin/base_site.html" %}`` to your ``base_site.html``
|
||||||
`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
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Released under `MIT License <LICENSE>`__.
|
Released under **MIT License**.
|
||||||
|
|
||||||
|
|
||||||
.. |Build Status| image:: https://travis-ci.org/fabiocaccamo/django-admin-interface.svg?branch=master
|
.. |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
|
.. |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
|
.. |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
|
|
||||||
|
.. |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
|
||||||
:target: https://badge.fury.io/py/django-admin-interface
|
|
||||||
.. |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
|
||||||
:target: https://img.shields.io/pypi/pyversions/django-admin-interface.svg
|
|
||||||
.. |License| image:: https://img.shields.io/pypi/l/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_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_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 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from admin_interface.version import __version__
|
|
||||||
|
|
||||||
default_app_config = 'admin_interface.apps.AdminInterfaceConfig'
|
default_app_config = 'admin_interface.apps.AdminInterfaceConfig'
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
|
||||||
import colorfield.fields
|
import colorfield.fields
|
||||||
|
|
||||||
|
|
||||||
@@ -14,33 +16,165 @@ class Migration(migrations.Migration):
|
|||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Theme',
|
name='Theme',
|
||||||
fields=[
|
fields=[
|
||||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
('id',
|
||||||
('name', models.CharField(default=b'Django', max_length=50)),
|
models.AutoField(
|
||||||
('active', models.BooleanField(default=True)),
|
verbose_name='ID',
|
||||||
('title', models.CharField(default=b'Django administration', max_length=50, blank=True)),
|
serialize=False,
|
||||||
('title_visible', models.BooleanField(default=True, verbose_name=b'visible')),
|
auto_created=True,
|
||||||
('logo', models.FileField(upload_to=b'admin-interface/logo/', blank=True)),
|
primary_key=True)),
|
||||||
('logo_visible', models.BooleanField(default=True, verbose_name=b'visible')),
|
('name',
|
||||||
('css_header_background_color', colorfield.fields.ColorField(default=b'#0C4B33', help_text=b'#0C4B33', max_length=10, verbose_name=b'background color', blank=True)),
|
models.CharField(
|
||||||
('css_header_title_color', colorfield.fields.ColorField(default=b'#F5DD5D', help_text=b'#F5DD5D', max_length=10, verbose_name=b'title color', blank=True)),
|
default=b'Django',
|
||||||
('css_header_text_color', colorfield.fields.ColorField(default=b'#44B78B', help_text=b'#44B78B', max_length=10, verbose_name=b'text color', blank=True)),
|
max_length=50)),
|
||||||
('css_header_link_color', colorfield.fields.ColorField(default=b'#FFFFFF', help_text=b'#FFFFFF', max_length=10, verbose_name=b'link color', blank=True)),
|
('active',
|
||||||
('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)),
|
models.BooleanField(
|
||||||
('css_module_background_color', colorfield.fields.ColorField(default=b'#44B78B', help_text=b'#44B78B', max_length=10, verbose_name=b'background color', blank=True)),
|
default=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)),
|
('title',
|
||||||
('css_module_link_color', colorfield.fields.ColorField(default=b'#FFFFFF', help_text=b'#FFFFFF', max_length=10, verbose_name=b'link color', blank=True)),
|
models.CharField(
|
||||||
('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)),
|
default=b'Django administration',
|
||||||
('css_module_rounded_corners', models.BooleanField(default=True, verbose_name=b'rounded corners')),
|
max_length=50,
|
||||||
('css_generic_link_color', colorfield.fields.ColorField(default=b'#0C3C26', help_text=b'#0C3C26', max_length=10, verbose_name=b'link color', blank=True)),
|
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)),
|
('title_visible',
|
||||||
('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)),
|
models.BooleanField(
|
||||||
('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)),
|
default=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)),
|
verbose_name=b'visible')),
|
||||||
('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)),
|
('logo',
|
||||||
('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)),
|
models.FileField(
|
||||||
('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)),
|
upload_to=b'admin-interface/logo/',
|
||||||
('css', models.TextField(blank=True)),
|
blank=True)),
|
||||||
('list_filter_dropdown', models.BooleanField(default=False)),
|
('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={
|
options={
|
||||||
'verbose_name': 'Theme',
|
'verbose_name': 'Theme',
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
import colorfield.fields
|
import colorfield.fields
|
||||||
|
|
||||||
|
|
||||||
@@ -15,26 +17,44 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='list_filter_dropdown',
|
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(
|
migrations.AddField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='related_modal_active',
|
name='related_modal_active',
|
||||||
field=models.BooleanField(default=True, verbose_name=b'active'),
|
field=models.BooleanField(
|
||||||
|
default=True,
|
||||||
|
verbose_name=b'active'),
|
||||||
),
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='related_modal_background_color',
|
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(
|
migrations.AddField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='related_modal_background_opacity',
|
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(
|
migrations.AddField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='related_modal_rounded_corners',
|
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 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import colorfield.fields
|
import colorfield.fields
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
@@ -15,11 +17,19 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='logo_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='logo',
|
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 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations
|
from django.db import migrations
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Generated by Django 1.11.1 on 2017-05-23 15:37
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
@@ -15,6 +15,8 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='recent_actions_visible',
|
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 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Generated by Django 1.11.2 on 2017-06-09 14:52
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import colorfield.fields
|
import colorfield.fields
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
@@ -16,136 +17,250 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_delete_button_background_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_delete_button_background_hover_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_delete_button_text_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_generic_link_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_generic_link_hover_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_header_background_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_header_link_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_header_link_hover_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_header_text_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_module_background_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_module_link_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_module_link_hover_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_module_rounded_corners',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_module_text_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_save_button_background_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_save_button_background_hover_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='css_save_button_text_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='list_filter_dropdown',
|
name='list_filter_dropdown',
|
||||||
field=models.BooleanField(default=False, verbose_name='use dropdown'),
|
field=models.BooleanField(
|
||||||
|
default=False,
|
||||||
|
verbose_name='use dropdown'),
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='logo_visible',
|
name='logo_visible',
|
||||||
field=models.BooleanField(default=True, verbose_name='visible'),
|
field=models.BooleanField(
|
||||||
|
default=True,
|
||||||
|
verbose_name='visible'),
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='name',
|
name='name',
|
||||||
field=models.CharField(default='Django', max_length=50),
|
field=models.CharField(
|
||||||
|
default='Django',
|
||||||
|
max_length=50),
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='related_modal_active',
|
name='related_modal_active',
|
||||||
field=models.BooleanField(default=True, verbose_name='active'),
|
field=models.BooleanField(
|
||||||
|
default=True,
|
||||||
|
verbose_name='active'),
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='related_modal_background_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='related_modal_background_opacity',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='related_modal_rounded_corners',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='title',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='title_color',
|
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(
|
migrations.AlterField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='title_visible',
|
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 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Generated by Django 1.11 on 2017-08-24 10:49
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
@@ -15,6 +15,10 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='theme',
|
model_name='theme',
|
||||||
name='favicon',
|
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'),
|
||||||
|
),
|
||||||
|
]
|
||||||
+20
-20
@@ -13,19 +13,18 @@ from colorfield.fields import ColorField
|
|||||||
class Theme(models.Model):
|
class Theme(models.Model):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def post_migrate_handler(sender, **kwargs):
|
def post_migrate_handler(**kwargs):
|
||||||
theme = Theme.get_active_theme()
|
Theme.get_active_theme()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def post_delete_handler(instance, **kwargs):
|
def post_delete_handler(**kwargs):
|
||||||
theme = Theme.get_active_theme()
|
Theme.get_active_theme()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def post_save_handler(instance, created, **kwargs):
|
def post_save_handler(instance, **kwargs):
|
||||||
theme = instance
|
if instance.active:
|
||||||
if theme.active:
|
Theme.objects.exclude(pk=instance.pk).update(active=False)
|
||||||
Theme.objects.exclude(pk=theme.pk).update(active=False)
|
Theme.get_active_theme()
|
||||||
theme = Theme.get_active_theme()
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_active_theme():
|
def get_active_theme():
|
||||||
@@ -137,19 +136,20 @@ class Theme(models.Model):
|
|||||||
blank=True, default='#000000', help_text='#000000',
|
blank=True, default='#000000', help_text='#000000',
|
||||||
max_length=10, verbose_name='background color')
|
max_length=10, verbose_name='background color')
|
||||||
related_modal_background_opacity_choices = (
|
related_modal_background_opacity_choices = (
|
||||||
(0.1, '10%', ),
|
('0.1', '10%', ),
|
||||||
(0.2, '20%', ),
|
('0.2', '20%', ),
|
||||||
(0.3, '30%', ),
|
('0.3', '30%', ),
|
||||||
(0.4, '40%', ),
|
('0.4', '40%', ),
|
||||||
(0.5, '50%', ),
|
('0.5', '50%', ),
|
||||||
(0.6, '60%', ),
|
('0.6', '60%', ),
|
||||||
(0.7, '70%', ),
|
('0.7', '70%', ),
|
||||||
(0.8, '80%', ),
|
('0.8', '80%', ),
|
||||||
(0.9, '90%', ),
|
('0.9', '90%', ),
|
||||||
)
|
)
|
||||||
related_modal_background_opacity = models.FloatField(
|
related_modal_background_opacity = models.CharField(
|
||||||
|
max_length=5,
|
||||||
choices=related_modal_background_opacity_choices,
|
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(
|
related_modal_rounded_corners = models.BooleanField(
|
||||||
default=True, verbose_name='rounded corners')
|
default=True, verbose_name='rounded corners')
|
||||||
|
|
||||||
|
|||||||
@@ -181,6 +181,11 @@ body.admin-interface .paginator a.showall:visited {
|
|||||||
width: auto;
|
width: auto;
|
||||||
padding: 0px;
|
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 */
|
/* 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;
|
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 */
|
/* begin fix issue #10 - Related widget broken in long tabular inline */
|
||||||
.admin-interface .inline-group .tabular .related-widget-wrapper {
|
.admin-interface .inline-group .tabular .related-widget-wrapper {
|
||||||
@@ -257,13 +270,22 @@ body.admin-interface .paginator a.showall:visited {
|
|||||||
text-align:right;
|
text-align:right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.admin-interface .inline-group .tabular tr td {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
.admin-interface .inline-group .tabular tr td.delete {
|
.admin-interface .inline-group .tabular tr td.delete {
|
||||||
text-align:right;
|
text-align:right;
|
||||||
padding-right:15px;
|
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 {
|
.admin-interface .inline-group .tabular tr td.delete a.inline-deletelink {
|
||||||
margin-top:2px;
|
margin-top:4px;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
text-indent:9999px;
|
text-indent:9999px;
|
||||||
}
|
}
|
||||||
@@ -289,57 +311,76 @@ body.admin-interface .paginator a.showall:visited {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* improve responsive selector */
|
/* improve responsive selector */
|
||||||
.admin-interface .selector.stacked {
|
|
||||||
width: 480px;
|
/* fix [stacked, not-stacked] equalize horizontal and vertical select padding for selector (stacked and not) */
|
||||||
|
.admin-interface .selector .selector-available select,
|
||||||
|
.admin-interface .selector .selector-chosen select {
|
||||||
|
padding: 7px 10px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fix [not-stacked] selector */
|
||||||
|
.admin-interface .selector:not(.stacked) {
|
||||||
|
width: auto;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-interface .selector.stacked .selector-chooser {
|
/* fix [not-stacked] equalize selectors height by adding the height of the .selector-available filter-bar */
|
||||||
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 {
|
.admin-interface .selector:not(.stacked) .selector-chosen select {
|
||||||
height: calc(46px + 17.2em) !important;
|
height: calc(46px + 17.2em) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* equalize horizontal and vertical select padding */
|
@media (max-width: 1024px){
|
||||||
.admin-interface .selector .selector-available select,
|
.admin-interface .related-widget-wrapper-link + .selector:not(.stacked) {
|
||||||
.admin-interface .selector .selector-chosen select {
|
width: 100%;
|
||||||
padding: 7px 10px;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 767px) and (max-width: 1124px){
|
||||||
|
|
||||||
|
.admin-interface .selector:not(.stacked) .selector-available,
|
||||||
|
.admin-interface .selector:not(.stacked) .selector-chosen {
|
||||||
|
width: 285px;
|
||||||
|
flex: 0 1 auto;
|
||||||
|
}
|
||||||
|
.admin-interface .selector:not(.stacked) .selector-filter {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.admin-interface .selector:not(.stacked) .selector-filter label {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.admin-interface .selector:not(.stacked) .selector-available input {
|
||||||
|
width: auto;
|
||||||
|
flex: 1 1;
|
||||||
|
}
|
||||||
|
.admin-interface .selector:not(.stacked) select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fix [not-stacked] in tabular inline context */
|
||||||
|
.admin-interface .tabular.inline-related .selector:not(.stacked) {
|
||||||
|
width: 795px;
|
||||||
|
float: none;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface .tabular.inline-related .form-row .related-widget-wrapper-link:first-child {
|
||||||
|
float: right;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fix [stacked] in tabular inline context */
|
||||||
|
.admin-interface .tabular.inline-related .selector.stacked {
|
||||||
|
width: 480px;
|
||||||
|
float: none;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fix [stacked] chooser align center */
|
||||||
|
.admin-interface .selector.stacked .selector-chooser {
|
||||||
|
margin-left:calc(50% - 30px);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,10 +97,7 @@ https://github.com/Ikimea/ckeditor-light-theme
|
|||||||
|
|
||||||
@media (max-width: 767px){
|
@media (max-width: 767px){
|
||||||
|
|
||||||
.django-ckeditor-widget {
|
.admin-interface .django-ckeditor-widget,
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admin-interface .cke {
|
.admin-interface .cke {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
@@ -117,4 +114,13 @@ https://github.com/Ikimea/ckeditor-light-theme
|
|||||||
.admin-interface .cke_contents {
|
.admin-interface .cke_contents {
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.admin-interface .tabular .django-ckeditor-widget,
|
||||||
|
.admin-interface .tabular .cke {
|
||||||
|
width: 400px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface .tabular .cke_contents {
|
||||||
|
height: 90px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{% load i18n admin_interface_tags %}
|
{% load i18n %}
|
||||||
|
|
||||||
<div class="list-filter-dropdown">
|
<div class="list-filter-dropdown">
|
||||||
<h3>{% blocktrans with title as filter_title %} By {{ filter_title }} {% endblocktrans %}</h3>
|
<h3>{% blocktrans with title as filter_title %} By {{ filter_title }} {% endblocktrans %}</h3>
|
||||||
|
|||||||
@@ -31,6 +31,6 @@ def get_admin_interface_theme(context):
|
|||||||
return theme
|
return theme
|
||||||
|
|
||||||
|
|
||||||
@assignment_tag(takes_context=True)
|
@assignment_tag(takes_context=False)
|
||||||
def get_admin_interface_version(context):
|
def get_admin_interface_version():
|
||||||
return __version__
|
return __version__
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
__version__ = '0.5.4'
|
__version__ = '0.5.9'
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
description-file = README.rst
|
description-file = README.md
|
||||||
@@ -1,25 +1,40 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
exec(open('admin_interface/version.py').read())
|
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(
|
setup(
|
||||||
name='django-admin-interface',
|
name=package_name,
|
||||||
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
|
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
version=__version__,
|
version=__version__,
|
||||||
description='django-admin-interface is a modern responsive flat admin interface customizable by the admin itself.',
|
description='django-admin-interface is a modern responsive flat admin interface customizable by the admin itself.',
|
||||||
|
long_description=long_description,
|
||||||
author='Fabio Caccamo',
|
author='Fabio Caccamo',
|
||||||
author_email='fabio.caccamo@gmail.com',
|
author_email='fabio.caccamo@gmail.com',
|
||||||
url='https://github.com/fabiocaccamo/django-admin-interface',
|
url='%s/%s' % (github_url, package_name, ),
|
||||||
download_url='https://github.com/fabiocaccamo/django-admin-interface/archive/%s.tar.gz' % __version__,
|
download_url='%s/%s/archive/%s.tar.gz' % (github_url, package_name, __version__, ),
|
||||||
keywords=['django', 'admin', 'interface', 'responsive', 'flat', 'theme', 'custom', 'ui'],
|
keywords=['django', 'admin', 'interface', 'responsive', 'flat', 'theme', 'custom', 'ui'],
|
||||||
requires=['django(>=1.7)'],
|
requires=['django(>=1.7)'],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'django-colorfield>=0.1,<1.0',
|
'django-colorfield >= 0.1, < 1.0',
|
||||||
'django-flat-theme>=1.0,<2.0',
|
'django-flat-theme >= 1.0, < 2.0',
|
||||||
'django-flat-responsive>=1.0,<2.0',
|
'django-flat-responsive >= 1.0, < 3.0',
|
||||||
],
|
],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 5 - Production/Stable',
|
'Development Status :: 5 - Production/Stable',
|
||||||
@@ -45,4 +60,3 @@ setup(
|
|||||||
license='MIT',
|
license='MIT',
|
||||||
test_suite='runtests.runtests'
|
test_suite='runtests.runtests'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+15
-7
@@ -23,8 +23,8 @@ class AdminInterfaceTestCase(TestCase):
|
|||||||
shutil.rmtree(settings.MEDIA_ROOT, ignore_errors=True)
|
shutil.rmtree(settings.MEDIA_ROOT, ignore_errors=True)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def __render_template(self, string, context):
|
def __render_template(self, string, context=None):
|
||||||
return Template(string).render(context)
|
return Template(string).render(Context(context or {}))
|
||||||
|
|
||||||
def __test_active_theme(self):
|
def __test_active_theme(self):
|
||||||
theme = Theme.get_active_theme()
|
theme = Theme.get_active_theme()
|
||||||
@@ -98,7 +98,10 @@ class AdminInterfaceTestCase(TestCase):
|
|||||||
context = Context({})
|
context = Context({})
|
||||||
theme = templatetags.get_admin_interface_theme(context)
|
theme = templatetags.get_admin_interface_theme(context)
|
||||||
self.assertEqual(theme.name, 'Django')
|
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')
|
self.assertEqual(rendered, 'Django')
|
||||||
|
|
||||||
def test_templatetags_get_theme_with_request(self):
|
def test_templatetags_get_theme_with_request(self):
|
||||||
@@ -108,14 +111,19 @@ class AdminInterfaceTestCase(TestCase):
|
|||||||
})
|
})
|
||||||
theme = templatetags.get_admin_interface_theme(context)
|
theme = templatetags.get_admin_interface_theme(context)
|
||||||
self.assertEqual(theme.name, 'Django')
|
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')
|
self.assertEqual(rendered, 'Django')
|
||||||
|
|
||||||
def test_templatetags_get_version(self):
|
def test_templatetags_get_version(self):
|
||||||
context = Context({})
|
version = templatetags.get_admin_interface_version()
|
||||||
version = templatetags.get_admin_interface_version(context)
|
|
||||||
self.assertEqual(version, __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__)
|
self.assertEqual(rendered, __version__)
|
||||||
|
|
||||||
def test_repr(self):
|
def test_repr(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user