Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Noob can't get Aptana to run a Django server

Tags:

django

aptana

I'm lost and confused. Following a guide, I managed to get a Django server running by going to run -> cmd, cd to the project directory, and typing python manage.py runserver. That works fine.

I'm trying to get the Aptana server running so that I can debug code with breakpoints. So I right-clicked the project in Aptana and select Run as -> PyDev Django. But then I get the error message "no such table: django_session."

Why does the server work from the command line but not from Aptana? I need to get it to work from Aptana so I can debug.

like image 367
tanky Avatar asked Dec 07 '25 06:12

tanky


2 Answers

You should be able to right click a project with a Django configuration and choose "run as > Django".

See: http://pydev.org/manual_adv_django.html for details on configuring Django.

like image 103
Fabio Zadrozny Avatar answered Dec 08 '25 21:12

Fabio Zadrozny


The problem happens because the default "Run configuration" generated by Pydev/Eclipse points to the location of the workspace, rather than to your project.

To fix this, edit the Run Configuration (right click on the project -> Run as -> Run configurations). Change the setting Arguments -> Working Directory from Other (${workspace_loc:}) to Default (${project_loc:/selected project name})

This is strange behaviour, since the right option is called default, but not automatically used when the cfg is created.

like image 44
AMArostegui Avatar answered Dec 08 '25 21:12

AMArostegui



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!