Skip to main content

A collection of Django utils

Project description

# IS Django Utils

Django Utils is a collection of utils for Django.

## Quick start

1. Add "django-utils" to your INSTALLED_APPS setting like this:

```
INSTALLED_APPS = [
...
'django_utils',
...
]
```

## AdminWithSelectRelated

- Usage:

```
from django_utils.admin import AdminWithSelectRelated

class AlumnoAdmin(AdminWithSelectRelated):
list_display = ('estudiante', 'seccion', 'anio_lectivo', )
list_filter = (
('seccion', SeccionFilter),
'seccion__grado__anio_lectivo',
)
inlines = (AlumnoServicioInlineAdmin, AlumnoItemInlineAdmin, )

list_select_related = ('estudiante__profile', 'seccion__grado__anio_lectivo', )
```

## AdminInlineWithSelectRelated

- Usage:

```
from django_utils.admin import AdminInlineWithSelectRelated

class AlumnoItemInlineAdmin(AdminInlineWithSelectRelated):
model = AlumnoItem

list_select_related = ('alumno__estudiante__profile', 'item__anio_lectivo', )
```

## FilterWithSelectRelated

```
from django_utils.admin import FilterWithSelectRelated

class SeccionFilter(FilterWithSelectRelated):
list_select_related = ('grado', )
```


Project details


Release history Release notifications | RSS feed

This version

0.3

Download files

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

Source Distribution

inspired-django-utils-0.3.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

inspired_django_utils-0.3-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

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