On 4/6/07, Michael Newman <[EMAIL PROTECTED]> wrote: > > I am extremely new to programming, much less Django, but am working my > tail off trying to deploy a student alternative Webzine site. > > For the images I have been trying to use the nesh utils, > http://trac.studioquattro.biz/djangoutils/wiki/Thumbnail, because they > look perfect and a friend recommended them to me. I have tried > different methods to install the application and made the changes > talked about here, > http://groups.google.com/group/nesh-django-utils/browse_thread/thread/5129f1b17267abf5?hl=en > , but am still having problems. I am trying my hardest to break down > the code and figure out what could be going on. > > As I was going through the code, I opened a python shell to try to > import the functions. In order I did > > from django.conf import settings > from django.core.cache import get_cache > > and it raises an 'EnvironmentError: Environment Variable > DJANGO_SETTINGS_MODULE is undefined'. A quick search finds a few code > trac problems and a few fixes regarding this problem but none have > helped. >
Just what the error says, you have to define the DJANGO_SETTINGS_MODULE environment variable. Assuming you have started a project, go to your project folder and in your shell run this: ~$ python manage.py shell It will set up the settings environment for you and fire up a python shell. If you still want to do it yourself, then what you need to do is something like this (in your shell of course): ~$ export DJANGO_SETTINGS_MODULE=myproject.settings ~$ python The 'export' thing is how you define an environment variable. I'm assuming here that your are using a Linux machine, if you are in Windows then you'll have to use the "python manage.py shell" command. Regards, Jorge --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---