Thanks very much for your help Doug. Do you think there is value in
having a generic DAG implementation for Django? Seems to me like it
might be a useful addition, but I'm curious as to how useful it would
be given that most non-Django implementations I have come across are
as you describe 'very
We use a Tree for the navigation bar (not a true DAG, but there are
circular checks):
https://pycon.coderanger.net/browser/django/trunk/pycon/navbar/models.py
There is a validator IsNotCircular, which does the obvious.
There is code to do serialization (currently just a pickle), but there
are
Thanks for your response Julio,
something similar yes. What I'm after is an Django implementation of
an directed acyclic graph. I understand there's some complexity
involved to ensure no cycles can be created (which I understand is the
graph equivalent of an endless loop). There's plenty of good
I'm a newbie on Django my self but maybe this is what you are looking
for:
class Category(models.Model):
code = models.CharField(maxlength=200, unique=True)
products = models.ManyToManyField('Product')
class Product(models.Model):
parent = models.ForeignKey('Post')
Hi all,
definite newbie here. I'd like to implement a category type system in
Django. I've looked in the cookbook and Googled a bit, but to no avail. What
I'm after should be pretty simple: a directed graph for categories, where
objects and perhaps categories can be a member of one or more
5 matches
Mail list logo