I almost finish my unit testing setup, but exist something I'm missing.
For example, when I run F5 from Komodo under a .py file under django,
this complain about not have the settings configured. That is fine..
However, I like to run any .py of django like is possible of normal .py
files.
Because I now can run unit test from my django app, I know how do this:
import sys
import os
SETTINGS_MODULE = 'settings'
project_dir = os.path.abspath('../')
sys.path.append(os.path.join(project_dir, '..'))
sys.path.append("..")
sys.path.pop()
os.environ['DJANGO_SETTINGS_MODULE'] = 'jhonWeb.settings'
and that stuff, however, I don't figure how know if I'm running under
the normal django environment or standalone...
So I can put in the header:
if IsStandAloneChek:
SetupDjango()
and test the interative way ;)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---