Compare commits
67 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7137cbab08 | |||
| 3f7b1e54e9 | |||
| cf76fd412e | |||
| ab0afff087 | |||
| e3811e2609 | |||
| 47a3d66d5c | |||
| 2700b4ff12 | |||
| 6a1897b95c | |||
| e5768da21b | |||
| dc8efcbd6b | |||
| 01c4ad1f06 | |||
| 4a848948a0 | |||
| a96a70400f | |||
| cc0d2a402b | |||
| 415de9ca66 | |||
| 7e57885988 | |||
| 013dcedd37 | |||
| b011256370 | |||
| 752ccbb603 | |||
| 8612012783 | |||
| f78167b711 | |||
| ef9b7e6d1b | |||
| 748b95854e | |||
| 2f10c88375 | |||
| 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 | |||
| bc9d200461 | |||
| 8c903d5f4c | |||
| c253617346 | |||
| ca2b405989 |
+2
-1
@@ -1 +1,2 @@
|
|||||||
admin_interface/static/ckeditor/* linguist-vendored
|
admin_interface/static/admin_interface/magnific-popup/* linguist-vendored=true
|
||||||
|
admin_interface/static/ckeditor/* linguist-vendored=true
|
||||||
|
|||||||
@@ -55,3 +55,5 @@ docs/_build/
|
|||||||
|
|
||||||
# PyBuilder
|
# PyBuilder
|
||||||
target/
|
target/
|
||||||
|
screenshots
|
||||||
|
TODO.txt
|
||||||
|
|||||||
+49
-18
@@ -1,29 +1,60 @@
|
|||||||
language: python
|
language: python
|
||||||
python: 3.5
|
python: 3.5
|
||||||
env:
|
env:
|
||||||
- TOX_ENV=py27-17
|
- TOX_ENV=py27-dj17
|
||||||
- TOX_ENV=py27-18
|
- TOX_ENV=py27-dj18
|
||||||
- TOX_ENV=py27-19
|
- TOX_ENV=py27-dj19
|
||||||
- TOX_ENV=py27-110
|
- TOX_ENV=py27-dj110
|
||||||
- TOX_ENV=py34-17
|
- TOX_ENV=py27-dj111
|
||||||
- TOX_ENV=py34-18
|
- TOX_ENV=py34-dj17
|
||||||
- TOX_ENV=py34-19
|
- TOX_ENV=py34-dj18
|
||||||
- TOX_ENV=py34-110
|
- TOX_ENV=py34-dj19
|
||||||
- TOX_ENV=py34-master
|
- TOX_ENV=py34-dj110
|
||||||
- TOX_ENV=py35-18
|
- TOX_ENV=py34-dj111
|
||||||
- TOX_ENV=py35-19
|
- TOX_ENV=py34-dj20
|
||||||
- TOX_ENV=py35-110
|
- TOX_ENV=py35-dj18
|
||||||
- TOX_ENV=py35-master
|
- TOX_ENV=py35-dj19
|
||||||
|
- TOX_ENV=py35-dj110
|
||||||
|
- TOX_ENV=py35-dj111
|
||||||
|
- TOX_ENV=py35-dj20
|
||||||
|
- TOX_ENV=py35-dj21
|
||||||
|
- TOX_ENV=py35-djmaster
|
||||||
|
# - TOX_ENV=py36-dj111
|
||||||
|
# - TOX_ENV=py36-dj20
|
||||||
|
# - TOX_ENV=py36-dj21
|
||||||
|
# - TOX_ENV=py36-djmaster
|
||||||
|
# - TOX_ENV=py37-dj20
|
||||||
|
# - TOX_ENV=py37-dj21
|
||||||
|
# - TOX_ENV=py37-djmaster
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- python: "3.6"
|
- python: "3.6"
|
||||||
env: TOX_ENV=py36-111
|
env: TOX_ENV=py36-dj111
|
||||||
- python: "3.6"
|
- python: "3.6"
|
||||||
env: TOX_ENV=py36-master
|
env: TOX_ENV=py36-dj20
|
||||||
|
- python: "3.6"
|
||||||
|
env: TOX_ENV=py36-dj21
|
||||||
|
- python: "3.6"
|
||||||
|
env: TOX_ENV=py36-djmaster
|
||||||
|
- python: "3.7"
|
||||||
|
env: TOX_ENV=py37-dj20
|
||||||
|
dist: xenial
|
||||||
|
language: python
|
||||||
|
sudo: required
|
||||||
|
- python: "3.7"
|
||||||
|
env: TOX_ENV=py37-dj21
|
||||||
|
dist: xenial
|
||||||
|
language: python
|
||||||
|
sudo: required
|
||||||
|
- python: "3.7"
|
||||||
|
env: TOX_ENV=py37-djmaster
|
||||||
|
dist: xenial
|
||||||
|
language: python
|
||||||
|
sudo: required
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- env: TOX_ENV=py34-master
|
- env: TOX_ENV=py35-djmaster
|
||||||
- env: TOX_ENV=py35-master
|
- env: TOX_ENV=py36-djmaster
|
||||||
- env: TOX_ENV=py36-master
|
- env: TOX_ENV=py37-djmaster
|
||||||
install:
|
install:
|
||||||
- pip install tox
|
- pip install tox
|
||||||
script:
|
script:
|
||||||
|
|||||||
@@ -8,17 +8,24 @@
|
|||||||
# django-admin-interface
|
# django-admin-interface
|
||||||
django-admin-interface is a modern **responsive flat admin interface customizable by the admin itself**.
|
django-admin-interface is a modern **responsive flat admin interface customizable by the admin itself**.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- Beautiful default **django-theme**
|
- Beautiful default **django-theme**
|
||||||
- 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`
|
- `NEW` **Enviroment label** *(development, testing, staging, production)*
|
||||||
|
- Style optimizations for:
|
||||||
|
- `django-ckeditor`
|
||||||
|
- `django-modeltranslation`
|
||||||
|
- `django-tabbed-admin`
|
||||||
|
- `sorl-thumbnail`
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
- Python 2.7, 3.4, 3.5, 3.6
|
- Python 2.7, 3.4, 3.5, 3.6, 3.7
|
||||||
- Django 1.7, 1.8, 1.9, 1.10, 1.11
|
- Django 1.7, 1.8, 1.9, 1.10, 1.11, 2.0, 2.1
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
- Run `pip install django-admin-interface`
|
- Run `pip install django-admin-interface`
|
||||||
@@ -27,7 +34,7 @@ django-admin-interface is a modern **responsive flat admin interface customizabl
|
|||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
#...
|
#...
|
||||||
'admin_interface',
|
'admin_interface',
|
||||||
'flat_responsive',
|
'flat_responsive', # only if django version < 2.0
|
||||||
'flat', # only if django version < 1.9
|
'flat', # only if django version < 1.9
|
||||||
'colorfield',
|
'colorfield',
|
||||||
#...
|
#...
|
||||||
@@ -41,7 +48,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 +58,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 +70,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 +95,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.txt).
|
||||||
|
|||||||
+69
-98
@@ -1,5 +1,4 @@
|
|||||||
|Build Status| |codecov| |Code Health| |PyPI version| |Py versions|
|
|Build Status| |codecov| |Code Health| |PyPI version| |Py versions| |License|
|
||||||
|License|
|
|
||||||
|
|
||||||
django-admin-interface
|
django-admin-interface
|
||||||
======================
|
======================
|
||||||
@@ -7,105 +6,86 @@ django-admin-interface
|
|||||||
django-admin-interface is a modern **responsive flat admin interface
|
django-admin-interface is a modern **responsive flat admin interface
|
||||||
customizable by the admin itself**.
|
customizable by the admin itself**.
|
||||||
|
|
||||||
|
|django-admin-interface_preview|
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
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,
|
- ``NEW`` **Enviroment label** (development, testing, staging, production)
|
||||||
optional)*
|
- Style optimizations for:
|
||||||
- Style optimizations for: ``django-ckeditor``,
|
- `django-ckeditor`
|
||||||
``django-modeltranslation``, ``sorl-thumbnail``
|
- `django-modeltranslation`
|
||||||
|
- `django-tabbed-admin`
|
||||||
|
- `sorl-thumbnail`
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
- Python 2.7, 3.4, 3.5, 3.6
|
- Python 2.7, 3.4, 3.5, 3.6, 3.7
|
||||||
- Django 1.7, 1.8, 1.9, 1.10, 1.11
|
- Django 1.7, 1.8, 1.9, 1.10, 1.11, 2.0, 2.1
|
||||||
|
|
||||||
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`` *(only if django version < 2.0)*, ``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 +93,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
|
|
||||||
.. |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_preview| image:: https://user-images.githubusercontent.com/1035294/35631521-64b0cab8-06a4-11e8-8f57-c04fdfbb7e8b.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_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,6 +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'
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,20 @@ class ThemeAdmin(admin.ModelAdmin):
|
|||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': ('name', 'active', )
|
'fields': ('name', 'active', )
|
||||||
}),
|
}),
|
||||||
|
('Enviroment', {
|
||||||
|
'classes': ('wide', ),
|
||||||
|
'fields': (
|
||||||
|
'env',
|
||||||
|
'env_visible',
|
||||||
|
)
|
||||||
|
}),
|
||||||
('Logo', {
|
('Logo', {
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': ('logo', 'logo_color', 'logo_visible', )
|
'fields': (
|
||||||
|
'logo',
|
||||||
|
'logo_color',
|
||||||
|
'logo_visible',
|
||||||
|
)
|
||||||
}),
|
}),
|
||||||
('Favicon', {
|
('Favicon', {
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
@@ -25,31 +36,62 @@ class ThemeAdmin(admin.ModelAdmin):
|
|||||||
}),
|
}),
|
||||||
('Title', {
|
('Title', {
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': ('title', 'title_color', 'title_visible', )
|
'fields': (
|
||||||
|
'title',
|
||||||
|
'title_color',
|
||||||
|
'title_visible',
|
||||||
|
)
|
||||||
}),
|
}),
|
||||||
('Header', {
|
('Header', {
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': ('css_header_background_color', 'css_header_text_color', 'css_header_link_color', 'css_header_link_hover_color', )
|
'fields': (
|
||||||
|
'css_header_background_color',
|
||||||
|
'css_header_text_color',
|
||||||
|
'css_header_link_color',
|
||||||
|
'css_header_link_hover_color',
|
||||||
|
)
|
||||||
}),
|
}),
|
||||||
('Breadcrumbs / Module headers', {
|
('Breadcrumbs / Module headers', {
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': ('css_module_background_color', 'css_module_text_color', 'css_module_link_color', 'css_module_link_hover_color', 'css_module_rounded_corners', )
|
'fields': (
|
||||||
|
'css_module_background_color',
|
||||||
|
'css_module_text_color',
|
||||||
|
'css_module_link_color',
|
||||||
|
'css_module_link_hover_color',
|
||||||
|
'css_module_rounded_corners',
|
||||||
|
)
|
||||||
}),
|
}),
|
||||||
('Generic Links', {
|
('Generic Links', {
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': ('css_generic_link_color', 'css_generic_link_hover_color', )
|
'fields': (
|
||||||
|
'css_generic_link_color',
|
||||||
|
'css_generic_link_hover_color',
|
||||||
|
)
|
||||||
}),
|
}),
|
||||||
('Save Buttons', {
|
('Save Buttons', {
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': ('css_save_button_background_color', 'css_save_button_background_hover_color', 'css_save_button_text_color', )
|
'fields': (
|
||||||
|
'css_save_button_background_color',
|
||||||
|
'css_save_button_background_hover_color',
|
||||||
|
'css_save_button_text_color',
|
||||||
|
)
|
||||||
}),
|
}),
|
||||||
('Delete Buttons', {
|
('Delete Buttons', {
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': ('css_delete_button_background_color', 'css_delete_button_background_hover_color', 'css_delete_button_text_color', )
|
'fields': (
|
||||||
|
'css_delete_button_background_color',
|
||||||
|
'css_delete_button_background_hover_color',
|
||||||
|
'css_delete_button_text_color',
|
||||||
|
)
|
||||||
}),
|
}),
|
||||||
('Related Modal', {
|
('Related Modal', {
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': ('related_modal_active', 'related_modal_background_color', 'related_modal_background_opacity', 'related_modal_rounded_corners', )
|
'fields': (
|
||||||
|
'related_modal_active',
|
||||||
|
'related_modal_background_color',
|
||||||
|
'related_modal_background_opacity',
|
||||||
|
'related_modal_rounded_corners',
|
||||||
|
)
|
||||||
}),
|
}),
|
||||||
('List Filter', {
|
('List Filter', {
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
@@ -64,4 +106,3 @@ class ThemeAdmin(admin.ModelAdmin):
|
|||||||
save_on_top = True
|
save_on_top = True
|
||||||
|
|
||||||
admin.site.register(Theme, ThemeAdmin)
|
admin.site.register(Theme, ThemeAdmin)
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ class AdminInterfaceConfig(AppConfig):
|
|||||||
|
|
||||||
def ready(self):
|
def ready(self):
|
||||||
|
|
||||||
|
from admin_interface import settings
|
||||||
from admin_interface.models import Theme
|
from admin_interface.models import Theme
|
||||||
post_migrate.connect(Theme.post_migrate_handler, sender = self)
|
|
||||||
|
|
||||||
|
settings.check_installed_apps()
|
||||||
|
post_migrate.connect(
|
||||||
|
Theme.post_migrate_handler, sender=self)
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
"fields": {
|
"fields": {
|
||||||
"name": "USWDS",
|
"name": "USWDS",
|
||||||
"active": true,
|
"active": true,
|
||||||
"title": "Site administration",
|
"title": "Django administration",
|
||||||
"title_color": "#FFFFFF",
|
"title_color": "#FFFFFF",
|
||||||
"title_visible": true,
|
"title_visible": false,
|
||||||
"logo": "",
|
"logo": "",
|
||||||
"logo_color": "#FFFFFF",
|
"logo_color": "#FFFFFF",
|
||||||
"logo_visible": false,
|
"logo_visible": true,
|
||||||
"css_header_background_color": "#112E51",
|
"css_header_background_color": "#112E51",
|
||||||
"css_header_text_color": "#FFFFFF",
|
"css_header_text_color": "#FFFFFF",
|
||||||
"css_header_link_color": "#FFFFFF",
|
"css_header_link_color": "#FFFFFF",
|
||||||
|
|||||||
@@ -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'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -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'),
|
||||||
|
),
|
||||||
|
]
|
||||||
+125
-60
@@ -13,29 +13,29 @@ 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.get_active_theme()
|
Theme.get_active_theme()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def post_delete_handler(instance, **kwargs):
|
def post_delete_handler(**kwargs):
|
||||||
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.get_active_theme()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_active_theme():
|
def get_active_theme():
|
||||||
|
|
||||||
objs_active_qs = Theme.objects.filter( active = True )
|
objs_active_qs = Theme.objects.filter(active=True)
|
||||||
objs_active_ls = list(objs_active_qs)
|
objs_active_ls = list(objs_active_qs)
|
||||||
objs_active_count = len(objs_active_ls)
|
objs_active_count = len(objs_active_ls)
|
||||||
|
|
||||||
if objs_active_count == 0:
|
if objs_active_count == 0:
|
||||||
default_obj, default_obj_created = Theme.objects.get_or_create(pk = '1', defaults = { 'active':True })
|
default_obj, default_obj_created = Theme.objects.get_or_create(
|
||||||
|
pk='1', defaults={'active': True})
|
||||||
if not default_obj_created:
|
if not default_obj_created:
|
||||||
default_obj.set_active()
|
default_obj.set_active()
|
||||||
obj = default_obj
|
obj = default_obj
|
||||||
@@ -49,61 +49,127 @@ class Theme(models.Model):
|
|||||||
|
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
name = models.CharField( max_length = 50, default = 'Django' )
|
name = models.CharField(max_length=50, default='Django')
|
||||||
active = models.BooleanField( default = True )
|
active = models.BooleanField(default=True)
|
||||||
|
|
||||||
title = models.CharField( max_length = 50, default = 'Django administration', blank = True )
|
title = models.CharField(
|
||||||
title_color = ColorField( blank = True, default = '#F5DD5D', help_text = '#F5DD5D', max_length = 10, verbose_name = 'title color' )
|
max_length=50, default='Django administration', blank=True)
|
||||||
title_visible = models.BooleanField( default = True, verbose_name = 'visible' )
|
title_color = ColorField(
|
||||||
|
blank=True, default='#F5DD5D', help_text='#F5DD5D',
|
||||||
|
max_length=10, verbose_name='title color')
|
||||||
|
title_visible = models.BooleanField(
|
||||||
|
default=True, verbose_name='visible')
|
||||||
|
|
||||||
logo = models.FileField( upload_to = 'admin-interface/logo/', blank = True, help_text = '(leave blank to use the default Django logo)' )
|
logo = models.FileField(
|
||||||
logo_color = ColorField( blank = True, default = '#FFFFFF', help_text = '#FFFFFF', max_length = 10, verbose_name = 'logo color' )
|
upload_to='admin-interface/logo/', blank=True,
|
||||||
logo_visible = models.BooleanField( default = True, verbose_name = 'visible' )
|
help_text='(leave blank to use the default Django logo)')
|
||||||
|
logo_color = ColorField(
|
||||||
|
blank=True, default='#FFFFFF', help_text='#FFFFFF',
|
||||||
|
max_length=10, verbose_name='logo color')
|
||||||
|
logo_visible = models.BooleanField(
|
||||||
|
default=True, verbose_name='visible')
|
||||||
|
|
||||||
favicon = models.FileField( upload_to = 'admin-interface/favicon/', blank = True, help_text = '(.ico|.png|.gif - 16x16|32x32 px)', verbose_name = 'favicon' )
|
favicon = models.FileField(
|
||||||
|
upload_to='admin-interface/favicon/', blank=True,
|
||||||
|
help_text='(.ico|.png|.gif - 16x16|32x32 px)', verbose_name='favicon')
|
||||||
|
|
||||||
css_header_background_color = ColorField( blank = True, default = '#0C4B33', help_text = '#0C4B33', max_length = 10, verbose_name = 'background color' )
|
env_choices = (
|
||||||
css_header_text_color = ColorField( blank = True, default = '#44B78B', help_text = '#44B78B', max_length = 10, verbose_name = 'text color' )
|
('development', 'Development', ),
|
||||||
css_header_link_color = ColorField( blank = True, default = '#FFFFFF', help_text = '#FFFFFF', max_length = 10, verbose_name = 'link color' )
|
('testing', 'Testing', ),
|
||||||
css_header_link_hover_color = ColorField( blank = True, default = '#C9F0DD', help_text = '#C9F0DD', max_length = 10, verbose_name = 'link hover color' )
|
('staging', 'Staging', ),
|
||||||
|
('production', 'Production', ),
|
||||||
css_module_background_color = ColorField( blank = True, default = '#44B78B', help_text = '#44B78B', max_length = 10, verbose_name = 'background color' )
|
|
||||||
css_module_text_color = ColorField( blank = True, default = '#FFFFFF', help_text = '#FFFFFF', max_length = 10, verbose_name = 'text color' )
|
|
||||||
css_module_link_color = ColorField( blank = True, default = '#FFFFFF', help_text = '#FFFFFF', max_length = 10, verbose_name = 'link color' )
|
|
||||||
css_module_link_hover_color = ColorField( blank = True, default = '#C9F0DD', help_text = '#C9F0DD', max_length = 10, verbose_name = 'link hover color' )
|
|
||||||
css_module_rounded_corners = models.BooleanField( default = True, verbose_name = 'rounded corners' )
|
|
||||||
|
|
||||||
css_generic_link_color = ColorField( blank = True, default = '#0C3C26', help_text = '#0C3C26', max_length = 10, verbose_name = 'link color' )
|
|
||||||
css_generic_link_hover_color = ColorField( blank = True, default = '#156641', help_text = '#156641', max_length = 10, verbose_name = 'link hover color' )
|
|
||||||
|
|
||||||
css_save_button_background_color = ColorField( blank = True, default = '#0C4B33', help_text = '#0C4B33', max_length = 10, verbose_name = 'background color' )
|
|
||||||
css_save_button_background_hover_color = ColorField( blank = True, default = '#0C3C26', help_text = '#0C3C26', max_length = 10, verbose_name = 'background hover color' )
|
|
||||||
css_save_button_text_color = ColorField( blank = True, default = '#FFFFFF', help_text = '#FFFFFF', max_length = 10, verbose_name = 'text color' )
|
|
||||||
|
|
||||||
css_delete_button_background_color = ColorField( blank = True, default = '#BA2121', help_text = '#BA2121', max_length = 10, verbose_name = 'background color' )
|
|
||||||
css_delete_button_background_hover_color = ColorField( blank = True, default = '#A41515', help_text = '#A41515', max_length = 10, verbose_name = 'background hover color' )
|
|
||||||
css_delete_button_text_color = ColorField( blank = True, default = '#FFFFFF', help_text = '#FFFFFF', max_length = 10, verbose_name = 'text color' )
|
|
||||||
|
|
||||||
css = models.TextField( blank = True )
|
|
||||||
|
|
||||||
related_modal_active = models.BooleanField( default = True, verbose_name = 'active' )
|
|
||||||
related_modal_background_color = ColorField( 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%', ),
|
|
||||||
)
|
)
|
||||||
related_modal_background_opacity = models.FloatField( choices = related_modal_background_opacity_choices, default = 0.2, help_text = '20%', verbose_name = 'background opacity' )
|
env = models.CharField(
|
||||||
related_modal_rounded_corners = models.BooleanField( default = True, verbose_name = 'rounded corners' )
|
max_length=50,
|
||||||
|
choices=env_choices,
|
||||||
|
default='development', verbose_name='enviroment')
|
||||||
|
env_visible = models.BooleanField(
|
||||||
|
default=True, verbose_name='visible')
|
||||||
|
|
||||||
list_filter_dropdown = models.BooleanField( default = False, verbose_name = 'use dropdown' )
|
css_header_background_color = ColorField(
|
||||||
recent_actions_visible = models.BooleanField( default = True, verbose_name = 'visible' )
|
blank=True, default='#0C4B33', help_text='#0C4B33',
|
||||||
|
max_length=10, verbose_name='background color')
|
||||||
|
css_header_text_color = ColorField(
|
||||||
|
blank=True, default='#44B78B', help_text='#44B78B',
|
||||||
|
max_length=10, verbose_name='text color')
|
||||||
|
css_header_link_color = ColorField(
|
||||||
|
blank=True, default='#FFFFFF', help_text='#FFFFFF',
|
||||||
|
max_length=10, verbose_name='link color')
|
||||||
|
css_header_link_hover_color = ColorField(
|
||||||
|
blank=True, default='#C9F0DD', help_text='#C9F0DD',
|
||||||
|
max_length=10, verbose_name='link hover color')
|
||||||
|
|
||||||
|
css_module_background_color = ColorField(
|
||||||
|
blank=True, default='#44B78B', help_text='#44B78B',
|
||||||
|
max_length=10, verbose_name='background color')
|
||||||
|
css_module_text_color = ColorField(
|
||||||
|
blank=True, default='#FFFFFF', help_text='#FFFFFF',
|
||||||
|
max_length=10, verbose_name='text color')
|
||||||
|
css_module_link_color = ColorField(
|
||||||
|
blank=True, default='#FFFFFF', help_text='#FFFFFF',
|
||||||
|
max_length=10, verbose_name='link color')
|
||||||
|
css_module_link_hover_color = ColorField(
|
||||||
|
blank=True, default='#C9F0DD', help_text='#C9F0DD',
|
||||||
|
max_length=10, verbose_name='link hover color')
|
||||||
|
css_module_rounded_corners = models.BooleanField(
|
||||||
|
default=True, verbose_name='rounded corners')
|
||||||
|
|
||||||
|
css_generic_link_color = ColorField(
|
||||||
|
blank=True, default='#0C3C26', help_text='#0C3C26',
|
||||||
|
max_length=10, verbose_name='link color')
|
||||||
|
css_generic_link_hover_color = ColorField(
|
||||||
|
blank=True, default='#156641', help_text='#156641',
|
||||||
|
max_length=10, verbose_name='link hover color')
|
||||||
|
|
||||||
|
css_save_button_background_color = ColorField(
|
||||||
|
blank=True, default='#0C4B33', help_text='#0C4B33',
|
||||||
|
max_length=10, verbose_name='background color')
|
||||||
|
css_save_button_background_hover_color = ColorField(
|
||||||
|
blank=True, default='#0C3C26', help_text='#0C3C26',
|
||||||
|
max_length=10, verbose_name='background hover color')
|
||||||
|
css_save_button_text_color = ColorField(
|
||||||
|
blank=True, default='#FFFFFF', help_text='#FFFFFF',
|
||||||
|
max_length=10, verbose_name='text color')
|
||||||
|
|
||||||
|
css_delete_button_background_color = ColorField(
|
||||||
|
blank=True, default='#BA2121', help_text='#BA2121',
|
||||||
|
max_length=10, verbose_name='background color')
|
||||||
|
css_delete_button_background_hover_color = ColorField(
|
||||||
|
blank=True, default='#A41515', help_text='#A41515',
|
||||||
|
max_length=10, verbose_name='background hover color')
|
||||||
|
css_delete_button_text_color = ColorField(
|
||||||
|
blank=True, default='#FFFFFF', help_text='#FFFFFF',
|
||||||
|
max_length=10, verbose_name='text color')
|
||||||
|
|
||||||
|
css = models.TextField(blank=True)
|
||||||
|
|
||||||
|
related_modal_active = models.BooleanField(
|
||||||
|
default=True, verbose_name='active')
|
||||||
|
related_modal_background_color = ColorField(
|
||||||
|
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%', ),
|
||||||
|
)
|
||||||
|
related_modal_background_opacity = models.CharField(
|
||||||
|
max_length=5,
|
||||||
|
choices=related_modal_background_opacity_choices,
|
||||||
|
default='0.3', help_text='20%', verbose_name='background opacity')
|
||||||
|
related_modal_rounded_corners = models.BooleanField(
|
||||||
|
default=True, verbose_name='rounded corners')
|
||||||
|
|
||||||
|
list_filter_dropdown = models.BooleanField(
|
||||||
|
default=False, verbose_name='use dropdown')
|
||||||
|
recent_actions_visible = models.BooleanField(
|
||||||
|
default=True, verbose_name='visible')
|
||||||
|
|
||||||
def set_active(self):
|
def set_active(self):
|
||||||
|
|
||||||
@@ -121,6 +187,5 @@ class Theme(models.Model):
|
|||||||
return force_text(self.name)
|
return force_text(self.name)
|
||||||
|
|
||||||
|
|
||||||
post_delete.connect(Theme.post_delete_handler, sender = Theme)
|
post_delete.connect(Theme.post_delete_handler, sender=Theme)
|
||||||
post_save.connect(Theme.post_save_handler, sender = Theme)
|
post_save.connect(Theme.post_save_handler, sender=Theme)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import django
|
||||||
|
from django.conf import settings
|
||||||
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
|
|
||||||
|
|
||||||
|
def check_installed_apps():
|
||||||
|
dj_version = django.VERSION
|
||||||
|
installed_apps = settings.INSTALLED_APPS
|
||||||
|
|
||||||
|
if 'colorfield' not in installed_apps:
|
||||||
|
raise ImproperlyConfigured(
|
||||||
|
'\'colorfield\' needed, '
|
||||||
|
'add it to settings.INSTALLED_APPS.')
|
||||||
|
|
||||||
|
if dj_version < (1, 9):
|
||||||
|
if 'flat' not in installed_apps:
|
||||||
|
raise ImproperlyConfigured(
|
||||||
|
'\'flat\' needed before django 1.9, '
|
||||||
|
'add it to settings.INSTALLED_APPS.')
|
||||||
|
else:
|
||||||
|
if 'flat' in installed_apps:
|
||||||
|
raise ImproperlyConfigured(
|
||||||
|
'\'flat\' not needed since django 1.9, '
|
||||||
|
'remove it from settings.INSTALLED_APPS.')
|
||||||
|
|
||||||
|
if dj_version < (2, 0):
|
||||||
|
if 'flat_responsive' not in installed_apps:
|
||||||
|
raise ImproperlyConfigured(
|
||||||
|
'\'flat_responsive\' needed before django 2.0, '
|
||||||
|
'add it to settings.INSTALLED_APPS.')
|
||||||
|
else:
|
||||||
|
if 'flat_responsive' in installed_apps:
|
||||||
|
raise ImproperlyConfigured(
|
||||||
|
'\'flat_responsive\' not needed since django 2.0, '
|
||||||
|
'remove it from settings.INSTALLED_APPS.')
|
||||||
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined')
|
||||||
|
{
|
||||||
|
(function($) {
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
$('.cancel-link').click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var parentWindow = window.parent;
|
||||||
|
if (parentWindow && typeof(parentWindow.dismissRelatedObjectModal) === 'function') {
|
||||||
|
parentWindow.dismissRelatedObjectModal();
|
||||||
|
} else {
|
||||||
|
// fallback to default behavior
|
||||||
|
history.back();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
})(django.jQuery);
|
||||||
|
}
|
||||||
@@ -1,45 +1,52 @@
|
|||||||
/*global opener */
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
var windowRef = window;
|
|
||||||
var windowName = windowRef.name;
|
function getModalWindowData()
|
||||||
var widgetName = windowName.replace(/^(change|add|delete|lookup)_/, '');
|
{
|
||||||
//var windowNames = windowName.split('____');
|
var windowRef = window;
|
||||||
//var widgetName = windowNames[(windowNames.length - 1)];
|
var windowName = windowRef.name;
|
||||||
//widgetName = widgetName.replace(/^(change|add|delete|lookup)_/, '');
|
var widgetName = windowName.replace(/^(change|add|delete|lookup)_/, '');
|
||||||
//console.log('dismiss modal and update widget with id: "' + widgetName + '"');
|
var modalRef = {};
|
||||||
var modalRef = {};
|
var openerRef = windowRef.opener;
|
||||||
var openerRef = windowRef.opener;
|
if (!openerRef) {
|
||||||
if(!openerRef){
|
openerRef = windowRef.parent;
|
||||||
openerRef = windowRef.parent;
|
modalRef = {
|
||||||
modalRef = {
|
name: openerRef.id_to_windowname(widgetName),
|
||||||
name: openerRef.id_to_windowname(widgetName),
|
close: function(){
|
||||||
close: function(){
|
openerRef.dismissRelatedObjectModal();
|
||||||
openerRef.dismissRelatedObjectModal();
|
}
|
||||||
}
|
};
|
||||||
};
|
}
|
||||||
|
return { opener:openerRef, modal:modalRef };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var modalData = getModalWindowData();
|
||||||
|
var modalRef = modalData['modal'];
|
||||||
|
var openerRef = modalData['opener'];
|
||||||
|
|
||||||
var initData = JSON.parse(document.getElementById('django-admin-popup-response-constants').dataset.popupResponse);
|
var initData = JSON.parse(document.getElementById('django-admin-popup-response-constants').dataset.popupResponse);
|
||||||
switch(initData.action){
|
// console.log(initData);
|
||||||
|
switch (initData.action) {
|
||||||
case 'change':
|
case 'change':
|
||||||
if( typeof(openerRef.dismissChangeRelatedObjectPopup) == 'function' ){
|
if (typeof(openerRef.dismissChangeRelatedObjectPopup) === 'function') {
|
||||||
openerRef.dismissChangeRelatedObjectPopup(modalRef, initData.value, initData.obj, initData.new_value);
|
openerRef.dismissChangeRelatedObjectPopup(modalRef, initData.value, initData.obj, initData.new_value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
if( typeof(openerRef.dismissDeleteRelatedObjectPopup) == 'function' ){
|
if (typeof(openerRef.dismissDeleteRelatedObjectPopup) === 'function') {
|
||||||
openerRef.dismissDeleteRelatedObjectPopup(modalRef, initData.value);
|
openerRef.dismissDeleteRelatedObjectPopup(modalRef, initData.value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if( typeof(openerRef.dismissAddRelatedObjectPopup) == 'function' ){
|
if (typeof(openerRef.dismissAddRelatedObjectPopup) === 'function') {
|
||||||
openerRef.dismissAddRelatedObjectPopup(modalRef, initData.value, initData.obj);
|
openerRef.dismissAddRelatedObjectPopup(modalRef, initData.value, initData.obj);
|
||||||
}
|
}
|
||||||
else if( typeof(openerRef.dismissAddAnotherPopup) == 'function' ){
|
else if (typeof(openerRef.dismissAddAnotherPopup) === 'function') {
|
||||||
// django 1.7 compatibility
|
// django 1.7 compatibility
|
||||||
openerRef.dismissAddAnotherPopup(modalRef, initData.value, initData.obj);
|
openerRef.dismissAddAnotherPopup(modalRef, initData.value, initData.obj);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
})();
|
|
||||||
|
|
||||||
|
})();
|
||||||
@@ -1,23 +1,45 @@
|
|||||||
if(typeof django !== 'undefined' && typeof django.jQuery !== 'undefined' )
|
if (typeof(django) !== 'undefined' && typeof(django.jQuery) !== 'undefined')
|
||||||
{
|
{
|
||||||
(function($) {
|
(function($) {
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
// create the function that will close the modal
|
function dismissModal()
|
||||||
function dismissRelatedObjectModal()
|
|
||||||
{
|
{
|
||||||
// close the popup as modal
|
|
||||||
$.magnificPopup.close();
|
$.magnificPopup.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
// assign the function to a global variable
|
// create the function that will close the modal
|
||||||
|
function dismissRelatedObjectModal()
|
||||||
|
{
|
||||||
|
dismissModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
function dismissRelatedLookupModal(win, chosenId)
|
||||||
|
{
|
||||||
|
var windowRef = win;
|
||||||
|
var windowName = windowRef.name;
|
||||||
|
var widgetName = windowName.replace(/^(change|add|delete|lookup)_/, '');
|
||||||
|
var widgetEl = $('#' + widgetName);
|
||||||
|
var widgetVal = widgetEl.val();
|
||||||
|
if (widgetEl.hasClass('vManyToManyRawIdAdminField') && Boolean(widgetVal)) {
|
||||||
|
widgetEl.val(widgetVal + ', ' + chosenId);
|
||||||
|
} else {
|
||||||
|
widgetEl.val(chosenId);
|
||||||
|
}
|
||||||
|
dismissModal();
|
||||||
|
}
|
||||||
|
|
||||||
|
// assign functions to global variables
|
||||||
window.dismissRelatedObjectModal = dismissRelatedObjectModal;
|
window.dismissRelatedObjectModal = dismissRelatedObjectModal;
|
||||||
|
window.dismissRelatedLookupPopup = dismissRelatedLookupModal;
|
||||||
|
|
||||||
function presentRelatedObjectModal(e)
|
function presentRelatedObjectModal(e)
|
||||||
{
|
{
|
||||||
var href = ($(this).attr('href') || '');
|
var linkEl = $(this);
|
||||||
if( href == '' ){
|
|
||||||
|
var href = (linkEl.attr('href') || '');
|
||||||
|
if (href == '') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,40 +48,57 @@ if(typeof django !== 'undefined' && typeof django.jQuery !== 'undefined' )
|
|||||||
e.stopImmediatePropagation();
|
e.stopImmediatePropagation();
|
||||||
|
|
||||||
// remove focus from clicked link
|
// remove focus from clicked link
|
||||||
$(this).blur();
|
linkEl.blur();
|
||||||
|
|
||||||
// use the clicked link id as iframe name
|
// use the clicked link id as iframe name
|
||||||
// it will be available as window.name in the loaded iframe
|
// it will be available as window.name in the loaded iframe
|
||||||
var iframeName = $(this).attr('id');
|
var iframeName = linkEl.attr('id');
|
||||||
// var iframeName = String(window.name + '____' + $(this).attr('id'));
|
|
||||||
// console.log('open modal with name: "' + iframeName + '"');
|
|
||||||
|
|
||||||
// browsers stop loading nested iframes having the same src url
|
|
||||||
// create a random parameter and append it to the src url to prevent it
|
|
||||||
var iframeSrcRandom = String(Math.round(Math.random() * 999999));
|
|
||||||
var iframeSrc = href;
|
var iframeSrc = href;
|
||||||
|
|
||||||
// fix for django 1.7
|
if (e.data.lookup !== true)
|
||||||
if( iframeSrc.indexOf('_popup=1') == -1 ){
|
{
|
||||||
iframeSrc += '&_popup=1';
|
// browsers stop loading nested iframes having the same src url
|
||||||
|
// create a random parameter and append it to the src url to prevent it
|
||||||
|
// this workaround doesn't work with related lookup url
|
||||||
|
var iframeSrcRandom = String(Math.round(Math.random() * 999999));
|
||||||
|
if( iframeSrc.indexOf('?') === -1 ){
|
||||||
|
iframeSrc += '?_modal=' + iframeSrcRandom;
|
||||||
|
} else {
|
||||||
|
iframeSrc += '&_modal=' + iframeSrcRandom;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
iframeSrc += '&_modal=' + iframeSrcRandom;
|
// fix for django 1.7
|
||||||
|
if (iframeSrc.indexOf('_popup=1') === -1) {
|
||||||
|
if (iframeSrc.indexOf('?') === -1) {
|
||||||
|
iframeSrc += '?_popup=1';
|
||||||
|
} else {
|
||||||
|
iframeSrc += '&_popup=1';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// build the iframe html
|
// build the iframe html
|
||||||
// var iframeHTML = '<iframe id="related-modal" name="' + iframeName + '" src="' + iframeSrc + '"></iframe>';
|
|
||||||
var iframeHTML = '<iframe id="related-modal-iframe" name="' + iframeName + '" src="' + iframeSrc + '"></iframe>';
|
var iframeHTML = '<iframe id="related-modal-iframe" name="' + iframeName + '" src="' + iframeSrc + '"></iframe>';
|
||||||
|
|
||||||
// create the iframe jquery element
|
// create the iframe jquery element
|
||||||
var iframeEl = $(iframeHTML);
|
var iframeEl = $(iframeHTML);
|
||||||
|
|
||||||
|
if (e.data.lookup === true)
|
||||||
|
{
|
||||||
|
// set current window as iframe opener because
|
||||||
|
// the callback is called on the opener window
|
||||||
|
iframeEl.load(function(){
|
||||||
|
var iframeObj = $(this).get(0);
|
||||||
|
var iframeWindow = iframeObj.contentWindow;
|
||||||
|
iframeWindow.opener = window;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// the modal css class
|
// the modal css class
|
||||||
var iframeInternalModalClass = 'related-modal';
|
var iframeInternalModalClass = 'related-modal';
|
||||||
|
|
||||||
// if the current window is inside an iframe, it means that it is already in a modal,
|
// if the current window is inside an iframe, it means that it is already in a modal,
|
||||||
// append an additional css class to the modal to offer more customization
|
// append an additional css class to the modal to offer more customization
|
||||||
if( window.top != window.self )
|
if (window.top != window.self) {
|
||||||
{
|
|
||||||
iframeInternalModalClass += ' related-modal__nested';
|
iframeInternalModalClass += ' related-modal__nested';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,12 +118,15 @@ if(typeof django !== 'undefined' && typeof django.jQuery !== 'undefined' )
|
|||||||
|
|
||||||
// django 1.7 compatibility
|
// django 1.7 compatibility
|
||||||
$('a.add-another').removeAttr('onclick');
|
$('a.add-another').removeAttr('onclick');
|
||||||
$('a.add-another').click( presentRelatedObjectModal );
|
$('a.add-another').click({ lookup:false }, presentRelatedObjectModal);
|
||||||
|
|
||||||
// django 1.8 and above
|
// django 1.8 and above
|
||||||
$('a.related-widget-wrapper-link').click( presentRelatedObjectModal );
|
$('a.related-widget-wrapper-link').click({ lookup:false }, presentRelatedObjectModal);
|
||||||
|
|
||||||
|
// raw_id_fields support
|
||||||
|
$('a.related-lookup').unbind('click');
|
||||||
|
$('a.related-lookup').click({ lookup:true }, presentRelatedObjectModal);
|
||||||
});
|
});
|
||||||
|
|
||||||
})(django.jQuery);
|
})(django.jQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,8 +19,10 @@ https://github.com/fabiocaccamo/django-admin-interface
|
|||||||
{% include "admin_interface/css/list-filter-dropdown.css" %}
|
{% include "admin_interface/css/list-filter-dropdown.css" %}
|
||||||
{% include "admin_interface/css/recent-actions.css" %}
|
{% include "admin_interface/css/recent-actions.css" %}
|
||||||
{% include "admin_interface/css/related-modal.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/modeltranslation.css" %}
|
||||||
{% include "admin_interface/css/sorl-thumbnail.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/ckeditor.css" %}
|
||||||
{% include "admin_interface/css/tinymce.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>
|
<span>{% if theme.title %}{% trans theme.title %}{% else %}{% trans 'Django administration' %}{% endif %}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h1>
|
</h1>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block welcome-msg %}
|
||||||
|
{% get_admin_interface_theme as theme %}
|
||||||
|
{% if theme.env_visible %}<span class="enviroment-label {{ theme.env }}"></span> - {% endif %}{{ block.super }}<br>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
@@ -286,60 +308,28 @@ body.admin-interface .paginator a.showall:visited {
|
|||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
flex: 0 1 auto;
|
flex: 0 1 auto;
|
||||||
}
|
}
|
||||||
|
.admin-interface .aligned .form-row input[type="file"] {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* improve responsive selector */
|
/* improve responsive selector */
|
||||||
.admin-interface .selector.stacked {
|
|
||||||
width: 480px;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.admin-interface .selector.stacked .selector-chooser {
|
/* fix [stacked, not-stacked] equalize horizontal and vertical select padding for selector */
|
||||||
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 */
|
|
||||||
.admin-interface .selector .selector-available select,
|
.admin-interface .selector .selector-available select,
|
||||||
.admin-interface .selector .selector-chosen select {
|
.admin-interface .selector .selector-chosen select {
|
||||||
padding: 7px 10px;
|
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){
|
@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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -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
|
django-modeltranslation support
|
||||||
https://github.com/deschler/django-modeltranslation/pull/313/commits
|
https://github.com/deschler/django-modeltranslation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.admin-interface #content h1 select {
|
.admin-interface #content h1 select {
|
||||||
text-transform:uppercase;
|
text-transform: uppercase;
|
||||||
margin-left:15px;
|
margin-left: 15px;
|
||||||
|
min-width: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-interface .ui-tabs .ui-tabs-nav {
|
.admin-interface .ui-tabs .ui-tabs-panel[id^=tab_id_] {
|
||||||
padding:10px 0 0 10px;
|
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">
|
<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>
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from django import template
|
from django import template, VERSION
|
||||||
|
|
||||||
from admin_interface.models import Theme
|
from admin_interface.models import Theme
|
||||||
from admin_interface.version import __version__
|
from admin_interface.version import __version__
|
||||||
|
|
||||||
register = template.Library()
|
register = template.Library()
|
||||||
|
|
||||||
try:
|
if VERSION < (1, 9):
|
||||||
assignment_tag = register.assignment_tag
|
simple_tag = register.assignment_tag
|
||||||
except AttributeError:
|
else:
|
||||||
assignment_tag = register.simple_tag
|
simple_tag = register.simple_tag
|
||||||
|
|
||||||
|
|
||||||
@assignment_tag(takes_context = True)
|
@simple_tag(takes_context=True)
|
||||||
def get_admin_interface_theme(context):
|
def get_admin_interface_theme(context):
|
||||||
|
|
||||||
theme = None
|
theme = None
|
||||||
request = context.get('request', None)
|
request = context.get('request', None)
|
||||||
|
|
||||||
@@ -31,7 +30,6 @@ def get_admin_interface_theme(context):
|
|||||||
return theme
|
return theme
|
||||||
|
|
||||||
|
|
||||||
@assignment_tag(takes_context = True)
|
@simple_tag(takes_context=False)
|
||||||
def get_admin_interface_version(context):
|
def get_admin_interface_version():
|
||||||
return __version__
|
return __version__
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
__version__ = '0.5.3'
|
__version__ = '0.8.1'
|
||||||
|
|
||||||
|
|||||||
@@ -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',
|
||||||
@@ -30,6 +45,8 @@ setup(
|
|||||||
'Framework :: Django :: 1.9',
|
'Framework :: Django :: 1.9',
|
||||||
'Framework :: Django :: 1.10',
|
'Framework :: Django :: 1.10',
|
||||||
'Framework :: Django :: 1.11',
|
'Framework :: Django :: 1.11',
|
||||||
|
'Framework :: Django :: 2.0',
|
||||||
|
'Framework :: Django :: 2.1',
|
||||||
'Intended Audience :: Developers',
|
'Intended Audience :: Developers',
|
||||||
'License :: OSI Approved :: MIT License',
|
'License :: OSI Approved :: MIT License',
|
||||||
'Natural Language :: English',
|
'Natural Language :: English',
|
||||||
@@ -40,9 +57,9 @@ setup(
|
|||||||
'Programming Language :: Python :: 3.4',
|
'Programming Language :: Python :: 3.4',
|
||||||
'Programming Language :: Python :: 3.5',
|
'Programming Language :: Python :: 3.5',
|
||||||
'Programming Language :: Python :: 3.6',
|
'Programming Language :: Python :: 3.6',
|
||||||
|
'Programming Language :: Python :: 3.7',
|
||||||
'Topic :: Software Development :: Build Tools',
|
'Topic :: Software Development :: Build Tools',
|
||||||
],
|
],
|
||||||
license='MIT',
|
license='MIT',
|
||||||
test_suite='runtests.runtests'
|
test_suite='runtests.runtests'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+31
-8
@@ -9,24 +9,46 @@ SECRET_KEY = 'django-admin-interface'
|
|||||||
|
|
||||||
ALLOWED_HOSTS = ['*']
|
ALLOWED_HOSTS = ['*']
|
||||||
|
|
||||||
|
# Application definition
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
|
|
||||||
'admin_interface',
|
'admin_interface',
|
||||||
'flat_responsive',
|
|
||||||
'flat', #if django version < 1.9
|
|
||||||
'colorfield',
|
'colorfield',
|
||||||
|
]
|
||||||
|
|
||||||
|
if django.VERSION < (1, 9):
|
||||||
|
# ONLY if django version < 1.9
|
||||||
|
INSTALLED_APPS += [
|
||||||
|
'flat',
|
||||||
|
]
|
||||||
|
|
||||||
|
if django.VERSION < (2, 0):
|
||||||
|
# ONLY if django version < 2.0
|
||||||
|
INSTALLED_APPS += [
|
||||||
|
'flat_responsive',
|
||||||
|
]
|
||||||
|
|
||||||
|
INSTALLED_APPS += [
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
|
'django.contrib.messages',
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = [
|
if django.VERSION < (2, 0):
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
MIDDLEWARE_CLASSES = [
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.messages.middleware.MessageMiddleware'
|
||||||
]
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
|
'django.middleware.common.CommonMiddleware',
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
MIDDLEWARE = [
|
||||||
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
|
'django.middleware.common.CommonMiddleware',
|
||||||
|
]
|
||||||
|
|
||||||
TEMPLATES = [{
|
TEMPLATES = [{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
@@ -35,6 +57,7 @@ TEMPLATES = [{
|
|||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'context_processors': [
|
'context_processors': [
|
||||||
'django.contrib.auth.context_processors.auth',
|
'django.contrib.auth.context_processors.auth',
|
||||||
|
'django.contrib.messages.context_processors.messages',
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
},]
|
},]
|
||||||
|
|||||||
@@ -0,0 +1,92 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import django
|
||||||
|
from django.conf import settings
|
||||||
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
|
from django.test import override_settings, TestCase
|
||||||
|
|
||||||
|
from admin_interface.settings import check_installed_apps
|
||||||
|
|
||||||
|
|
||||||
|
class AdminInterfaceSettingsTestCase(TestCase):
|
||||||
|
|
||||||
|
DJANGO_APPS = [
|
||||||
|
'django.contrib.admin',
|
||||||
|
'django.contrib.auth',
|
||||||
|
'django.contrib.contenttypes',
|
||||||
|
'django.contrib.messages',
|
||||||
|
'django.contrib.sessions',
|
||||||
|
]
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def __test_installed_apps(self):
|
||||||
|
dj_version = django.VERSION
|
||||||
|
installed_apps = settings.INSTALLED_APPS
|
||||||
|
|
||||||
|
if 'colorfield' not in installed_apps:
|
||||||
|
self.assertRaises(ImproperlyConfigured, check_installed_apps)
|
||||||
|
|
||||||
|
elif 'flat' not in installed_apps and dj_version < (1, 9):
|
||||||
|
self.assertRaises(ImproperlyConfigured, check_installed_apps)
|
||||||
|
|
||||||
|
elif 'flat' in installed_apps and dj_version >= (1, 9):
|
||||||
|
self.assertRaises(ImproperlyConfigured, check_installed_apps)
|
||||||
|
|
||||||
|
elif 'flat_responsive' not in installed_apps and dj_version < (2, 0):
|
||||||
|
self.assertRaises(ImproperlyConfigured, check_installed_apps)
|
||||||
|
|
||||||
|
elif 'flat_responsive' in installed_apps and dj_version >= (2, 0):
|
||||||
|
self.assertRaises(ImproperlyConfigured, check_installed_apps)
|
||||||
|
|
||||||
|
else:
|
||||||
|
check_installed_apps()
|
||||||
|
|
||||||
|
@override_settings(
|
||||||
|
INSTALLED_APPS = [
|
||||||
|
'admin_interface',
|
||||||
|
'colorfield',
|
||||||
|
'flat',
|
||||||
|
'flat_responsive',
|
||||||
|
] + DJANGO_APPS
|
||||||
|
)
|
||||||
|
def test_installed_apps_all(self):
|
||||||
|
self.__test_installed_apps()
|
||||||
|
|
||||||
|
@override_settings(
|
||||||
|
INSTALLED_APPS = [
|
||||||
|
'admin_interface',
|
||||||
|
# 'colorfield',
|
||||||
|
'flat',
|
||||||
|
'flat_responsive',
|
||||||
|
] + DJANGO_APPS
|
||||||
|
)
|
||||||
|
def test_installed_apps_no_colorfield(self):
|
||||||
|
self.__test_installed_apps()
|
||||||
|
|
||||||
|
@override_settings(
|
||||||
|
INSTALLED_APPS = [
|
||||||
|
'admin_interface',
|
||||||
|
'colorfield',
|
||||||
|
# 'flat',
|
||||||
|
'flat_responsive',
|
||||||
|
] + DJANGO_APPS
|
||||||
|
)
|
||||||
|
def test_installed_apps_no_flat(self):
|
||||||
|
self.__test_installed_apps()
|
||||||
|
|
||||||
|
@override_settings(
|
||||||
|
INSTALLED_APPS = [
|
||||||
|
'admin_interface',
|
||||||
|
'colorfield',
|
||||||
|
'flat',
|
||||||
|
# 'flat_responsive',
|
||||||
|
] + DJANGO_APPS
|
||||||
|
)
|
||||||
|
def test_installed_apps_no_flat_responsive(self):
|
||||||
|
self.__test_installed_apps()
|
||||||
|
|
||||||
+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):
|
||||||
|
|||||||
@@ -1,21 +1,24 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
py27-{17,18,19,110,111},
|
py27-{dj17,dj18,dj19,dj110,dj111},
|
||||||
py34-{17,18,19,110,111,master},
|
py34-{dj17,dj18,dj19,dj110,dj111,dj20},
|
||||||
py35-{18,19,110,111,master},
|
py35-{dj18,dj19,dj110,dj111,dj20,dj21,djmaster},
|
||||||
py36-{18,19,110,111,master},
|
py36-{dj18,dj19,dj110,dj111,dj20,dj21,djmaster},
|
||||||
|
py37-{dj20,dj21,djmaster},
|
||||||
[testenv]
|
[testenv]
|
||||||
passenv = CI TRAVIS TRAVIS_*
|
passenv = CI TRAVIS TRAVIS_*
|
||||||
deps =
|
deps =
|
||||||
17: Django >= 1.7, < 1.8
|
dj17: Django >= 1.7, < 1.8
|
||||||
18: Django >= 1.8, < 1.9
|
dj18: Django >= 1.8, < 1.9
|
||||||
19: Django >= 1.9, < 1.10
|
dj19: Django >= 1.9, < 1.10
|
||||||
110: Django >= 1.10, < 1.11
|
dj110: Django >= 1.10, < 1.11
|
||||||
111: Django >= 1.11, < 1.12
|
dj111: Django >= 1.11, < 1.12
|
||||||
master: https://github.com/django/django/archive/master.tar.gz
|
dj20: Django >= 2.0, < 2.1
|
||||||
|
dj21: Django >= 2.1, < 2.2
|
||||||
|
djmaster: https://github.com/django/django/archive/master.tar.gz
|
||||||
coverage
|
coverage
|
||||||
codecov
|
codecov
|
||||||
commands =
|
commands =
|
||||||
coverage run --append --source=admin_interface setup.py test
|
coverage run --append --source=admin_interface setup.py test
|
||||||
coverage report -m
|
coverage report -m
|
||||||
codecov
|
codecov
|
||||||
Reference in New Issue
Block a user