django-orderable-inlines
Drag-to-reorder inline model admins for Django
Installation
pip install django-orderable-inlines
Add orderable_inlines to your INSTALLED_APPS.
Example
models.py:
from django.db import models
class Gallery(models.Model):
name = models.CharField(max_length=16)
class Photo(models.Model):
gallery = models.ForeignKey(Gallery)
image = models.ImageField(upload_to='gallery_photos')
order = models.PositiveIntegerField(default=1)
admin.py:
from django.contrib import admin
from gallery.models import Gallery, Photo
from orderable_inlines import OrderableTabularInline
class PhotoInline(OrderableTabularInline):
model = Book
orderable_field = 'order'
class GalleryAdmin(admin.ModelAdmin):
inlines = [
PhotoInline,
]
admin.site.register(Gallery, GalleryAdmin)
Metadata
Release files for django-orderable-inlines 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-orderable-inlines-0.0.6.tar.gz | 15.5 kB | Without provenance | Details for django-orderable-inlines-0.0.6.tar.gz |
Release files / django-orderable-inlines-0.0.6.tar.gz
| Download URL | django-orderable-inlines-0.0.6.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e5ebd1579eeab0c978df10f86201764795908249990b629046b2d98d268baca
|
|
BLAKE2b-256 checksum How to use checksums |
1e294f779627291fbc0b4f200cbd577ecd7ccf61a219eb741ac36ee38f582289
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-orderable-inlines 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.