i have file named dump.py at the root folder of django project,i want to connect database using django settings.py, so here is my code:
from django.db import connection, transaction cursor = connection.cursor() cursor.execute( .........) and i got this error: from django.db import connection, transaction File "c:\python25\lib\site-packages\django\db\__init__.py", line 7, in <module > if not settings.DATABASE_ENGINE: File "c:\python25\lib\site-packages\django\conf\__init__.py", line 28, in __ge tattr__ self._import_settings() File "c:\python25\lib\site-packages\django\conf\__init__.py", line 55, in _imp ort_settings raise EnvironmentError, "Environment variable %s is undefined." % ENVIRONMEN T_VARIABLE EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined. can somebody help me, thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---