When creating Django Pydev projects in Eclipse the default config package is created automatically with the following structure:
MyApp
__init__.py
settings.py
urls.py
wsgi.py
manage.py
Today I created a Django Pydev project and those files and initial package were not created.
I have tried several times to create new Django Pydev projects but the the initial structure is not being created.
This problem only just started happening. I have not had the problem prior to today.
Running this on the command line does work:
django-admin.py startproject mysite
The files and project structure are created correctly. So it's just Eclipse and Pydev that fails.
I am using Django 1.4, Pydev 2.5 and Eclipse Indigo 3.7 on Ubuntu 11.1
The Django integration in PyDev works through 3 main configurations: 1. The project must be marked as a Django project inside of PyDev. 2. A DJANGO_MANAGE_LOCATION string substitution variable must point to the project-relative location of manage.py. 3.
Note that the Shell with django environment action will create a shell properly configured with your settings, providing the default features from the PyDev shell, such as code completion, history, context assistants (ctrl+1), making an execfile of the editor, etc (see: Interactive Console for more details).
Run as Django/Debug as Django are available (note that they set the --noreload by default). This will create a default Run configuration, so, you may edit it later through run > run configurations (or debug > debug configurations) if you want to change a parameter.
Django actions can be accessed right clicking a project with the Django configuration and choosing Django > action. ctrl+2+dj <enter> to open a dialog with the history of entered actions ctrl+2+dj action_to_execute <enter> to already pass the action to be executed (e.g.: ctrl+2+dj help <enter>)
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With