view apps/treecomments/models.py @ 194:50ba20441122

Added comment template files and customized comments app files
author ahsanalishahid <ahsan.ali.shahid@gmail.com>
date Tue, 02 Jul 2013 02:04:09 +0500
parents
children 134f726fd62c
line wrap: on
line source

from django.contrib.comments.models import Comment
from mptt.models import MPTTModel, TreeForeignKey
# Create your models here.


class TreeComments(MPTTModel,Comment):
	parent = TreeForeignKey('self', null =True, blank=True,related_name='children')

	class MPTTMeta:
		order_insertion_by = ['submit_date']

	class Meta:
		ordering = ['tree_id','lft']