I wanna debug inside a IDE (komodo 4) my test cases for django, so I'm
looking for a way to simply run the script from the IDE and step in as
usual.

This is my layout:

F:\Proyectos\Python\jhonWeb <= root inside it:

\demo\ THE SITE with the settings file
\shared\ shared models I have develop to share across several projects
as blog, tags and users

Inside \shared\ have:

\articles\tests.py

I try this:

import sys
import os

project_dir = os.path.abspath('../../') # Go to F:\Proyectos\Python
\jhonWeb
sys.path.append(project_dir) # Add the root to the path and
sys.path.append(project_dir+r'\\demo') #add the test project
os.environ['DJANGO_SETTINGS_MODULE'] = 'demo.settings'

But I have:

"D:\Programacion\Python\Python24\lib\site-packages\django\db\models
\base.py", line 52, in __new__
    new_class._meta.app_label = model_module.__name__.split('.')[-2]
IndexError: list index out of range

Obviously the thing work as usual if run it from python manage.py test
and similars.

Also, why is necesary the DJANGO_SETTINGS_MODULE magic after all???

NOTE: Current trunk revision 6050.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to