Compare commits

...

6 Commits

Author SHA1 Message Date
Fabio Caccamo fb4cfdb772 Updated version 2018-02-01 14:52:56 +01:00
Fabio Caccamo 8535232598 Merge pull request #32 from founders4schools/django-20-simple-tag
Avoid deprecation warning about assignment_tag
2018-02-01 14:51:08 +01:00
Bruno Alla abbb666eae Avoid deprecation warning about assignment_tag
Even though the try/except is Django 2.0 compatible, it still
accesses the deprecated template tag, and therefore it emits a
warning in the console, whereas it's actually fixed.

I tried to swap the try and the catch, but it doesn't work:
`simple_tag` existed before 1.9 but in a non-compatible form.

I've changed the decorator name we use to match the new Django version,
it should make the codebase more future proof.
2018-02-01 13:35:54 +00:00
Fabio Caccamo d48fc882f1 Updated USWDS fixture [ci skip] 2018-01-31 16:38:08 +01:00
Fabio Caccamo f968bd9ffa Updated README [ci skip] 2018-01-31 16:37:36 +01:00
Fabio Caccamo c0592276de Updated README [ci skip] 2018-01-31 12:36:43 +01:00
5 changed files with 20 additions and 12 deletions
+3
View File
@@ -8,12 +8,15 @@
# django-admin-interface
django-admin-interface is a modern **responsive flat admin interface customizable by the admin itself**.
![django-admin-interface-preview](https://user-images.githubusercontent.com/1035294/35631521-64b0cab8-06a4-11e8-8f57-c04fdfbb7e8b.gif)
## Features
- Beautiful default **django-theme**
- Themes management and customization *(you can **customize admin title, logo and colors**)*
- Responsive
- List filter dropdown *(optional)*
- `NEW` **Related modal** *(instead of the old popup window, optional)*
- `NEW` **Enviroment label** *(development, testing, staging, production)*
- Style optimizations for: `django-ckeditor`, `django-modeltranslation`, `sorl-thumbnail`
## Requirements
+6
View File
@@ -6,6 +6,9 @@ django-admin-interface
django-admin-interface is a modern **responsive flat admin interface
customizable by the admin itself**.
|django-admin-interface_preview|
---------------------------------
Features
--------
@@ -14,6 +17,7 @@ Features
- Responsive
- List filter dropdown *(optional)*
- ``NEW`` **Related modal** (instead of the old popup window, optional)
- ``NEW`` **Enviroment label** (development, testing, staging, production)
- Style optimizations for: ``django-ckeditor``, ``django-modeltranslation``, ``sorl-thumbnail``
Requirements
@@ -133,6 +137,8 @@ Released under **MIT License**.
.. |License| image:: https://img.shields.io/pypi/l/django-admin-interface.svg
.. |django-admin-interface_preview| image:: https://user-images.githubusercontent.com/1035294/35631521-64b0cab8-06a4-11e8-8f57-c04fdfbb7e8b.gif
.. |django-admin-interface_login| image:: https://cloud.githubusercontent.com/assets/1035294/11240233/55c8d4ba-8df1-11e5-9568-00fdc987ede8.gif
.. |django-admin-interface_dashboard| image:: https://cloud.githubusercontent.com/assets/1035294/11240239/627c0362-8df1-11e5-81fa-216366a5d8da.gif
@@ -4,12 +4,12 @@
"fields": {
"name": "USWDS",
"active": true,
"title": "Site administration",
"title": "Django administration",
"title_color": "#FFFFFF",
"title_visible": true,
"title_visible": false,
"logo": "",
"logo_color": "#FFFFFF",
"logo_visible": false,
"logo_visible": true,
"css_header_background_color": "#112E51",
"css_header_text_color": "#FFFFFF",
"css_header_link_color": "#FFFFFF",
@@ -1,21 +1,20 @@
# -*- coding: utf-8 -*-
from django import template
from django import template, VERSION
from admin_interface.models import Theme
from admin_interface.version import __version__
register = template.Library()
try:
assignment_tag = register.assignment_tag
except AttributeError:
assignment_tag = register.simple_tag
if VERSION < (1, 9):
simple_tag = register.assignment_tag
else:
simple_tag = register.simple_tag
@assignment_tag(takes_context=True)
@simple_tag(takes_context=True)
def get_admin_interface_theme(context):
theme = None
request = context.get('request', None)
@@ -31,6 +30,6 @@ def get_admin_interface_theme(context):
return theme
@assignment_tag(takes_context=False)
@simple_tag(takes_context=False)
def get_admin_interface_version():
return __version__
+1 -1
View File
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
__version__ = '0.6.0'
__version__ = '0.6.1'