Re: Django model -> DOT converter

2006-08-06 Thread limodou
On 8/7/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: > > On 6 Aug 2006, at 15:10, limodou wrote: > > It seems that _meta.one_to_one_field is not a list or tuple. So for > > field in o._meta.one_to_one_field will be failed. And I think to > > deal with OneToOne relationship should just like deal

Re: Django model -> DOT converter

2006-08-06 Thread limodou
On 8/7/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: > > On 6 Aug 2006, at 14:20, limodou wrote: > > And you can also add these code at the top of your script: > > > > import settings > > from django.core.management import setup_environ > > setup_environ(settings) > > > > So you don't need to se

Re: Django model -> DOT converter

2006-08-06 Thread Antonio Cavedoni
On 6 Aug 2006, at 14:20, limodou wrote: > And you can also add these code at the top of your script: > > import settings > from django.core.management import setup_environ > setup_environ(settings) > > So you don't need to setup DJANGO_SETTING_MODULE env variable any > more. But the settings modul

Re: Django model -> DOT converter

2006-08-06 Thread Antonio Cavedoni
On 6 Aug 2006, at 14:25, Paul Sargent wrote: > One thought about how ForeignKeys are represented. At the moment > you can't tell which field points to which model. I'm looking at > zyons-comment.pdf and can only tell the which model a ForeignKey > uses because the attribute names are sensibl

Re: Django model -> DOT converter

2006-08-06 Thread Antonio Cavedoni
On 6 Aug 2006, at 15:10, limodou wrote: > It seems that _meta.one_to_one_field is not a list or tuple. So for > field in o._meta.one_to_one_field will be failed. And I think to > deal with OneToOne relationship should just like deal with ForeignKey. Thanks limodou, I merged your changes with

Re: Django model -> DOT converter

2006-08-06 Thread limodou
On 8/6/06, limodou <[EMAIL PROTECTED]> wrote: > On 8/6/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: > > > > On 6 Aug 2006, at 6:08, limodou wrote: > > > A very cool tool. And a question: > > > > > > It seems that it can not display OneToOne relationship. > > > > I just fixed it to support both

Re: Django model -> DOT converter

2006-08-06 Thread Paul Sargent
Nice, has the possibility of being really useful. One thought about how ForeignKeys are represented. At the moment you can't tell which field points to which model. I'm looking at zyons-comment.pdf and can only tell the which model a ForeignKey uses because the attribute names are sensible. How

Re: Django model -> DOT converter

2006-08-06 Thread limodou
On 8/6/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: > > On 6 Aug 2006, at 6:08, limodou wrote: > > A very cool tool. And a question: > > > > It seems that it can not display OneToOne relationship. > > I just fixed it to support both OneToOneFields and GenericRelations. > I also added lots of sa

Re: Django model -> DOT converter

2006-08-06 Thread Antonio Cavedoni
On 6 Aug 2006, at 6:08, limodou wrote: > A very cool tool. And a question: > > It seems that it can not display OneToOne relationship. I just fixed it to support both OneToOneFields and GenericRelations. I also added lots of samples from Ian’s Zyons project: http://code.djangoproject.com/wik

Re: Django model -> DOT converter

2006-08-05 Thread limodou
On 8/5/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: > > On 5 Aug 2006, at 3:40, Jeremy Dunck wrote: > > On 8/4/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: > >> I have an initial, rather crude implementation of the Django model -> > >> DOT (the Graphviz file format) converter. > > > > Relate

Re: Django model -> DOT converter

2006-08-05 Thread Antonio Cavedoni
On 5 Aug 2006, at 3:40, Jeremy Dunck wrote: > On 8/4/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: >> I have an initial, rather crude implementation of the Django model -> >> DOT (the Graphviz file format) converter. > > Related: > http://groups.google.com/group/django-users/browse_frm/thread/

Re: Django model -> DOT converter

2006-08-05 Thread Antonio Cavedoni
On 5 Aug 2006, at 2:44, Malcolm Tredinnick wrote: > That's a lot of circles! :-) Hehe, I told you it was crude! ;-) > If you weren't aware of them, you might want to have a look at the > "record" style for Nodes in graphviz. They are useful for > displaying things like class diagrams or data

Re: Django model -> DOT converter

2006-08-05 Thread Antonio Cavedoni
On 5 Aug 2006, at 3:05, Russell Keith-Magee wrote: > Nifty! If I may make some comments (and this is intended as > constructive criticism, not an attempt to belittle your work) Well, I was just procrastinating my university thesis anyway… > - The graphs that are drawn are accurate, but don't d

Re: Django model -> DOT converter

2006-08-05 Thread [EMAIL PROTECTED]
Nice work! & I'd love to see this in contrib somewhere. --Simon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscrib

Re: Django model -> DOT converter

2006-08-04 Thread gjiro
Very nice! Curious to see where this is heading... django.contrib.viz?? Gjiro --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com

Re: Django model -> DOT converter

2006-08-04 Thread Jeremy Dunck
On 8/4/06, Antonio Cavedoni <[EMAIL PROTECTED]> wrote: > I have an initial, rather crude implementation of the Django model -> > DOT (the Graphviz file format) converter. Related: http://groups.google.com/group/django-users/browse_frm/thread/bde9e0928973f14a/08d286888aa781f5?tvc=1&hl=en#08d286888

Re: Django model -> DOT converter

2006-08-04 Thread Russell Keith-Magee
On 8/5/06, Antonio Cavedoni <[EMAIL PROTECTED] > wrote: Hello everyone,I have an initial, rather crude implementation of the Django model ->DOT (the Graphviz file format) converter.Hi AntonioNifty! If I may make some comments (and this is intended as constructive criticism, not an attempt to belitt

Re: Django model -> DOT converter

2006-08-04 Thread Malcolm Tredinnick
On Sat, 2006-08-05 at 02:17 +0200, Antonio Cavedoni wrote: > Hello everyone, > > I have an initial, rather crude implementation of the Django model -> > DOT (the Graphviz file format) converter. > > Some generated .dot files: > > http://cavedoni.com/2006/08/camera.dot > http://cavedoni

Django model -> DOT converter

2006-08-04 Thread Antonio Cavedoni
Hello everyone, I have an initial, rather crude implementation of the Django model -> DOT (the Graphviz file format) converter. Some generated .dot files: http://cavedoni.com/2006/08/camera.dot http://cavedoni.com/2006/08/mincer.dot The resulting Graphviz image: http://cavedoni.com/20