问题描述
我已经在环境中设置了这个环境变量,并将文件关联设置为我的 python27.exe
当我运行 django -admin.py
startproject mysite从DOS命令提示符,它执行,但它显示我所有的信息(像选项等),好像我键入帮助选项。实际上并不是在我的目录中创建项目文件。我感谢帮助。
还有,我尝试了这里找到的解决方案(这似乎是完全相同的问题)。
它没有工作
我遇到同样的问题。
从未与Django合作过,而是在Windows 7平台上使用了Python 2.7。我下载了最新版本的Django,并将其解压缩到我的桌面上。
我发现不能仅仅遵循文档中提供的教程,并且发现了这个线程,现在我可以通过执行以下操作得到它:
我使用dos命令窗口打开。我导航到我想要设置项目文件的根目录。然后我确保django_admin文件按照wynston的说明进行编辑,然后键入以下内容。
python c:\location的django_admin.py startproject项目名称
,并执行得很好。
*感谢wynston编辑django_admin.py文件。
It worked when I did the poll tutorial in linux, but I'm doing it again in Windows 7, and it does nothing.
I already set the environmental variables, and set the file association to my python27.exe
When I run django-admin.py
startproject mysite from the DOS command prompt, it executes, but it's showing me all the information (Like the options, etc) as though I typed the help option instead. It's not actually creating project files in my directory. I appreciate the help.
also, I tried the solution found here (it appears to be the exact same problem).It did not work
django-admin.py is not working properly
I ran into the same problem.
Never having worked with Django before but having worked with Python 2.7 a fair bit, all on a windows 7 platform. I downloaded the latest version of Django and unpacked it on my desktop.
After mucking around a bit managed to get it to install itself. I found could not just follow the tutorial thats provided in the docs googled the problem and found this thread, now I was able to get it to work by doing the following things,
I work with a dos command window open. I navigate to the root of where I want the project file to be set up. I then ensure that the django_admin file has been editted as per wynston's instructions and then typed the following.
python c:\location of django_admin.py startproject projectname
and it executed beautifully.
*Thanks to wynston for the edit to the django_admin.py file.
这篇关于django-admin.py startproject mysite没有做任何事情的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!