Re: Creating a Node in Django ORM

2013-07-09 Thread John
On 09/07/13 14:07, Nafiul Islam wrote: > How would you create a node using Django's ORM. This is what I > mean: https://dpaste.de/JG52c/ > > Now, what I am basically trying to create is a liked list with nodes here. > Nafiul, >From your code snippet, it looks like you are trying to create a tree.

Re: Creating a Node in Django ORM

2013-07-09 Thread John
Nafiul, Either dig into the django-mptt code and pull out the bits you need, or look at MPTT and roll your own. http://www.sitepoint.com/hierarchical-data-database-2/ has a reasonable explanation (with code written in some archaic script ;) ) of how MPTT works. John On 09/07/13 14:26, Gamesbrai

Re: Creating a Node in Django ORM

2013-07-09 Thread Gamesbrainiac
Thanks for answering, but is there a simple way that does not use a third-party library? I'd like to have as much control over this as possible. On 9 July 2013 19:11, Elliot Bradbury wrote: > Check out django-mptt for creating parent/child (tree) relationships > between models. https://github.c

Re: Creating a Node in Django ORM

2013-07-09 Thread Elliot Bradbury
Check out django-mptt for creating parent/child (tree) relationships between models. https://github.com/django-mptt/django-mptt On Tue, Jul 9, 2013 at 9:07 AM, Nafiul Islam wrote: > How would you create a node using Django's ORM. This is what I mean: > https://dpaste.de/JG52c/ > > Now, what I am