Newly created Pydev Django Project does not include initial package with Settings.py etc Newly created Pydev Django Project does not include initial package with Settings.py etc django django

Newly created Pydev Django Project does not include initial package with Settings.py etc


I had the same issue today but it turned out that it was because my project name was not handled - eg "My Project". The space threw it. Calling the project "MyProject" worked a treat.

From the cmd line it gives the following error - which eclipse is not returning:

c:\django-admin.py startproject "My Project"

Error: "My Project" is not a valid project name. Please use only numbers, letters and underscores.


I ran into the same issue on win7.

I also tried to run django-admin.py manually from command line. Instead of generating a project, it opened up a default editor for .py file. Then this was clear to me that it was because I installed some program which registered itself as the default program to run .py file. In my case it was WebMatrix2 but even if you don't install anything, there is a good chance that it is set to notepad by default by win7.

I knew that PyDev will actually run django-admin.py to generate the project. So my guess was that PyDev tried to run the .py file. Then since the program to run it was not python.exe, nothing was generated. PyDev ignored this error so there was nothing in the project.

Then the fix is simple. Choose any .py file, right click to open the properties window and change the default program to python.exe.

Now go back to Eclipse and try to create a django project again. You should be able to see manage.py file and other files created.

Hope this helps.


I was having this problem - I tried to create a project called test-django, and it wouldn't add manage.py etc to the structure. So I tried doing the same thing with django-admin.py and it failed and said only numbers, letters and underscores!

So the problem is that eclipse/pydev fail to report this error and make the project anyway!