django-admin.py is not working properly

前端 未结 2 1872
粉色の甜心
粉色の甜心 2020-12-18 10:22

I have just spotted that something is wrong with my django-admin.py command. I checked similar SO posts on django-admin.py problems but nothing seems to be related to my pro

相关标签:
2条回答
  • 2020-12-18 10:43

    The problem in my case was the I've lost .py file association rules.

    If you have similar problem you can check in command line what is the result of:

    assoc .py
    

    If there is no such association you need to create it:

    assoc .py=Python.File
    

    and create rule for Python.File:

    ftype Python.File="c:\python27\python.exe" "%1" %*
    

    (Replace with whatever the path is to your python interpretter.)

    now django-admin.py accepts command line args and everything works fine!

    0 讨论(0)
  • 2020-12-18 10:50

    This would be better as it does not require touching the registry at all:

    https://stackoverflow.com/a/10732170/1585863

    0 讨论(0)
提交回复
热议问题