Commit 7c548bc4 by Karsa Zoltán István

req and fix FK models

parent 9b86fc5b
...@@ -20,7 +20,7 @@ from django.contrib.auth.models import User, Group, AnonymousUser ...@@ -20,7 +20,7 @@ from django.contrib.auth.models import User, Group, AnonymousUser
from django.db.models import TextField, ForeignKey from django.db.models import TextField, ForeignKey
from ..models import ObjectLevel, AclBase from ..models import ObjectLevel, AclBase
from django.db import models
class TestModel(AclBase): class TestModel(AclBase):
normal_field = TextField() normal_field = TextField()
...@@ -34,7 +34,7 @@ class TestModel(AclBase): ...@@ -34,7 +34,7 @@ class TestModel(AclBase):
class Test2Model(AclBase): class Test2Model(AclBase):
normal2_field = TextField() normal2_field = TextField()
owner = ForeignKey(User, null=True) owner = ForeignKey(User, null=True, on_delete=models.CASCADE)
ACL_LEVELS = ( ACL_LEVELS = (
('one', 'One'), ('one', 'One'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment