Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 97ac8268b6 | |||
| 941835b5ee | |||
| b050d7cb61 | |||
| 7d64545031 | |||
| 892bfa5e16 | |||
| b165e6d27c | |||
| f0a72d5e40 | |||
| 869d4c31ad | |||
| a7788b98ed |
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [0.13.4](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.13.4) - 2020-??-??
|
||||||
|
- Added conditional imports to avoid Django deprecation warnings. #92
|
||||||
|
- Changed admin header content vertical align to top.
|
||||||
|
|
||||||
|
## [0.13.3](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.13.3) - 2020-09-02
|
||||||
|
- Added `django-json-widget` theming support.
|
||||||
|
|
||||||
## [0.13.2](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.13.2) - 2020-08-21
|
## [0.13.2](https://github.com/fabiocaccamo/django-admin-interface/releases/tag/0.13.2) - 2020-08-21
|
||||||
- Fixed related modal not closing on edit save and create with django 3.1 - #96
|
- Fixed related modal not closing on edit save and create with django 3.1 - #96
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
[](https://pypi.org/project/django-admin-interface/)
|
[](https://pypi.org/project/django-admin-interface/)
|
||||||
[](https://pepy.tech/project/django-admin-interface)
|
[](https://pepy.tech/project/django-admin-interface)
|
||||||
[](https://github.com/fabiocaccamo/django-admin-interface/)
|
[](https://github.com/fabiocaccamo/django-admin-interface/)
|
||||||
[](https://badges.pufler.dev)
|
[](https://badges.pufler.dev)
|
||||||
[](https://github.com/fabiocaccamo/django-admin-interface/blob/master/LICENSE.txt)
|
[](https://github.com/fabiocaccamo/django-admin-interface/blob/master/LICENSE.txt)
|
||||||
|
|
||||||
[](https://travis-ci.org/fabiocaccamo/django-admin-interface)
|
[](https://travis-ci.org/fabiocaccamo/django-admin-interface)
|
||||||
@@ -29,6 +29,7 @@ django-admin-interface is a modern **responsive flat admin interface customizabl
|
|||||||
- Compatibility / Style optimizations for:
|
- Compatibility / Style optimizations for:
|
||||||
- `django-ckeditor`
|
- `django-ckeditor`
|
||||||
- `django-dynamic-raw-id`
|
- `django-dynamic-raw-id`
|
||||||
|
- `django-json-widget`
|
||||||
- `django-modeltranslation`
|
- `django-modeltranslation`
|
||||||
- `django-tabbed-admin`
|
- `django-tabbed-admin`
|
||||||
- `sorl-thumbnail`
|
- `sorl-thumbnail`
|
||||||
@@ -105,6 +106,28 @@ You can add a theme you've created through the admin to this repository by [send
|
|||||||
|
|
||||||
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`
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
```bash
|
||||||
|
# create python virtual environment
|
||||||
|
virtualenv testing_django_admin_interface
|
||||||
|
|
||||||
|
# activate virtualenv
|
||||||
|
cd testing_django_admin_interface && . bin/activate
|
||||||
|
|
||||||
|
# clone repo
|
||||||
|
git clone https://github.com/fabiocaccamo/django-admin-interface.git src && cd src
|
||||||
|
|
||||||
|
# install dependencies
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
# run tests
|
||||||
|
tox
|
||||||
|
# or
|
||||||
|
python setup.py test
|
||||||
|
# or
|
||||||
|
python -m django test --settings "tests.settings"
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
@@ -2,8 +2,12 @@
|
|||||||
|
|
||||||
from admin_interface.models import Theme
|
from admin_interface.models import Theme
|
||||||
|
|
||||||
|
import django
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.utils.translation import ugettext_lazy as _
|
if django.VERSION < (2, 0):
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
else:
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
|
||||||
class ThemeAdmin(admin.ModelAdmin):
|
class ThemeAdmin(admin.ModelAdmin):
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import django
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from django.db.models.signals import post_migrate
|
from django.db.models.signals import post_migrate
|
||||||
from django.utils.translation import ugettext_lazy as _
|
if django.VERSION < (2, 0):
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
else:
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
|
|
||||||
class AdminInterfaceConfig(AppConfig):
|
class AdminInterfaceConfig(AppConfig):
|
||||||
|
|||||||
@@ -6,10 +6,15 @@ from admin_interface.cache import del_cached_active_theme
|
|||||||
|
|
||||||
from colorfield.fields import ColorField
|
from colorfield.fields import ColorField
|
||||||
|
|
||||||
|
import django
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.db.models.signals import post_delete, post_save, pre_save
|
from django.db.models.signals import post_delete, post_save, pre_save
|
||||||
from django.utils.encoding import force_text
|
if django.VERSION < (2, 0):
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.encoding import force_text as force_str
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
else:
|
||||||
|
from django.utils.encoding import force_str
|
||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from six import python_2_unicode_compatible
|
from six import python_2_unicode_compatible
|
||||||
|
|
||||||
@@ -301,7 +306,7 @@ class Theme(models.Model):
|
|||||||
verbose_name_plural = _('Themes')
|
verbose_name_plural = _('Themes')
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return force_text(self.name)
|
return force_str(self.name)
|
||||||
|
|
||||||
|
|
||||||
post_delete.connect(Theme.post_delete_handler, sender=Theme)
|
post_delete.connect(Theme.post_delete_handler, sender=Theme)
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ https://github.com/fabiocaccamo/django-admin-interface
|
|||||||
{% include "admin_interface/css/tabbed-admin.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" %}
|
||||||
|
{% include "admin_interface/css/json-widget.css" %}
|
||||||
|
|
||||||
{% if theme.css %}
|
{% if theme.css %}
|
||||||
{{ theme.css|safe }}
|
{{ theme.css|safe }}
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
min-height:40px;
|
min-height:40px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:1024px) {
|
@media (max-width:1024px) {
|
||||||
|
|||||||
@@ -76,7 +76,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.admin-interface #user-tools {
|
.admin-interface #user-tools {
|
||||||
margin-bottom: 2px;
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
django-json-widget support
|
||||||
|
https://github.com/jmrivas86/django-json-widget
|
||||||
|
*/
|
||||||
|
|
||||||
|
.admin-interface div.jsoneditor {
|
||||||
|
border: 1px solid {{ theme.css_module_background_color }};
|
||||||
|
{% if theme.css_module_rounded_corners %}
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
{% endif %}
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface div.jsoneditor-menu {
|
||||||
|
background-color: {{ theme.css_module_background_color }};
|
||||||
|
border-bottom: 1px solid {{ theme.css_module_background_color }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface div.jsoneditor-menu a.jsoneditor-poweredBy {
|
||||||
|
color: {{ theme.css_module_link_color }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected,
|
||||||
|
.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected:focus,
|
||||||
|
.admin-interface div.jsoneditor-contextmenu ul li button.jsoneditor-selected:hover {
|
||||||
|
background-color: #FFFFCC;
|
||||||
|
color: #000000;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
__version__ = '0.13.2'
|
__version__ = '0.13.4'
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
codecov
|
|
||||||
coverage
|
|
||||||
tox
|
|
||||||
+5
-1
@@ -1,4 +1,8 @@
|
|||||||
|
codecov
|
||||||
|
coverage
|
||||||
|
django>=1.7
|
||||||
django-colorfield
|
django-colorfield
|
||||||
django-flat-theme
|
django-flat-theme
|
||||||
django-flat-responsive
|
django-flat-responsive
|
||||||
six>=1.9.0
|
six>=1.9.0
|
||||||
|
tox
|
||||||
Reference in New Issue
Block a user