开发者

How to User Modelviz.py to Create a Django Diagram

My Django application structure looks like this:

MyProject
    |____templates
    |____static
    |____apps
    |   |____first_app
    |   |____second_pass
    |____settgins.py
    |____...

and I'm on Windows. Where do I have to paste modelviz.py? and also what command do I have to run to make it work? When I paste modelviz开发者_StackOverflow社区.py in apps and run

d:\projects\MyProject\apps> python modelviz.py first_app > diagram_1.dot
I get an error

ImportError: Settings cannot be imported, because environment variable DJANGO_SE
TTINGS_MODULE is undefined.


You need to set the DJANGO_SETTINGS_MODULE environment variable first. In the documentation you will find that you can do this with

set DJANGO_SETTINGS_MODULE=mysite.settings

under Windows...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜