trouble with django-tagging

4 views
Skip to first unread message

waltbrad

unread,
Dec 3, 2008, 11:07:55 AM12/3/08
to Django Basic Apps
I posted this last night, but it never appeared. I don't know why. I
can't get tagging to install correctly. I'm running Python 2.5 and
Django 1.10 alpha. I downloaded the tagging-trunk through the SVN,
and used the setup.py install that it came with.

The directory sits at:

C:\Python25\Lib\site-packages\tagging

This is what I get from the interpreter:

>>> import tagging
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python25\lib\site-packages\tagging\__init__.py", line 3, in
<module>
from tagging.managers import ModelTaggedItemManager, TagDescriptor
File "C:\Python25\lib\site-packages\tagging\managers.py", line 5, in
<module>
from django.contrib.contenttypes.models import ContentType
File "C:\Python25\Lib\site-packages\django\contrib\contenttypes
\models.py", li
ne 1, in <module>
from django.db import models
File "C:\Python25\Lib\site-packages\django\db\__init__.py", line 9,
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
57, in _imp
ort_settings
raise ImportError("Settings cannot be imported, because
environment variable
%s is undefined." % ENVIRONMENT_VARIABLE)
ImportError: Settings cannot be imported, because environment variable
DJANGO_SE
TTINGS_MODULE is undefined.
>>>
====================
If DJANGO_SETTINGS_MODULE is the problem, how am I supposed to define
it? And where? Why would this be a problem in trying to import the
tagging module?

Myles Braithwaite

unread,
Dec 3, 2008, 11:14:27 AM12/3/08
to django-b...@googlegroups.com
Did you setup your database yet?

---
Myles Braithwaite

Please consider the trees before print this email.

waltbrad

unread,
Dec 3, 2008, 11:39:17 AM12/3/08
to Django Basic Apps


On Dec 3, 11:14 am, Myles Braithwaite <m...@mylesbraithwaite.com>
wrote:
> Did you setup your database yet?
>
Well, what I'm doing is going through James Bennett's book "Practical
Django Projects". So I have a small database created for that one
small project he has in the book. But, I need to have tagging before I
update the database with some new models.

Right now that database sits at:

C:/pjt/cms/cms.db

Myles Braithwaite

unread,
Dec 3, 2008, 11:52:29 AM12/3/08
to django-b...@googlegroups.com
Are you doing this though the command line? Try cding into your project directory and  going `python manage.py shell` and then running import tagging.

---
Myles Braithwaite

Please consider the trees before print this email.

waltbrad

unread,
Dec 3, 2008, 11:56:46 AM12/3/08
to Django Basic Apps


On Dec 3, 11:52 am, Myles Braithwaite <m...@mylesbraithwaite.com>
wrote:
> Are you doing this though the command line? Try cding into your  
> project directory and  going `python manage.py shell` and then running  
> import tagging.
>
Yes, you're right. I guess I have no problem at all. So, the tagging
can only be imported within a directory that has a database?

Myles Braithwaite

unread,
Dec 3, 2008, 12:17:29 PM12/3/08
to django-b...@googlegroups.com
Because tagging imports django.db.models which requires the django database settings to be entered the only way to can use the tagging application is within a Django application that has been configured with a database.


---
Myles Braithwaite

Please consider the trees before print this email.

waltbrad

unread,
Dec 3, 2008, 3:14:14 PM12/3/08
to Django Basic Apps


On Dec 3, 12:17 pm, Myles Braithwaite <m...@mylesbraithwaite.com>
wrote:
> Because tagging imports django.db.models which requires the django  
> database settings to be entered the only way to can use the tagging  
> application is within a Django application that has been configured  
> with a database.
>
> ---
Okay. Something to know. Thanks for getting me back on the road.
Reply all
Reply to author
Forward
0 new messages