| author | ymh <ymh.work@gmail.com> |
| Wed, 20 Jan 2010 00:34:04 +0100 | |
| changeset 0 | 0d40e90630ef |
| child 29 | cc9b7e14412b |
| permissions | -rw-r--r-- |
| 0 | 1 |
""" |
2 |
Field-like classes that aren't really fields. It's easier to use objects that |
|
3 |
have the same attributes as fields sometimes (avoids a lot of special casing). |
|
4 |
""" |
|
5 |
||
6 |
from django.db.models import fields |
|
7 |
||
8 |
class OrderWrt(fields.IntegerField): |
|
9 |
""" |
|
10 |
A proxy for the _order database field that is used when |
|
11 |
Meta.order_with_respect_to is specified. |
|
12 |
""" |
|
13 |
name = '_order' |
|
14 |
attname = '_order' |
|
15 |
column = '_order' |
|
16 |