1"""
2Field-like classes that aren't really fields. It's easier to use objects that
3have the same attributes as fields sometimes (avoids a lot of special casing).
4"""
5
6from plain.models import fields
7
8
9class OrderWrt(fields.IntegerField):
10 """
11 A proxy for the _order database field that is used when
12 Meta.order_with_respect_to is specified.
13 """
14
15 def __init__(self, *args, **kwargs):
16 kwargs["name"] = "_order"
17 kwargs["editable"] = False
18 super().__init__(*args, **kwargs)