Being new to Django (but not new to programming) I liked the idea of a project that does a lot with very little code.

So I wanted to get this working.

But I kept getting an error about not being able to import the settings file. Maybe you have some idea of what I'm doing wrong.

I started with this:

django-admin.py starproject univ

which generated the appropriate directory and files. Then I replaced the settings.py that django generated with the one that you provided on this page.

Then I used your command:

django-admin.py runserver --settings="settings"

I received the error about not being able to import the settings file, so after googling around a bit, I created an environment variable in Windows called PYTHONPATH to point to my django-apps folder which contains my univ app. Then I created a DJANGO_MODULE_SETTINGS environment variable and set it to univ.settings.

No luck.

I deleted the DJANGO_MODULE_SETTINGS and tried pointing the PYTHONPATH variable directly at the django-apps/univ folder instead of the folder one level up.

Still no luck.

By the way, I'm using xp, django 0.96 and Python 2.5 - don't know if that makes any difference. If you have any suggestions, I would appreciate it - thought this looked pretty cool and would love to get it running.

— Wilcox (December 11, 2008 at 2:27 p.m.)

Hey Wilcox,

You shouldn't need to start a projct or set PYTHON_PATH or anything.

If the django-admin command isn't working, you could try running python in the dir that settings.py is in. You should be able to "import settings" from the python shell. That would at least tell you if python can find the file.

— Sam (December 12, 2008 at 9:59 a.m.)

Yes, python can find the file. I deleted the PYTHONPATH variable and the DJANGO_SETTINGS_MODULE as you suggested. I put your settings.py in a directory with nothing else in it.

When I do "import settings" from the python shell, python finds settings.py but I get a traceback which indicates that the environment variable DJANGO_SETTINGS_MODULE is not defined. (The traceback is down below)

Then I tried dozens of variations of adding and removing different folders from the DJANGO_SETTINGS_MODULE and PYTHONPATH variables to see if I could get it to work but nothing seemed to help.

Any suggestions would be appreciated.

Thanks.

import settings Traceback (most recent call last): File "[HTML_REMOVED]", line 1, in [HTML_REMOVED] File "settings.py", line 3, in [HTML_REMOVED] from django import forms File "C:Python25Libsite-packagesdjangoforms_init_.py", line 1, in [HTML_REMOVED] from django.oldforms import * File "C:Python25Libsite-packagesdjangooldforms_init_.py", line 1, in [HTML_REMOVED] from django.core import validators File "C:Python25libsite-packagesdjangocorevalidators.py", line 13, in [HTML_REMOVED] from django.utils.translation import gettext, gettext_lazy, ngettext File "C:Python25Libsite-packagesdjangoutilstranslation_init_.py", line 3, in [HTML_REMOVED] if settings.USE_I18N: File "C:Python25Libsite-packagesdjangoconf_init_.py", line 28, in getattr self._import_settings() File "C:Python25Libsite-packagesdjangoconf_init_.py", line 53, in importsettings raise EnvironmentError, "Environment variable %s is undefined." % ENVIRONMENT_VARIABLE EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined.

— Wilcox (December 14, 2008 at 3:47 p.m.)

How peculiar.

I just tried copying the code of the post into settings.py, and it worked for me.

I'm sorry for playing the OS card, but I wonder if this is a different between Windows and Ubuntu.

I'd be happy to continue troubleshooting this with you. Drop me a line. sam -at- pocketuniverse.ca

— Sam (December 17, 2008 at 10:57 a.m.)

Pitures Of Drugs [HTML_REMOVED]viagra for sale[HTML_REMOVED] Viagra has a bioavailability of 40%, hepatic metabolism, a half life of 3 to 4 hours, fecal excretion of around 80%, renal excretion of around 13%, is available by prescription only, and is given through oral administration. [HTML_REMOVED]buy sildenafil online[HTML_REMOVED] Viagra has a bioavailability of 40%, hepatic metabolism, a half life of 3 to 4 hours, fecal excretion of around 80%, renal excretion of around 13%, is available by prescription only, and is given through oral administration. http://www.macautocenter.com/ - cheap viagra Viagra is a drug that can help you get your private part machinery working again so that erectile dysfunction doesn’t dominate your activity in the bedroom.

moraEronnacor (July 08, 2011 at 8:10 a.m.)

wance

Wroca (March 18, 2012 at 4:21 p.m.)

Hello! adakfkf interesting adakfkf site! I'm really like it! Very, very adakfkf good!

Pharme559 (August 03, 2012 at 9:49 a.m.)

Hello! , , , , ,

cialis (October 25, 2012 at 10:32 p.m.)

Hello! , , , ,

viagra (October 29, 2012 at 6:45 a.m.)

Hello! ebagbdb interesting ebagbdb site! I'm really like it! Very, very ebagbdb good!

Pharmd78 (October 29, 2012 at 9:34 p.m.)

Very nice site!

Pharmd531 (October 29, 2012 at 9:34 p.m.)

Hello! , , , , ,

cialis (November 01, 2012 at 5:37 a.m.)

Hello! , , , , ,

for (November 05, 2012 at 11:55 p.m.)

Hello! , , , ,

viagra (November 06, 2012 at 2:14 a.m.)

Hello! , , , , ,

cialis (November 07, 2012 at 12:43 a.m.)

Hello! , , ,

cialis (November 08, 2012 at 11:44 p.m.)

Hello! , , , ,

fast (November 14, 2012 at 12:49 a.m.)

Hello! , , , ,

cialis (November 23, 2012 at 6:38 a.m.)

Hello! , , , ,

cialis (November 28, 2012 at 6:46 a.m.)

Hello!

cialis (April 15, 2014 at 2:23 a.m.)

Hello!

natural_viagra (April 15, 2014 at 2:23 a.m.)

Hello!

to (April 16, 2014 at 4:19 p.m.)

Hello!

cialis (April 16, 2014 at 4:23 p.m.)

Hello!

fast (April 17, 2014 at 7:01 p.m.)

Hello!

free_viagra (April 17, 2014 at 7:01 p.m.)

Hello!

generic_cialis (April 18, 2014 at 8:47 p.m.)

Hello!

generic (April 22, 2014 at 9:20 a.m.)

Hello!

cialis (April 23, 2014 at 2:37 a.m.)

Hello!

cialis (yesterday at 10:21 p.m.)