models.py 499 Bytes
Newer Older
1 2
from django.db.models import TextField, ForeignKey
from django.contrib.auth.models import User
Őry Máté committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

from ..models import AclBase


class TestModel(AclBase):
    normal_field = TextField()

    ACL_LEVELS = (
        ('alfa', 'Alfa'),
        ('bravo', 'Bravo'),
        ('charlie', 'Charlie'),
    )


class Test2Model(AclBase):
    normal2_field = TextField()
Őry Máté committed
19
    owner = ForeignKey(User, null=True)
Őry Máté committed
20 21 22 23 24 25

    ACL_LEVELS = (
        ('one', 'One'),
        ('two', 'Two'),
        ('three', 'Three'),
    )