liuyang1520 / django-command-extensions

Automatically exported from code.google.com/p/django-command-extensions
MIT License
0 stars 0 forks source link

Graph models does not distinguish models multiple models with the same name. #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If we have the following model setup:

    news/models.py:
        class Image(modes.Model):
            ...
    gallery/models.py:
        class  Image(models.Model):
             ...

and use ManyToMany, Foreign Keys etc the graph that gets produced will
think that that both image models are the same in effect hidding one of
them and producing incorrect relations.

Attached is a quick'n'dirty patch that solved the issue for me. All the
patch does is use to prefix the nodes with __module__ and update the
relations in the same way so that dot can distinguish the models with the
same names.

Original issue reported on code.google.com by tadam...@gmail.com on 10 Jun 2008 at 12:21

Attachments:

GoogleCodeExporter commented 8 years ago
looks good here

added this patch to svn.

Original comment by v.oostv...@gmail.com on 11 Jun 2008 at 3:28