Simple Integer-based Ordering for Django Models
Project description
Django Simple Ordering
A package for adding simple integer-based ordering to your Django models.
Installation
Run the following command to install django-simple-ordering package.
pip install django-simple-ordering
Usage
Follow the below steps to add ordering to your models:
- Make sure
django_simple_orderinganddjango_object_actionsexist in your Django projectINSTALLED_APPSsetting. This is because this package relies on the django-object-actions package for implementing changelist actions.
INSTALLED_APPS = [
# Django Applications ...
"django_object_actions",
"django_simple_ordering",
# Your Applications ...
]
- Add the
SimpleOrderingModelMixinto your model:
from django.db import models
from django_simple_ordering.models import SimpleOrderingModelMixin
class Book(SimpleOrderingModelMixin, models.Model):
title = models.CharField(max_length=100, unique=True)
class Meta(SimpleOrderingModelMixin.Meta):
verbose_name = "book"
verbose_name_plural = "books"
- Add the
SimpleOrderingModelAdminMixinto your model admin:
from django.contrib import admin
from django_simple_ordering import SimpleOrderingModelAdminMixin
@admin.register(Book)
class BookAdmin(SimpleOrderingModelAdminMixin, admin.ModelAdmin):
list_display = ("title",)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_simple_ordering-1.0.2.tar.gz.
File metadata
- Download URL: django_simple_ordering-1.0.2.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af0a8290f4eee05ee3e34c44ef649f0881ec9e4d705dde9026cdbccdd83a6294
|
|
| MD5 |
2806443568affcdfff1f4ed467edb6ad
|
|
| BLAKE2b-256 |
b553451d94bdda52081a611d4f9d4a30a6cde551adcf13b3519efb9cbf89a4b0
|
Provenance
The following attestation bundles were made for django_simple_ordering-1.0.2.tar.gz:
Publisher:
python-package-publish.yaml on aminvsf/django-simple-ordering
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_simple_ordering-1.0.2.tar.gz -
Subject digest:
af0a8290f4eee05ee3e34c44ef649f0881ec9e4d705dde9026cdbccdd83a6294 - Sigstore transparency entry: 426259349
- Sigstore integration time:
-
Permalink:
aminvsf/django-simple-ordering@654537f9832d0635c0a11755b6e59bbf17e85330 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/aminvsf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package-publish.yaml@654537f9832d0635c0a11755b6e59bbf17e85330 -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_simple_ordering-1.0.2-py3-none-any.whl.
File metadata
- Download URL: django_simple_ordering-1.0.2-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f0cbda1d303e8c90a462f2dcc70a812af500ee34ea99b81da225d2708b55380
|
|
| MD5 |
4a513ef54058d224af55066f5f8eaf65
|
|
| BLAKE2b-256 |
de40bd64b743460d7dd783a2cacf15421de493925df4f754c813368283918d0f
|
Provenance
The following attestation bundles were made for django_simple_ordering-1.0.2-py3-none-any.whl:
Publisher:
python-package-publish.yaml on aminvsf/django-simple-ordering
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_simple_ordering-1.0.2-py3-none-any.whl -
Subject digest:
1f0cbda1d303e8c90a462f2dcc70a812af500ee34ea99b81da225d2708b55380 - Sigstore transparency entry: 426259357
- Sigstore integration time:
-
Permalink:
aminvsf/django-simple-ordering@654537f9832d0635c0a11755b6e59bbf17e85330 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/aminvsf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-package-publish.yaml@654537f9832d0635c0a11755b6e59bbf17e85330 -
Trigger Event:
release
-
Statement type: