Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.10/site-packages/django/db/models/fields/proxy.py: 50%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

6 statements  

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 django.db.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)