Where is my Django installation?

前端 未结 10 2031
小蘑菇
小蘑菇 2020-12-12 15:13

I use Django but I need to find the default templates and applications.

I don\'t know where it\'s installed.

How can I find that?

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-12 15:55

    The current top answer doesn't work, at least on linux.

    From the Django tutorial:

    If you have difficulty finding where the Django source files are located on your system, run the following command:

    python -c "
    import sys
    sys.path = sys.path[1:]
    import django
    print(django.__path__)"
    

提交回复
热议问题