Skip to main content

Widgets and admin mixin to display remaining characters in django admin.

Project description

# Django CharsLeft Widgets & Admin Mixin

Inspired from [django-charsleft-widget](
by [Timmy O'Mahony](
and [django-charsleft-widget](
by [Basil Shubin](

*django-admin-charsleft* provides a simple way to add information to django's admin interface about the remaining
characters for both `CharField` and `TextField` inputs, relying on the `max_length` attribute.

*django-admin-charsleft* - as the name implies - is intended for the use inside [django-admin](), whereas the original
projects provide more generic widgets.

It plays nice with the default django-admin (>=1.9) - and also seamlessly integrates
with [django-slick-admin](

### Screenshot

![display example](docs/img/charsleft-example.png)

### Installation

Using the latest version from PyPI:

pip install django-admin-charsleft

Using this GitHub repository:

pip install -e "git://"

Then add `charsleft` to `INSTALLED_APPS`.

### Usage

#### As Admin Mixin

*django-admin-charsleft* provides a `CharsLeftAdminMixin` class that can be used to extend your admin classes:

from charsleft.admin import CharsLeftAdminMixin

class MyModelAdmin(CharsLeftAdminMixin, admin.ModelAdmin):

The mixin can be used on `admin.ModelAdmin` and as well on `admin.TabularInline` and `admin.StackedInline`.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-admin-charsleft-0.0.5.tar.gz (5.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page