Re: issue with django tagging
http://code.google.com/p/django-tagging/issues/detail?id=110 On Dec 10, 9:19 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > thanks > after I imported tagging,the errors is following: > Traceback (most recent call last): > File "", line 1, in > import tagging > File "C:\Python25\Lib\site-packages\tagging\__init__.py", line 3, in > > from tagging.managers import ModelTaggedItemManager, TagDescriptor > File "C:\Python25\Lib\site-packages\tagging\managers.py", line 5, in > > from django.contrib.contenttypes.models import ContentType > File "C:\Python25\Lib\site-packages\django\contrib\contenttypes > \models.py", line 1, in > from django.db import models > File "C:\Python25\Lib\site-packages\django\db\__init__.py", line 9, > in > if not settings.DATABASE_ENGINE: > File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line > 28, in __getattr__ > self._import_settings() > File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line > 57, in _import_settings > raise ImportError("Settings cannot be imported, because > environment variable %s is undefined." % ENVIRONMENT_VARIABLE) > ImportError: Settings cannot be imported, because environment variable > DJANGO_SETTINGS_MODULE is undefined. > > On Dec 10, 12:00 am, Mario <[EMAIL PROTECTED]> wrote: > > > Try typing the following: > > > python manage.py shell > > > from the python shell, type: > > > import tagging > > tagging.VERSION > > > Regards > > > On Dec 9, 8:24 am, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > hi > > > I got it from trunk,and the version is 0.3. After I installed > > > tagging , I cannot import it. The error information is following: > > > > Thank you very much > > > > --- > > > IDLE 1.2.2 > > > > >>> import tagging > > > > Traceback (most recent call last): > > > File " ", line 1, in > > > import tagging > > > File "C:\Python25\Lib\site-packages\tagging\__init__.py", line 3, in > > > > > > from tagging.managers import ModelTaggedItemManager, TagDescriptor > > > File "C:\Python25\Lib\site-packages\tagging\managers.py", line 5, in > > > > > > from django.contrib.contenttypes.models import ContentType > > > File "C:\Python25\Lib\site-packages\django\contrib\contenttypes > > > \models.py", line 1, in > > > from django.db import models > > > File "C:\Python25\Lib\site-packages\django\db\__init__.py", line 9, > > > in > > > if not settings.DATABASE_ENGINE: > > > File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line > > > 28, in __getattr__ > > > self._import_settings() > > > File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line > > > 57, in _import_settings > > > raise ImportError("Settings cannot be imported, because > > > environment variable %s is undefined." % ENVIRONMENT_VARIABLE) > > > ImportError: Settings cannot be imported, because environment variable > > > DJANGO_SETTINGS_MODULE is undefined. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: issue with django tagging
thanks after I imported tagging,the errors is following: Traceback (most recent call last): File "", line 1, in import tagging File "C:\Python25\Lib\site-packages\tagging\__init__.py", line 3, in from tagging.managers import ModelTaggedItemManager, TagDescriptor File "C:\Python25\Lib\site-packages\tagging\managers.py", line 5, in from django.contrib.contenttypes.models import ContentType File "C:\Python25\Lib\site-packages\django\contrib\contenttypes \models.py", line 1, in from django.db import models File "C:\Python25\Lib\site-packages\django\db\__init__.py", line 9, in if not settings.DATABASE_ENGINE: File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line 28, in __getattr__ self._import_settings() File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line 57, in _import_settings raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE) ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined. On Dec 10, 12:00 am, Mario <[EMAIL PROTECTED]> wrote: > Try typing the following: > > python manage.py shell > > from the python shell, type: > > import tagging > tagging.VERSION > > Regards > > On Dec 9, 8:24 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > hi > > I got it from trunk,and the version is 0.3. After I installed > > tagging , I cannot import it. The error information is following: > > > Thank you very much > > > --- > > IDLE 1.2.2 > > > >>> import tagging > > > Traceback (most recent call last): > > File " ", line 1, in > > import tagging > > File "C:\Python25\Lib\site-packages\tagging\__init__.py", line 3, in > > > > from tagging.managers import ModelTaggedItemManager, TagDescriptor > > File "C:\Python25\Lib\site-packages\tagging\managers.py", line 5, in > > > > from django.contrib.contenttypes.models import ContentType > > File "C:\Python25\Lib\site-packages\django\contrib\contenttypes > > \models.py", line 1, in > > from django.db import models > > File "C:\Python25\Lib\site-packages\django\db\__init__.py", line 9, > > in > > if not settings.DATABASE_ENGINE: > > File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line > > 28, in __getattr__ > > self._import_settings() > > File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line > > 57, in _import_settings > > raise ImportError("Settings cannot be imported, because > > environment variable %s is undefined." % ENVIRONMENT_VARIABLE) > > ImportError: Settings cannot be imported, because environment variable > > DJANGO_SETTINGS_MODULE is undefined. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: issue with django tagging
Thank you very much. I'll try it at once.BTW:when will the 0.3 version release? :) On Dec 10, 12:14 am, garagefan <[EMAIL PROTECTED]> wrote: > I had the same issue... you need to do two things... > > copy this into the setup.py > > from django.conf import settings > settings.configure() > > and make sure you have python-devel installed > > On Dec 9, 8:24 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > hi > > I got it from trunk,and the version is 0.3. After I installed > > tagging , I cannot import it. The error information is following: > > > Thank you very much > > > --- > > IDLE 1.2.2 > > > >>> import tagging > > > Traceback (most recent call last): > > File "", line 1, in > > import tagging > > File "C:\Python25\Lib\site-packages\tagging\__init__.py", line 3, in > > > > from tagging.managers import ModelTaggedItemManager, TagDescriptor > > File "C:\Python25\Lib\site-packages\tagging\managers.py", line 5, in > > > > from django.contrib.contenttypes.models import ContentType > > File "C:\Python25\Lib\site-packages\django\contrib\contenttypes > > \models.py", line 1, in > > from django.db import models > > File "C:\Python25\Lib\site-packages\django\db\__init__.py", line 9, > > in > > if not settings.DATABASE_ENGINE: > > File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line > > 28, in __getattr__ > > self._import_settings() > > File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line > > 57, in _import_settings > > raise ImportError("Settings cannot be imported, because > > environment variable %s is undefined." % ENVIRONMENT_VARIABLE) > > ImportError: Settings cannot be imported, because environment variable > > DJANGO_SETTINGS_MODULE is undefined. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: issue with django tagging
I had the same issue... you need to do two things... copy this into the setup.py from django.conf import settings settings.configure() and make sure you have python-devel installed On Dec 9, 8:24 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hi > I got it from trunk,and the version is 0.3. After I installed > tagging , I cannot import it. The error information is following: > > Thank you very much > > --- > IDLE 1.2.2 > > >>> import tagging > > Traceback (most recent call last): > File "", line 1, in > import tagging > File "C:\Python25\Lib\site-packages\tagging\__init__.py", line 3, in > > from tagging.managers import ModelTaggedItemManager, TagDescriptor > File "C:\Python25\Lib\site-packages\tagging\managers.py", line 5, in > > from django.contrib.contenttypes.models import ContentType > File "C:\Python25\Lib\site-packages\django\contrib\contenttypes > \models.py", line 1, in > from django.db import models > File "C:\Python25\Lib\site-packages\django\db\__init__.py", line 9, > in > if not settings.DATABASE_ENGINE: > File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line > 28, in __getattr__ > self._import_settings() > File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line > 57, in _import_settings > raise ImportError("Settings cannot be imported, because > environment variable %s is undefined." % ENVIRONMENT_VARIABLE) > ImportError: Settings cannot be imported, because environment variable > DJANGO_SETTINGS_MODULE is undefined. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: issue with django tagging
Try typing the following: python manage.py shell from the python shell, type: import tagging tagging.VERSION Regards On Dec 9, 8:24 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > hi > I got it from trunk,and the version is 0.3. After I installed > tagging , I cannot import it. The error information is following: > > Thank you very much > > --- > IDLE 1.2.2 > > >>> import tagging > > Traceback (most recent call last): > File "", line 1, in > import tagging > File "C:\Python25\Lib\site-packages\tagging\__init__.py", line 3, in > > from tagging.managers import ModelTaggedItemManager, TagDescriptor > File "C:\Python25\Lib\site-packages\tagging\managers.py", line 5, in > > from django.contrib.contenttypes.models import ContentType > File "C:\Python25\Lib\site-packages\django\contrib\contenttypes > \models.py", line 1, in > from django.db import models > File "C:\Python25\Lib\site-packages\django\db\__init__.py", line 9, > in > if not settings.DATABASE_ENGINE: > File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line > 28, in __getattr__ > self._import_settings() > File "C:\Python25\Lib\site-packages\django\conf\__init__.py", line > 57, in _import_settings > raise ImportError("Settings cannot be imported, because > environment variable %s is undefined." % ENVIRONMENT_VARIABLE) > ImportError: Settings cannot be imported, because environment variable > DJANGO_SETTINGS_MODULE is undefined. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Issue with django-tagging 0.3 (svn) with models definition
Nicolas Steinmetz wrote: > On Jul 9, 11:10 am, "Marek Stępniowski" <[EMAIL PROTECTED]> > wrote: > >> It seems you are running into one of django-tagging quirks. >> See issue #95 >> [http://code.google.com/p/django-tagging/issues/detail?id=95]. > > Oh thanks I missed this issue. I'll test it this evening. Thanks Marek for the right pointer, it works now :) Regards, Nicolas -- Nicolas Steinmetz http://www.steinmetz.fr/ http://www.unelectronlibre.info/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Issue with django-tagging 0.3 (svn) with models definition
On Jul 9, 11:10 am, "Marek Stępniowski" <[EMAIL PROTECTED]> wrote: > It seems you are running into one of django-tagging quirks. > See issue #95 [http://code.google.com/p/django-tagging/issues/detail?id=95]. Oh thanks I missed this issue. I'll test it this evening. Regards, Nicolas --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Issue with django-tagging 0.3 (svn) with models definition
On Sat, Jul 5, 2008 at 11:23 PM, Nicolas Steinmetz <[EMAIL PROTECTED]> wrote: > Despite I read a lot of time the overview.txt on the django tagging svn > repository, I still can't stand how to use it at my model's level. I'm > quite new to python and may miss some elements. > > When diving into the register part, it says it requiers a field for tag > which is supposed to be "tags". But what kind of type is this tag supposed > to be ? a TagField() ? > > I came down to this kind of things which looks not the optimum for me (at > least at validate & runserver step, it stops shouting...): > > from django.db import models > import tagging > from tagging.models import Tag > from tagging.fields import TagField > > # Create your models here. > class Links(models.Model): >title = models.CharField(max_length=80) >description = models.TextField() >url = models.URLField() >tags = TagField() > >class Admin: >list_display = ('title', 'description', 'url', 'tags',) >list_filter = ['title', 'tags'] >search_fields = ['title','tags',] > >class Meta: >verbose_name = "Lien" >verbose_name_plural = "Liens" > > tagging.register(Links) > > But when I try to save a link, I got : > > IntegrityError at /admin/links/links/add/ > tagging_taggeditem.object_id may not be NULL > > What did I miss ? It seems you are running into one of django-tagging quirks. See issue #95 [http://code.google.com/p/django-tagging/issues/detail?id=95]. -- Marek Stępniowski http://stepniowski.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Issue with django-tagging 0.3 (svn) with models definition
For a more immediate answer, ask on #django on IRC. Mailing list may not answer as quickly as you'd prefer. Or at all, if nobody has the time to answer. You should look at the model documentation for specifics, but you likely need null=True as a param in your tags=Tagfield() declaration. ---Pete r Herndon On 7/8/08, Nicolas Steinmetz <[EMAIL PROTECTED]> wrote: > > Nicolas Steinmetz wrote: > >> >> Hello, >> >> Despite I read a lot of time the overview.txt on the django tagging svn >> repository, I still can't stand how to use it at my model's level. I'm >> quite new to python and may miss some elements. >> >> When diving into the register part, it says it requiers a field for tag >> which is supposed to be "tags". But what kind of type is this tag supposed >> to be ? a TagField() ? >> >> I came down to this kind of things which looks not the optimum for me (at >> least at validate & runserver step, it stops shouting...): >> >> from django.db import models >> import tagging >> from tagging.models import Tag >> from tagging.fields import TagField >> >> # Create your models here. >> class Links(models.Model): >> title = models.CharField(max_length=80) >> description = models.TextField() >> url = models.URLField() >> tags = TagField() >> >> class Admin: >> list_display = ('title', 'description', 'url', 'tags',) >> list_filter = ['title', 'tags'] >> search_fields = ['title','tags',] >> >> class Meta: >> verbose_name = "Lien" >> verbose_name_plural = "Liens" >> >> tagging.register(Links) >> >> But when I try to save a link, I got : >> >> IntegrityError at /admin/links/links/add/ >> tagging_taggeditem.object_id may not be NULL >> >> What did I miss ? >> >> Regards, >> Nicolas >> > > Nobody is in a similar case than mine ? > -- > Nicolas Steinmetz > http://www.steinmetz.fr/ > http://www.unelectronlibre.info/ > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Issue with django-tagging 0.3 (svn) with models definition
Nicolas Steinmetz wrote: > > Hello, > > Despite I read a lot of time the overview.txt on the django tagging svn > repository, I still can't stand how to use it at my model's level. I'm > quite new to python and may miss some elements. > > When diving into the register part, it says it requiers a field for tag > which is supposed to be "tags". But what kind of type is this tag supposed > to be ? a TagField() ? > > I came down to this kind of things which looks not the optimum for me (at > least at validate & runserver step, it stops shouting...): > > from django.db import models > import tagging > from tagging.models import Tag > from tagging.fields import TagField > > # Create your models here. > class Links(models.Model): > title = models.CharField(max_length=80) > description = models.TextField() > url = models.URLField() > tags = TagField() > > class Admin: > list_display = ('title', 'description', 'url', 'tags',) > list_filter = ['title', 'tags'] > search_fields = ['title','tags',] > > class Meta: > verbose_name = "Lien" > verbose_name_plural = "Liens" > > tagging.register(Links) > > But when I try to save a link, I got : > > IntegrityError at /admin/links/links/add/ > tagging_taggeditem.object_id may not be NULL > > What did I miss ? > > Regards, > Nicolas > Nobody is in a similar case than mine ? -- Nicolas Steinmetz http://www.steinmetz.fr/ http://www.unelectronlibre.info/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---