Collection of admin fields and decorators to help to create computed or custom fields more friendly and easy way

Overview

django-admin-easy

Collection of admin fields, decorators and mixin to help to create computed or custom fields more friendly and easy way

https://img.shields.io/pypi/v/django-admin-easy.svg?style=flat https://img.shields.io/pypi/pyversions/django-admin-easy.svg?maxAge=2592000 https://img.shields.io/pypi/format/django-admin-easy.svg?maxAge=2592000 https://img.shields.io/pypi/status/django-admin-easy.svg?maxAge=2592000 https://img.shields.io/travis/ebertti/django-admin-easy/master.svg?maxAge=2592000 https://img.shields.io/requires/github/ebertti/django-admin-easy.svg?maxAge=2592000 https://img.shields.io/coveralls/ebertti/django-admin-easy/master.svg?maxAge=2592000

Installation

  1. Requirements: Django > 1.8 and Python > 3.5
  2. pip install django-admin-easy==0.6.1
  • For Django < 1.8 or Python 2.x

    pip install django-admin-easy==0.4.1

How it Works

When you want to display a field on Django Admin, and this field doesn't exist in your Model or you need to compute some information, like a Image or Link, you will need to create a method on your ModelAdminClass like this:

from django.contrib import admin

class YourAdmin(admin.ModelAdmin):
    fields = ('sum_method', 'some_img', 'is_true')

    def sum_method(self, obj):
        sum_result = obj.field1 + obj.field2 + obj.field3
        return '<b>%s</b>' % sum_result
    sum_method.short_description = 'Sum'
    sum_method.admin_order_field = 'field1'
    sum_method.allow_tags = True

    def some_img(self, obj):
        return '<img scr="%s">' % obj.image
    some_img.short_description = 'image'
    some_img.admin_order_field = 'id'
    some_img.allow_tags = True

    def is_true(self, obj):
        return obj.value > 0
    is_true.short_description = 'Positive'
    is_true.admin_order_field = 'value'
    is_true.boolean = True

It takes too much lines! =D

With django-admin-easy you can easily create this field with less lines:

from django.contrib import admin
import easy

class YourAdmin(admin.ModelAdmin):
    fields = ('sum_method', 'some_img', 'is_true')

    sum_method = easy.SimpleAdminField(lambda obj: '<b>%s</b>' % (obj.field1 + obj.field2 + obj.field3), 'Sum', 'field1', True)
    some_img = easy.ImageAdminField('image', 'id')
    is_true = easy.BooleanAdminField('Positive', 'value')

If you still prefer using a custom method, you can use our decorators, like this:

from django.contrib import admin
import easy

class YourAdmin(admin.ModelAdmin):
    fields = ('sum_method', 'some_img', 'is_true')

    @easy.smart(short_description='Sum', admin_order_field='field1', allow_tags=True )
    def sum_method(self, obj):
        sum_result = obj.field1 + obj.field2 + obj.field3
        return '<b>%s</b>' % sum_result

    @easy.short(desc='image', order='id', tags=True)
    def some_img(self, obj):
        return '<img scr="%s">' % obj.image

    @easy.short(desc='Positive', order='value', bool=True)
    def is_true(self, obj):
        return obj.value > 0

Another Decorators

In all of this extra decorators, you can use short or smart arguments to complement field information.

  • Allow HTML tags
@easy.with_tags()
def some_field_with_html(self, obj):
    return '<b>{}</b>'.format(obj.value)
# output some as: mark_safe("<b>something</b>")

if value is 5, will display:

5 and not <b>5</b> on admin page.

  • Cached field

If you, for some reason, need to cache a custom field on admin

@easy.cache(10)# in secondd, default is 60
def some_field_with_html(self, obj):
    return obj.related.some_hard_word()

If you change something on your model, or some related object, you can clean this cache using this easy way:

import easy
# wherever you want
easy.cache_clear(my_model_instance)

# or
class MyModel(models.Model):
    # ... fields

    def save(*args, **kwargs):
        easy.cache_clear(self)
        super(MyModel, self).save(*args, **kwargs)
  • Django template filter

Can be used with all template filters on your project.

# builtin template filter like {{ value|title }}
@easy.filter('title')
def some_field_with_html(self, obj):
    return 'ezequiel bertti'
# output: "Ezequiel Bertti"

# like {% load i10n %} and {{ value|localize }}
@easy.filter('localize', 'l10n')
def some_field_with_html(self, obj):
    return 10000
# output: "10.000"

# like {{ value|date:'y-m-d' }}
@easy.filter('date', 'default', 'y-m-d')
def some_field_with_html(self, obj):
    return datetime(2016, 06, 28)
# output: "16-06-28"
  • Django utils functions

Tested with:

@easy.utils('html.escape')
@easy.utils('html.conditional_escape')
@easy.utils('html.strip_tags')
@easy.utils('safestring.mark_safe')
@easy.utils('safestring.mark_for_escaping')
@easy.utils('text.slugify')
@easy.utils('translation.gettext')
@easy.utils('translation.ugettext')
@easy.utils('translation.gettext_lazy')
@easy.utils('translation.ugettext_lazy')
@easy.utils('translation.gettext_noop')
@easy.utils('translation.ugettext_noop')
def your_method(self, obj):
    return obj.value

More Examples

from django.contrib import admin
import easy

class YourAdmin(admin.ModelAdmin):
    list_fields = ('id', 'custom1', 'custom2', 'custom3' ... 'customN')

    actions = ('simples_action',)

    @easy.action('My Little Simple Magic Action')
    def simple_action(self, request, queryset):
        return queryset.update(magic=True)

    # actoin only for user that has change permission on this model
    @easy.action('Another Simple Magic Action', 'change')
    def simple_action(self, request, queryset):
        return queryset.update(magic=True)


    # render a value of field, method, property or your model or related model
    simple1 = easy.SimpleAdminField('model_field')
    simple2 = easy.SimpleAdminField('method_of_model')
    simple3 = easy.SimpleAdminField('related.attribute_or_method')
    simple4 = easy.SimpleAdminField('related_set.count', 'count')
    simple5 = easy.SimpleAdminField(lambda x: x.method(), 'show', 'order_by')

    # render boolean fields
    bool1 = easy.BooleanAdminField(lambda x: x.value > 10, 'high')

    # render with string format fields
    format1 = easy.FormatAdminField('{o.model_field} - {o.date_field:Y%-%m}', 'column name')

    # render foreignkey with link to change_form in admin
    fk1 = easy.ForeignKeyAdminField('related')

    # render foreignkey with link to change_form in admin and related_id content as text
    fk2 = easy.ForeignKeyAdminField('related', 'related_id')

    # render foreignkey_id, like raw_id_fields, with link to change_form in admin and related_id content as text
    # without extra queries or select_related to prevent extra n-1 queries
    raw1 = easy.RawIdAdminField('related')

    # render template
    template1 = easy.TemplateAdminField('test.html', 'shorty description', 'order_field')

    # render to change_list of another model with a filter on query
    link1 = easy.LinkChangeListAdminField('app_label', 'model_name', 'attribute_to_text',
                                          {'field_name':'dynamic_value_model'})

    link2 = easy.LinkChangeListAdminField('app_label', 'model_name', 'attribute_to_text',
                                          {'field_name':'dynamic_value_model'},
                                          {'another_field': 'static_value'})

    # display image of some model
    image1 = easy.ImageAdminField('image', {'image_attrs':'attr_value'})

    # use django template filter on a field
    filter1 = easy.FilterAdminField('model_field', 'upper')
    filter2 = easy.FilterAdminField('date_field', 'date', 'django', 'y-m-d')
    filter3 = easy.FilterAdminField('float_field', 'localize', 'l18n')

    @easy.smart(short_description='Field Description 12', admin_order_field='model_field')
    def custom12(self, obj):
        return obj.something_cool()

    @easy.short(desc='Field Description 1', order='model_field', tags=True)
    def decorator1(self, obj):
        return '<b>' + obj.model_field + '</b>'

    @easy.short(desc='Field Description 2', order='model_field', bool=True)
    def decorator2(self, obj):
        return obj.model_field > 10

If you want to use on admin form to show some information, don't forget to add your custom field on readonly_fields attribute of your admin class

from django.contrib import admin
import easy

class YourAdmin(admin.ModelAdmin):
    fields = ('custom1', 'custom2', 'custom3' ... 'customN')
    readonly_fields = ('custom1', 'custom2', 'custom3' ... 'customN')

    custom1 = easy.ForeignKeyAdminField('related')
    # ...

Another way to use is directly on list_fields declaration:

from django.contrib import admin
import easy

class YourAdmin(admin.ModelAdmin):
    list_fields = (
        easy.TemplateAdminField('test.html', 'shorty description', 'order_field'),
        easy.ImageAdminField('image', {'image_attrs':'attr_value'}),
        # ...
    )

    # ...

Mixin

To help you to create a custom view on django admin, we create the MixinEasyViews for your Admin Classes

from django.contrib import admin
import easy

class MyModelAdmin(easy.MixinEasyViews, admin.ModelAdmin):
    # ...

    def easy_view_jump(self, request, pk=None):
        # do something here
        return HttpResponse('something')

To call this view, you can use this reverse:

from django.core.urlresolvers import reverse

# to do something with one object of a model
reverse('admin:myapp_mymodel_easy', args=(obj.pk, 'jump'))

# or to do something with a model
reverse('admin:myapp_mymodel_easy', args=('jump',))

Or one HTML template

#<!-- to do something with one object of a model -->
{% url 'admin:myapp_mymodel_easy' obj.pk 'jump' %}

#<!-- or to do something with a model -->
{% url 'admin:myapp_mymodel_easy' 'jump' %}

Utilities

  • Response for admin actions

    Return for the change list and show some message for the user keeping or not the filters.

from django.contrib import admin
from django.contrib import messages
import easy

class YourAdmin(admin.ModelAdmin):
    # ...
    actions = ('simples_action',)

    def simples_action(self, request, queryset):

        success = queryset.do_something()
        if success:
            return easy.action_response(request, 'Some success message for user', keep_querystring=False)
        else:
            return easy.action_response(request, 'Some error for user', messages.ERROR)

        # or just redirect to changelist with filters
        return easy.action_response()

So easy, no?

Screenshot

Using example of poll of django tutorial

https://raw.githubusercontent.com/ebertti/django-admin-easy/master/screenshot/more.png

https://raw.githubusercontent.com/ebertti/django-admin-easy/master/screenshot/related.png

Please help us

This project is still under development. Feedback and suggestions are very welcome and I encourage you to use the Issues list on Github to provide that feedback.

https://img.shields.io/waffle/label/ebertti/django-admin-easy/in%20progress.svg?maxAge=2592000

Authors

The django-admin-easy was originally created by Ezequiel Bertti @ebertti October 2014.

Changelog

  • 0.6.1

    • Add Support do Django 3.2 and Python 3.9
  • 0.6

    • Add RawIdAdminField
  • 0.5.1

    • Add permission on action decorator
  • 0.4.1

    • Django 2.0
  • 0.4

    • Django 1.11
    • Create module utils with action_response
  • 0.3.2

    • Add params_static to LinkChangeListAdminField
  • 0.3.1

    • Add FormatAdminField
  • 0.3

    • Add import from __future__ on all files
    • Django 1.10
    • More decorators
    • More admin fields
  • 0.2.2

    • Add MixinEasyViews
  • 0.2.1

Issues
  • Correct grammar

    Correct grammar

    opened by andybak 7
  • ImportError: No module named 'easy.admin.mixin'

    ImportError: No module named 'easy.admin.mixin'

    Hi, I only changed the version from 0.2.1 to 0.2.2 in my requirements.txt and got this:

    File "/opt/crowd/crowd/promo/admin/__init__.py", line 1, in <module>
      import easy
    File "/opt/rh/python33/root/usr/lib/python3.3/site-packages/easy/__init__.py", line 7, in <module>
      from .admin.mixin import MixinEasyViews
    

    ImportError: No module named 'easy.admin.mixin'

    Environment: Python 3.3.2 (default, Mar 10 2014, 09:51:20) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux

    Update: same thing on Windows 8.1 Python 3.4.2

    opened by leonty 4
  • Fix landscape

    Fix landscape

    opened by ebertti 4
  • Bump pillow from 5.0.0 to 6.2.0

    Bump pillow from 5.0.0 to 6.2.0

    Bumps pillow from 5.0.0 to 6.2.0.

    Release notes

    Sourced from pillow's releases.

    6.2.0

    https://pillow.readthedocs.io/en/stable/releasenotes/6.2.0.html

    6.1.0

    https://pillow.readthedocs.io/en/stable/releasenotes/6.1.0.html

    6.0.0

    No release notes provided.

    5.4.1

    No release notes provided.

    5.4.0

    No release notes provided.

    5.3.0

    No release notes provided.

    5.2.0

    No release notes provided.

    5.1.0

    No release notes provided.

    Changelog

    Sourced from pillow's changelog.

    6.2.0 (2019-10-01)

    • Catch buffer overruns #4104 [radarhere]

    • Initialize rows_per_strip when RowsPerStrip tag is missing #4034 [cgohlke, radarhere]

    • Raise error if TIFF dimension is a string #4103 [radarhere]

    • Added decompression bomb checks #4102 [radarhere]

    • Fix ImageGrab.grab DPI scaling on Windows 10 version 1607+ #4000 [nulano, radarhere]

    • Corrected negative seeks #4101 [radarhere]

    • Added argument to capture all screens on Windows #3950 [nulano, radarhere]

    • Updated warning to specify when Image.frombuffer defaults will change #4086 [radarhere]

    • Changed WindowsViewer format to PNG #4080 [radarhere]

    • Use TIFF orientation #4063 [radarhere]

    • Raise the same error if a truncated image is loaded a second time #3965 [radarhere]

    • Lazily use ImageFileDirectory_v1 values from Exif #4031 [radarhere]

    • Improved HSV conversion #4004 [radarhere]

    • Added text stroking #3978 [radarhere, hugovk]

    • No more deprecated bdist_wininst .exe installers #4029 [hugovk]

    • Do not allow floodfill to extend into negative coordinates #4017 [radarhere]

    ... (truncated)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 3
  • Update pillow to 4.1.1

    Update pillow to 4.1.1

    There's a new version of Pillow available. You are currently using 4.0.0. I have updated it to 4.1.1

    These links might come in handy: PyPI | Changelog | Homepage

    Changelog

    4.1.0


    • Close files after loading if possible 2330 [homm, wiredfool]
    • Fix Image Access to be reloadable when embedding the Python interpreter 2296 [wiredfool, cgohlke]
    • Fetch DPI from EXIF if not specified in JPEG header 2449, 2472 [hugovk]
    • Removed winbuild checksum verification 2468 [radarhere]
    • Git: Set ContainerIO test file as binary 2469 [cgohlke]

    • Remove superfluous import of FixTk 2455 [cgohlke)

    • Fix import of tkinter/Tkinter 2456 [cgohlke)
    • Pure Python Decoders, including Python decoder to fix for MSP images 1938 [wiredfool, hugovk]

    • Reorganized GifImagePlugin, fixes 2314. 2374 [radarhere, wiredfool]

    • Doc: Reordered operating systems in Compatibility Matrix 2436 [radarhere]
    • Test: Additional tests for BurfStub, Eps, Container, GribStub, IPTC, Wmf, XVThumb, ImageDraw, ImageMorph ImageShow 2425 [radarhere]

    • Health fixes 2437 [radarhere]

    • Test: Correctness tests ContainerIO, XVThumbImagePlugin, BufrStubImagePlugin, GribStubImagePlugin, FitsStubImagePlugin, Hdf5StubImagePlugin, PixarImageFile, PsdImageFile 2443, 2442, 2441, 2440, 2431, 2430, 2428, 2427 [hugovk]

    • Remove unused imports 1822 [radarhere]
    • Replaced KeyError catch with dictionary get method 2424 [radarhere]
    • Test: Removed unrunnable code in test_image_toqimage 2415 [hugovk]
    • Removed use of spaces in TIFF kwargs names, deprecated in 2.7 1390 [radarhere]
    • Removed deprecated ImageDraw setink, setfill, setfont methods 2220 [jdufresne]
    • Send unwanted subprocess output to /dev/null 2253 [jdufresne]
    • Fix division by zero when creating 0x0 image from numpy array 2419 [hugovk]
    • Test: Added matrix convert tests 2381 [hugovk]
    • Replaced broken URL to partners.adobe.com 2413 [radarhere]
    • Removed unused private functions in setup.py and build_dep.py 2414 [radarhere]
    • Test: Fixed Qt tests for QT5 and saving 1 bit PNG 2394 [wiredfool]
    • Test: docker builds for Arch and Debian Stretch 2394 [wiredfool]
    • Updated libwebp to 0.6.0 on appveyor 2395 [radarhere]
    • More explicit error message when saving to a file with invalid extension 2399 [ces42]
    • Docs: Update some http urls to https 2403 [hugovk]
    • Preserve aux/alpha channels when performing Imagecms transforms 2355 [gunjambi]
    • Test linear and radial gradient effects 2382 [hugovk]
    • Test ImageDraw.Outline and and ImageDraw.Shape 2389 [hugovk]
    • Added PySide to ImageQt documentation 2392 [radarhere]
    • BUG: Empty image mode no longer causes a crash 2380 [evalapply]
    • Exclude .travis and contents from manifest 2386 [radarhere]
    • Remove 'MIT-like' from license 2145 [wiredfool]
    • Tests: Add tests for several Image operations 2379 [radarhere]
    • PNG: Moved iCCP chunk before PLTE chunk when saving as PNG, restricted chunks known value/ordering 2347 [radarhere]
    • Default to inch-interpretation for missing ResolutionUnit in TiffImagePlugin 2365 [lambdafu]
    • Bug: Fixed segfault when using ImagingTk on pypy Issue 2376, 2359. [wiredfool]
    • Bug: Fixed Integer overflow using ImagingTk on 32 bit platforms 2359 [wiredfool, QuLogic]
    • Tests: Added docker images for testing alternate platforms. See also https://github.com/python-pillow/docker-images. 2368 [wiredfool]
    • Removed PIL 1.0 era TK readme that concerns Windows 95/NT 2360 [wiredfool]
    • Prevent nose -v printing docstrings 2369 [hugovk]
    • Replaced absolute PIL imports with relative imports 2349 [radarhere]
    • Added context managers for file handling 2307 [radarhere]
    • Expose registered file extensions in Image 2343 [iggomez, radarhere]
    • Make mode descriptor cache initialization thread-safe. 2351 [gunjambi]
    • Updated Windows test dependencies: Freetype 2.7.1, zlib 1.2.11 2331, 2332, 2357 [radarhere]
    • Followed upstream pngquant packaging reorg to libimagquant 2354 [radarhere]
    • Fix invalid string escapes 2352 [hugovk]
    • Add test for crop operation with no argument 2333 [radarhere]

    Got merge conflicts? Close this PR and delete the branch. I'll create a new PR for you.

    Happy merging! 🤖

    opened by pyup-bot 3
  • LinkChangeListAdminField always uses ? and = in urls. Not working with Django Jet

    LinkChangeListAdminField always uses ? and = in urls. Not working with Django Jet

    Hi,

    Consider: link1 = easy.LinkChangeListAdminField('organizations', 'organization', 'organization_id', {'id': 'organization_id'})

    This renders as: 1, with a hyperlink to: http://localhost:8000/admin/organizations/organization/?id=1

    Django jet rewrite urls, so they look more modern. This would be a valid URL in jet: http://localhost:8000/admin/organizations/organization/1/change/

    Result: The url created by LinkChangeListAdminField will not work in jet.

    Regards, Elger / Stitch

    opened by stitch 3
  • Bump django from 3.0.3 to 3.0.14

    Bump django from 3.0.3 to 3.0.14

    Bumps django from 3.0.3 to 3.0.14.

    Commits
    • f528002 [3.0.x] Bumped version for 3.0.14 release.
    • e7fba62 [3.0.x] Fixed CVE-2021-28658 -- Fixed potential directory-traversal via uploa...
    • 232d5f6 [3.0.x] Added CVE-2021-23336 to security archive.
    • cb7e3ff [3.0.x] Post-release version bump.
    • 04a9b7d [3.0.x] Bumped version for 3.0.13 release.
    • 326a926 [3.0.x] Fixed CVE-2021-23336 -- Fixed web cache poisoning via django.utils.ht...
    • ad36388 [3.0.x] Added documentation extlink for bugs.python.org.
    • 0194f0b [3.0.x] Added CVE-2021-3281 to security archive.
    • bfe24c3 [3.0.x] Post-release version bump.
    • 81c99e4 [3.0.x] Bumped version for 3.0.12 release.
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 3
  • small typo fixes

    small typo fixes

    opened by GabLeRoux 3
  • Update pillow to 4.1.0

    Update pillow to 4.1.0

    There's a new version of Pillow available. You are currently using 4.0.0. I have updated it to 4.1.0

    These links might come in handy: PyPI | Changelog | Homepage

    Changelog

    4.1.0


    • Close files after loading if possible 2330 [homm, wiredfool]
    • Fix Image Access to be reloadable when embedding the Python interpreter 2296 [wiredfool, cgohlke]
    • Fetch DPI from EXIF if not specified in JPEG header 2449, 2472 [hugovk]
    • Removed winbuild checksum verification 2468 [radarhere]
    • Git: Set ContainerIO test file as binary 2469 [cgohlke]

    • Remove superfluous import of FixTk 2455 [cgohlke)

    • Fix import of tkinter/Tkinter 2456 [cgohlke)
    • Pure Python Decoders, including Python decoder to fix for MSP images 1938 [wiredfool, hugovk]

    • Reorganized GifImagePlugin, fixes 2314. 2374 [radarhere, wiredfool]

    • Doc: Reordered operating systems in Compatibility Matrix 2436 [radarhere]
    • Test: Additional tests for BurfStub, Eps, Container, GribStub, IPTC, Wmf, XVThumb, ImageDraw, ImageMorph ImageShow 2425 [radarhere]

    • Health fixes 2437 [radarhere]

    • Test: Correctness tests ContainerIO, XVThumbImagePlugin, BufrStubImagePlugin, GribStubImagePlugin, FitsStubImagePlugin, Hdf5StubImagePlugin, PixarImageFile, PsdImageFile 2443, 2442, 2441, 2440, 2431, 2430, 2428, 2427 [hugovk]

    • Remove unused imports 1822 [radarhere]
    • Replaced KeyError catch with dictionary get method 2424 [radarhere]
    • Test: Removed unrunnable code in test_image_toqimage 2415 [hugovk]
    • Removed use of spaces in TIFF kwargs names, deprecated in 2.7 1390 [radarhere]
    • Removed deprecated ImageDraw setink, setfill, setfont methods 2220 [jdufresne]
    • Send unwanted subprocess output to /dev/null 2253 [jdufresne]
    • Fix division by zero when creating 0x0 image from numpy array 2419 [hugovk]
    • Test: Added matrix convert tests 2381 [hugovk]
    • Replaced broken URL to partners.adobe.com 2413 [radarhere]
    • Removed unused private functions in setup.py and build_dep.py 2414 [radarhere]
    • Test: Fixed Qt tests for QT5 and saving 1 bit PNG 2394 [wiredfool]
    • Test: docker builds for Arch and Debian Stretch 2394 [wiredfool]
    • Updated libwebp to 0.6.0 on appveyor 2395 [radarhere]
    • More explicit error message when saving to a file with invalid extension 2399 [ces42]
    • Docs: Update some http urls to https 2403 [hugovk]
    • Preserve aux/alpha channels when performing Imagecms transforms 2355 [gunjambi]
    • Test linear and radial gradient effects 2382 [hugovk]
    • Test ImageDraw.Outline and and ImageDraw.Shape 2389 [hugovk]
    • Added PySide to ImageQt documentation 2392 [radarhere]
    • BUG: Empty image mode no longer causes a crash 2380 [evalapply]
    • Exclude .travis and contents from manifest 2386 [radarhere]
    • Remove 'MIT-like' from license 2145 [wiredfool]
    • Tests: Add tests for several Image operations 2379 [radarhere]
    • PNG: Moved iCCP chunk before PLTE chunk when saving as PNG, restricted chunks known value/ordering 2347 [radarhere]
    • Default to inch-interpretation for missing ResolutionUnit in TiffImagePlugin 2365 [lambdafu]
    • Bug: Fixed segfault when using ImagingTk on pypy Issue 2376, 2359. [wiredfool]
    • Bug: Fixed Integer overflow using ImagingTk on 32 bit platforms 2359 [wiredfool, QuLogic]
    • Tests: Added docker images for testing alternate platforms. See also https://github.com/python-pillow/docker-images. 2368 [wiredfool]
    • Removed PIL 1.0 era TK readme that concerns Windows 95/NT 2360 [wiredfool]
    • Prevent nose -v printing docstrings 2369 [hugovk]
    • Replaced absolute PIL imports with relative imports 2349 [radarhere]
    • Added context managers for file handling 2307 [radarhere]
    • Expose registered file extensions in Image 2343 [iggomez, radarhere]
    • Make mode descriptor cache initialization thread-safe. 2351 [gunjambi]
    • Updated Windows test dependencies: Freetype 2.7.1, zlib 1.2.11 2331, 2332, 2357 [radarhere]
    • Followed upstream pngquant packaging reorg to libimagquant 2354 [radarhere]
    • Fix invalid string escapes 2352 [hugovk]
    • Add test for crop operation with no argument 2333 [radarhere]

    Got merge conflicts? Close this PR and delete the branch. I'll create a new PR for you.

    Happy merging! 🤖

    opened by pyup-bot 3
  • Update sphinx to 1.5.5

    Update sphinx to 1.5.5

    There's a new version of sphinx available. You are currently using 1.5.4. I have updated it to 1.5.5

    These links might come in handy: PyPI | Changelog | Homepage

    Changelog

    1.5.5

    =====================================

    Bugs fixed

    • 3597: python domain raises UnboundLocalError if invalid name given
    • 3599: Move to new Mathjax CDN

    Got merge conflicts? Close this PR and delete the branch. I'll create a new PR for you.

    Happy merging! 🤖

    opened by pyup-bot 3
  • Bump django from 3.2 to 3.2.5

    Bump django from 3.2 to 3.2.5

    Bumps django from 3.2 to 3.2.5.

    Commits
    • 0eca7a6 [3.2.x] Bumped version for 3.2.5 release.
    • a34a5f7 [3.2.x] Fixed CVE-2021-35042 -- Prevented SQL injection in QuerySet.order_by().
    • da2269d [3.2.x] Added stub release notes for 3.1.13 and release date for 3.2.5.
    • aaef411 [3.2.x] Fixed #32850 -- Doc'd Sitemap.paginator.
    • 04b7440 [3.2.x] Updated translations from Transifex.
    • 8b2b627 [3.2.x] Fixed #32863 -- Skipped system check for specifying type of auto-crea...
    • fb577d8 [3.2.x] Added a note about %autoawait off for IPython.
    • 3d51e16 [3.2.x] Fixed #32860 -- Made docs permalinks focusable to improve accessibility.
    • 826a165 [3.2.x] Fixed #32832 -- Fixed adding BLOB/TEXT nullable field with default on...
    • bb29174 [3.2.x] Refs #32503 -- Added release notes for 5e04e84d67da8163f365e9f5fcd169...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump sqlparse from 0.4.1 to 0.4.2

    Bump sqlparse from 0.4.1 to 0.4.2

    Bumps sqlparse from 0.4.1 to 0.4.2.

    Changelog

    Sourced from sqlparse's changelog.

    Release 0.4.2 (Sep 10, 2021)

    Notable Changes

    Enhancements

    • Add ELSIF as keyword (issue584).
    • Add CONFLICT and ON_ERROR_STOP keywords (pr595, by j-martin).

    Bug Fixes

    • Fix parsing of backticks (issue588).
    • Fix parsing of scientific number (issue399).
    Commits
    • b1f76f6 Update changelog.
    • 3eec44e Update Changelog and bump version.
    • 8238a9e Optimize regular expression for identifying line breaks in comments.
    • e660467 Fix parsing of scientific numbers (fixes #399).
    • 23d2993 Update authors and changelog.
    • acc2810 keyword, add ON_ERROR_STOP
    • 282bcf1 keyword, add CONFLICT to postgres keywords
    • 63885dd Add ELSIF as keyword (fixes #584).
    • e575ae2 Fix parsing of backticks (fixes #588).
    • fe39072 Switch back to development mode.
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump pillow from 8.2.0 to 8.3.2

    Bump pillow from 8.2.0 to 8.3.2

    Bumps pillow from 8.2.0 to 8.3.2.

    Release notes

    Sourced from pillow's releases.

    8.3.2

    https://pillow.readthedocs.io/en/stable/releasenotes/8.3.2.html

    Security

    • CVE-2021-23437 Raise ValueError if color specifier is too long [hugovk, radarhere]

    • Fix 6-byte OOB read in FliDecode [wiredfool]

    Python 3.10 wheels

    • Add support for Python 3.10 #5569, #5570 [hugovk, radarhere]

    Fixed regressions

    • Ensure TIFF RowsPerStrip is multiple of 8 for JPEG compression #5588 [kmilos, radarhere]

    • Updates for ImagePalette channel order #5599 [radarhere]

    • Hide FriBiDi shim symbols to avoid conflict with real FriBiDi library #5651 [nulano]

    8.3.1

    https://pillow.readthedocs.io/en/stable/releasenotes/8.3.1.html

    Changes

    8.3.0

    https://pillow.readthedocs.io/en/stable/releasenotes/8.3.0.html

    Changes

    ... (truncated)

    Changelog

    Sourced from pillow's changelog.

    8.3.2 (2021-09-02)

    • CVE-2021-23437 Raise ValueError if color specifier is too long [hugovk, radarhere]

    • Fix 6-byte OOB read in FliDecode [wiredfool]

    • Add support for Python 3.10 #5569, #5570 [hugovk, radarhere]

    • Ensure TIFF RowsPerStrip is multiple of 8 for JPEG compression #5588 [kmilos, radarhere]

    • Updates for ImagePalette channel order #5599 [radarhere]

    • Hide FriBiDi shim symbols to avoid conflict with real FriBiDi library #5651 [nulano]

    8.3.1 (2021-07-06)

    • Catch OSError when checking if fp is sys.stdout #5585 [radarhere]

    • Handle removing orientation from alternate types of EXIF data #5584 [radarhere]

    • Make Image.array take optional dtype argument #5572 [t-vi, radarhere]

    8.3.0 (2021-07-01)

    • Use snprintf instead of sprintf. CVE-2021-34552 #5567 [radarhere]

    • Limit TIFF strip size when saving with LibTIFF #5514 [kmilos]

    • Allow ICNS save on all operating systems #4526 [baletu, radarhere, newpanjing, hugovk]

    • De-zigzag JPEG's DQT when loading; deprecate convert_dict_qtables #4989 [gofr, radarhere]

    • Replaced xml.etree.ElementTree #5565 [radarhere]

    ... (truncated)

    Commits
    • 8013f13 8.3.2 version bump
    • 23c7ca8 Update CHANGES.rst
    • 8450366 Update release notes
    • a0afe89 Update test case
    • 9e08eb8 Raise ValueError if color specifier is too long
    • bd5cf7d FLI tests for Oss-fuzz crash.
    • 94a0cf1 Fix 6-byte OOB read in FliDecode
    • cece64f Add 8.3.2 (2021-09-02) [CI skip]
    • e422386 Add release notes for Pillow 8.3.2
    • 08dcbb8 Pillow 8.3.2 supports Python 3.10 [ci skip]
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump urllib3 from 1.26.4 to 1.26.5

    Bump urllib3 from 1.26.4 to 1.26.5

    Bumps urllib3 from 1.26.4 to 1.26.5.

    Release notes

    Sourced from urllib3's releases.

    1.26.5

    :warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

    • Fixed deprecation warnings emitted in Python 3.10.
    • Updated vendored six library to 1.16.0.
    • Improved performance of URL parser when splitting the authority component.

    If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors

    Changelog

    Sourced from urllib3's changelog.

    1.26.5 (2021-05-26)

    • Fixed deprecation warnings emitted in Python 3.10.
    • Updated vendored six library to 1.16.0.
    • Improved performance of URL parser when splitting the authority component.
    Commits
    • d161647 Release 1.26.5
    • 2d4a3fe Improve performance of sub-authority splitting in URL
    • 2698537 Update vendored six to 1.16.0
    • 07bed79 Fix deprecation warnings for Python 3.10 ssl module
    • d725a9b Add Python 3.10 to GitHub Actions
    • 339ad34 Use pytest==6.2.4 on Python 3.10+
    • f271c9c Apply latest Black formatting
    • 1884878 [1.26] Properly proxy EOF on the SSLTransport test suite
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Add ManyToManyAdminField for use with ManyToManyField

    Add ManyToManyAdminField for use with ManyToManyField

    I've added a field to show the objects of a many to many field in a list. And I added a __name__ method to SimpleAdminField because Django was complaining that __name__ could not be found.

    opened by Furkanzmc 4
  • Passing no params to ImageAdminField is fixed

    Passing no params to ImageAdminField is fixed

    ImageAdminField fails to render when it is initialized with no params.

    opened by Anislav 1
Releases(0.2.2)
Owner
Ezequiel Bertti
MSc, CTO, System Architect, Fullstack Developer and Teacher
Ezequiel Bertti
django's default admin interface made customizable. popup windows replaced by modals. :mage: :zap:

django-admin-interface django-admin-interface is a modern responsive flat admin interface customizable by the admin itself. Features Beautiful default

Fabio Caccamo 947 Oct 22, 2021
fastapi-admin is a fast admin dashboard based on FastAPI and TortoiseORM with tabler ui, inspired by Django admin.

fastapi-admin is a fast admin dashboard based on FastAPI and TortoiseORM with tabler ui, inspired by Django admin.

fastapi-admin 930 Oct 25, 2021
Jet Bridge (Universal) for Jet Admin – API-based Admin Panel Framework for your application

Jet Bridge for Jet Admin – Admin panel framework for your application Description About Jet Admin: https://about.jetadmin.io Live Demo: https://app.je

Jet Admin 1.1k Oct 25, 2021
FastAPI Admin Dashboard based on FastAPI and Tortoise ORM.

FastAPI ADMIN 中文文档 Introduction FastAPI-Admin is a admin dashboard based on fastapi and tortoise-orm. FastAPI-Admin provide crud feature out-of-the-bo

long2ice 927 Oct 22, 2021
Extends the Django Admin to include a extensible dashboard and navigation menu

django-admin-tools django-admin-tools is a collection of extensions/tools for the default django administration interface, it includes: a full feature

Django Admin Tools 638 Oct 11, 2021
An administration website for Django

yawd-admin, a django administration website yawd-admin now has a live demo at http://yawd-admin.yawd.eu/. Use demo / demo as username & passowrd. yawd

Pantelis Petridis 139 Jul 27, 2021
spider-admin-pro

Spider Admin Pro Github: https://github.com/mouday/spider-admin-pro Gitee: https://gitee.com/mouday/spider-admin-pro Pypi: https://pypi.org/

mouday 58 Oct 9, 2021
A Django app for easily adding object tools in the Django admin

Django Object Actions If you've ever tried making admin object tools you may have thought, "why can't this be as easy as making Django Admin Actions?"

Chris Chang 406 Oct 15, 2021
Material design for django administration

Django Material Administration Quick start pip install django-material-admin Add material.admin and material.admin.default to your INSTALLED_APPS sett

Anton 222 Oct 18, 2021
Simple and extensible administrative interface framework for Flask

Flask-Admin The project was recently moved into its own organization. Please update your references to [email protected]:flask-admin/flask-admin.git. Int

Flask-Admin 4.9k Oct 21, 2021
Simple and extensible administrative interface framework for Flask

Flask-Admin The project was recently moved into its own organization. Please update your references to [email protected]:flask-admin/flask-admin.git. Int

Flask-Admin 4.6k Feb 7, 2021
Responsive Theme for Django Admin With Sidebar Menu

Responsive Django Admin If you're looking for a version compatible with Django 1.8 just install 0.3.7.1. Features Responsive Sidebar Menu Easy install

Douglas Miranda 812 Sep 29, 2021
Django Semantic UI admin theme

Django Semantic UI admin theme A completely free (MIT) Semantic UI admin theme for Django. Actually, this is my 3rd admin theme for Django. The first

Alex 33 Oct 18, 2021
A Django admin theme using Twitter Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed apps.

django-admin-bootstrapped A Django admin theme using Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed ap

null 1.6k Oct 21, 2021
A Django admin theme using Twitter Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed apps.

django-admin-bootstrapped A Django admin theme using Bootstrap. It doesn't need any kind of modification on your side, just add it to the installed ap

null 1.6k Oct 14, 2021
Visually distinguish environments in Django Admin

django-admin-env-notice Visually distinguish environments in Django Admin. Based on great advice from post: 5 ways to make Django Admin safer by hakib

Yuri Shikanov 228 Oct 15, 2021
An improved django-admin-tools dashboard for Django projects

django-fluent-dashboard The fluent_dashboard module offers a custom admin dashboard, built on top of django-admin-tools (docs). The django-admin-tools

django-fluent 295 Sep 9, 2021
WordPress look and feel for Django administration panel

Django WP Admin WordPress look and feel for Django administration panel. Features WordPress look and feel New styles for selector, calendar and timepi

Maciej Marczewski 259 Sep 13, 2021
Allow foreign key attributes in list_display with '__'

django-related-admin Allow foreign key attributes in Django admin change list list_display with '__' This is based on DjangoSnippet 2996 which was mad

Petr DlouhĂ˝ 51 Sep 23, 2021