On Jan 25, 2:30 pm, andreas schmid <a.schmi...@gmail.com> wrote:
> hi,
>
> i have to create a modificable database of parents and children (a tree
> basically). this is easy to achieve trough a modelclass with a
> Foreignkey to the model itself like:
>
> class Element(models.Model):
>     title  = models.CharField(max_length=50, unique=True)
>     parent = models.ForeignKey('self', blank=True, null=True)
>
> my goal is a form with inlinemodels where i can choose the children
> depending on which parent i select.
> an example could behttp://dajaxproject.com/forms/but the level is a
> few children deeper.
>
> i started doing it via ajax and json and i can get the children by
> clicking on the parent. (still with some problems)
> what i still cant understand if i can save this in a model?!
>
> i dont know if its clear what i need... i want to save it with a model
> instance with many inlineformsets and save thit in the db.
>
> any hint?
>
> thank you

It's not entirely clear what you want, but for storing hierarchical
data in Django I always recommend django-mptt.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to