ness.models

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from django.db import models
class Foo(models.Model):
name = models.CharField(maxlength=255)
parent = models.ForeignKey('self',related_name='childs',
null=True,blank=True)
ness_left = models.IntegerField(blank=True,default=0)
ness_right = models.IntegerField(blank=True,default=0)
ness_level = models.IntegerField(blank=True,default=0)
def __unicode__(self):
return self.name