1
``>>>python manage.py syncdb  

 File "<console>", line 1  
python manage.py syncdb
SyntaxError: invalid syntax  
            ^``

What could the problem be?

Extra Info if it might help -
Python - 2.6
Django - 1.2.5
Eclipse - 3.6.0
Pydev - 1.6.5

Sussagittikasusa
  • 2,525
  • 9
  • 33
  • 47

1 Answers1

0

Yeah, @chris is right, your trying to run a file with a Python interpreter from within an interactive shell.

If you add Django (org.python.pydev.django.djangoNature) to the list of your project natures, you can then right click on your project in the resources view and you then have the Django submenu from where you can run a custom manage.py command and other commands such as sycdb, test, etc. from the list of entries.

If you want to store a custom command which would be an equivalent to, say, manage.py test myapp1, myapp2 you then create a custom run configuration. Basically, you specify your current project as the "Project", manage.py as the "Main module" and then write "test myapp1, myapp2" as the argument for manage.py.

Filip Dupanović
  • 32,650
  • 13
  • 84
  • 114