开发者

How to User Modelviz.py to Create a Django Diagram

开发者 https://www.devze.com 2023-03-06 11:57 出处:网络
My Django application structure looks like this: MyProject |____templates |____static |____apps ____first_app

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

精彩评论

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

关注公众号