My favorites | Sign in
Project Logo
                
Details: Show all Hide all

Last 7 days

  • Dec 15, 2009
    issue 232 (model.save() fails to retain tags) commented on by jonasnockert   -   Seems like you're on the right track already! For some more information, you might want to look at #229 and read the comments in one of the patches.
    Seems like you're on the right track already! For some more information, you might want to look at #229 and read the comments in one of the patches.
  • Dec 14, 2009
    issue 232 (model.save() fails to retain tags) commented on by disneyfriedhistory   -   Uggg. I'm such an idiot. Apparently calling save() clears the tags by calling update_tags(), but without sending any tags. This acts as if you've deleted all the tags. The solution is to simply not save the note after its initial creation. (The first save is needed to give the note an id).
    Uggg. I'm such an idiot. Apparently calling save() clears the tags by calling update_tags(), but without sending any tags. This acts as if you've deleted all the tags. The solution is to simply not save the note after its initial creation. (The first save is needed to give the note an id).

Last 30 days

  • Dec 13, 2009
    issue 232 (model.save() fails to retain tags) reported by disneyfriedhistory   -   I am using svn version of django-tagging, but have also tried the version in the ubuntu repositories (ver .2, I think). Anyways, I have a simple model with tagging: from django.db import models from tagging.fields import TagField from tagging.models import Tag class Note(models.Model): text = models.TextField() tags = TagField() def set_tags(self, tags): Tag.objects.update_tags(self, tags) def get_tags(self): return Tag.objects.get_for_object(self) I open the django shell and create a note: >>>from myapp.models import Note >>>note = Note.objects.create() >>>note.id 4 >>> note.get_tags() [] >>> note.set_tags("Hello, World") >>> note.get_tags() [<Tag: Hello>, <Tag: World>] >>> note.save() >>> note.get_tags() [] So, something about saving the object clears the tags. Now, when I look at the admin panel for tagging, the tags are created. But under the tagged items admin panel, they do not appear. Interestingly, if I add a note and add tags to it through the automatically created admin panel for the Note model, it everything appears to work. I've looked at the patches in Issue 166, but these don't seem to fix the problem. Any ideas?
    I am using svn version of django-tagging, but have also tried the version in the ubuntu repositories (ver .2, I think). Anyways, I have a simple model with tagging: from django.db import models from tagging.fields import TagField from tagging.models import Tag class Note(models.Model): text = models.TextField() tags = TagField() def set_tags(self, tags): Tag.objects.update_tags(self, tags) def get_tags(self): return Tag.objects.get_for_object(self) I open the django shell and create a note: >>>from myapp.models import Note >>>note = Note.objects.create() >>>note.id 4 >>> note.get_tags() [] >>> note.set_tags("Hello, World") >>> note.get_tags() [<Tag: Hello>, <Tag: World>] >>> note.save() >>> note.get_tags() [] So, something about saving the object clears the tags. Now, when I look at the admin panel for tagging, the tags are created. But under the tagged items admin panel, they do not appear. Interestingly, if I add a note and add tags to it through the automatically created admin panel for the Note model, it everything appears to work. I've looked at the patches in Issue 166, but these don't seem to fix the problem. Any ideas?
  • Dec 13, 2009
    issue 231 (How to get tags fields without parse and hit the database ge...) reported by mariocesar.c50   -   Everytime I get all objects from a model with a tagfield, while rendering on the template, for each item, something like that. SELECT `stream_post`.`tags` FROM `stream_post` WHERE `stream_post`.`id` = 520 ORDER BY `stream_post`.`created` DESC If I had 200 records, it runs 200 querys. It's not optimized. As in the database it stores tags as: 'blue, yellow, news' I would like to get this string, instead the instances of the tags. How can I get all records from a Model with the tag field, with out hit the database to get the tags?
    Everytime I get all objects from a model with a tagfield, while rendering on the template, for each item, something like that. SELECT `stream_post`.`tags` FROM `stream_post` WHERE `stream_post`.`id` = 520 ORDER BY `stream_post`.`created` DESC If I had 200 records, it runs 200 querys. It's not optimized. As in the database it stores tags as: 'blue, yellow, news' I would like to get this string, instead the instances of the tags. How can I get all records from a Model with the tag field, with out hit the database to get the tags?
  • Dec 12, 2009
    issue 230 (Tag.object.usage_for_queryset() fails when queryset is filte...) reported by marcin.j.nowak   -   Failed on SQLite3 backend Example: Valid query: Tag.objects.usage_for_queryset(Trip.tagged.with_all(['mountain','snow']).fi lter(is_public=True).order_by('-created_at')) Failing query: Tag.objects.usage_for_queryset(Trip.tagged.with_all(['mountain']).filter(is _public=True).order_by('-created_at')) OperationalError Traceback (most recent call last) /home/ubu/devel/projekty/ntk/apps/django-tagging/tagging/models.pyc in usage_for_queryset(self, queryset, counts, min_count) 169 else: 170 extra_criteria = '' --> 171 return self._get_usage(queryset.model, counts, min_count, extra_joins, extra_criteria, params) 172 173 def related_for_model(self, tags, model, counts=False, min_count=None): /home/ubu/devel/projekty/ntk/apps/django-tagging/tagging/models.pyc in _get_usage(self, model, counts, min_count, extra_joins, extra_criteria, params) 113 114 cursor = connection.cursor() --> 115 cursor.execute(query % (extra_joins, extra_criteria, min_count_sql), params) 116 tags = [] 117 for row in cursor.fetchall(): /usr/lib/python2.6/site-packages/Django-1.1- py2.6.egg/django/db/backends/sqlite3/base.pyc in execute(self, query, params) 191 def execute(self, query, params=()): 192 query = self.convert_query(query, len(params)) --> 193 return Database.Cursor.execute(self, query, params) 194 195 def executemany(self, query, param_list): OperationalError: ambiguous column name: tagging_taggeditem.content_type_id This error is caused by "Optimisation for single tag" in TaggedItemManager.get_by_model() method. Problem can be solved by simply removing optimisation for single tag. Patch attached.
    Failed on SQLite3 backend Example: Valid query: Tag.objects.usage_for_queryset(Trip.tagged.with_all(['mountain','snow']).fi lter(is_public=True).order_by('-created_at')) Failing query: Tag.objects.usage_for_queryset(Trip.tagged.with_all(['mountain']).filter(is _public=True).order_by('-created_at')) OperationalError Traceback (most recent call last) /home/ubu/devel/projekty/ntk/apps/django-tagging/tagging/models.pyc in usage_for_queryset(self, queryset, counts, min_count) 169 else: 170 extra_criteria = '' --> 171 return self._get_usage(queryset.model, counts, min_count, extra_joins, extra_criteria, params) 172 173 def related_for_model(self, tags, model, counts=False, min_count=None): /home/ubu/devel/projekty/ntk/apps/django-tagging/tagging/models.pyc in _get_usage(self, model, counts, min_count, extra_joins, extra_criteria, params) 113 114 cursor = connection.cursor() --> 115 cursor.execute(query % (extra_joins, extra_criteria, min_count_sql), params) 116 tags = [] 117 for row in cursor.fetchall(): /usr/lib/python2.6/site-packages/Django-1.1- py2.6.egg/django/db/backends/sqlite3/base.pyc in execute(self, query, params) 191 def execute(self, query, params=()): 192 query = self.convert_query(query, len(params)) --> 193 return Database.Cursor.execute(self, query, params) 194 195 def executemany(self, query, param_list): OperationalError: ambiguous column name: tagging_taggeditem.content_type_id This error is caused by "Optimisation for single tag" in TaggedItemManager.get_by_model() method. Problem can be solved by simply removing optimisation for single tag. Patch attached.
  • Dec 07, 2009
    issue 229 (Extended test case for issue #28 (tests included for 0.3 and...) reported by jonasnockert   -   I had lots of problems with disappearing tags with django-tagging 0.3, which after researching, stemmed from the TagField caching issue (#28). The patch for #28 was committed for 0.4pre and solved the problem I encountered , as long as one reloads the object being tagged between loading the object, adding tags and saving the object. For my own purposes, I created a test case that fails in 0.3 and passes in 0.4 so as to make sure my buildout with django-tagging 0.3 + applied patch for #28 works properly in this regard. I've adapted it to fit within the django-tagging test suite but I'm not sure it adds any test coverage to the tests included with the patch for #28. Take it for what it's worth and if you'd like me to change anything, let me know! Thanks!
    I had lots of problems with disappearing tags with django-tagging 0.3, which after researching, stemmed from the TagField caching issue (#28). The patch for #28 was committed for 0.4pre and solved the problem I encountered , as long as one reloads the object being tagged between loading the object, adding tags and saving the object. For my own purposes, I created a test case that fails in 0.3 and passes in 0.4 so as to make sure my buildout with django-tagging 0.3 + applied patch for #28 works properly in this regard. I've adapted it to fit within the django-tagging test suite but I'm not sure it adds any test coverage to the tests included with the patch for #28. Take it for what it's worth and if you'd like me to change anything, let me know! Thanks!
  • Dec 04, 2009
    issue 227 (Cache not updated after ModelFormset save) commented on by google.g...@jensdiemer.de   -   Sorry, my unittest is wrong: I forgot to call formset.save() With this, everything works fine. But now i see my original problem. The tagging models Tag and TaggedItem are not updated, if Formset queryset would be limited with: queryset.only("tags") I updated the teste here. The teste works if the line with """queryset = queryset.only("tags")""" would be deleted.
    Sorry, my unittest is wrong: I forgot to call formset.save() With this, everything works fine. But now i see my original problem. The tagging models Tag and TaggedItem are not updated, if Formset queryset would be limited with: queryset.only("tags") I updated the teste here. The teste works if the line with """queryset = queryset.only("tags")""" would be deleted.
  • Dec 04, 2009
    issue 227 (Cache not updated after ModelFormset save) commented on by google.g...@jensdiemer.de   -   Create this unittest for tagging (for insert into tagging/tests/tests.py): {{{ from django.forms.models import modelformset_factory class TestTagFieldInFormset(TestCase): def test_tag_field_in_modelformset(self): """ TagField in a Modelformset created by modelformset_factory """ FormTest.objects.create(tags=u'test1 test2 test3') FormTest.objects.create(tags=u'test4 test5') FormTest.objects.create(tags=u'test6 test7') ModelFormset = modelformset_factory(model=FormTest, extra=0, fields=("tags",)) formset = ModelFormset(queryset=FormTest.objects.all()) data = { 'form-TOTAL_FORMS': '3', # the number of forms rendered 'form-INITIAL_FORMS': '3', # the number of forms with initial data 'form-0-id': "1", 'form-0-tags': "test1 test2 test3", # Not changed 'form-1-id': "2", 'form-1-tags': "new1 new2", 'form-2-id': "3", 'form-2-tags': "new3 new4", } formset = ModelFormset(data, queryset=FormTest.objects.all()) self.failUnless(formset.is_valid(), "formset is not valid: %r" % formset.errors) instances = formset.save(commit=False) formset.save_m2m() # Check the CharField in the FormTest model. # Note: instances contains only the changed items! self.failUnlessEqual(len(instances), 2) self.failUnlessEqual(instances[0].tags, "new1 new2") self.failUnlessEqual(instances[1].tags, "new3 new4") # Check the m2m values: queryset = FormTest.objects.all() self.failUnlessEqual(queryset[0].tags, "test1 test2 test3") self.failUnlessEqual(queryset[1].tags, "new1 new2") self.failUnlessEqual(queryset[2].tags, "new3 new4") }}} The last two failUnlessEqual() would be failed, because the formset didn't updated tagging.models.Tag and tagging.models.TaggedItem output: {{{ FAIL: TagField in a Modelformset created by modelformset_factory ---------------------------------------------------------------------- Traceback (most recent call last): File "tagging/tests/tests.py", line 966, in test_tag_field_in_modelformset self.failUnlessEqual(queryset[1].tags, "new1 new2") AssertionError: u'test4 test5' != 'new1 new2' }}} IMHO it's not a django but: formset.save_m2m() teste exists here: http://code.djangoproject.com/browser/django/trunk/tests/modeltests/model_formsets/models.py#L330
    Create this unittest for tagging (for insert into tagging/tests/tests.py): {{{ from django.forms.models import modelformset_factory class TestTagFieldInFormset(TestCase): def test_tag_field_in_modelformset(self): """ TagField in a Modelformset created by modelformset_factory """ FormTest.objects.create(tags=u'test1 test2 test3') FormTest.objects.create(tags=u'test4 test5') FormTest.objects.create(tags=u'test6 test7') ModelFormset = modelformset_factory(model=FormTest, extra=0, fields=("tags",)) formset = ModelFormset(queryset=FormTest.objects.all()) data = { 'form-TOTAL_FORMS': '3', # the number of forms rendered 'form-INITIAL_FORMS': '3', # the number of forms with initial data 'form-0-id': "1", 'form-0-tags': "test1 test2 test3", # Not changed 'form-1-id': "2", 'form-1-tags': "new1 new2", 'form-2-id': "3", 'form-2-tags': "new3 new4", } formset = ModelFormset(data, queryset=FormTest.objects.all()) self.failUnless(formset.is_valid(), "formset is not valid: %r" % formset.errors) instances = formset.save(commit=False) formset.save_m2m() # Check the CharField in the FormTest model. # Note: instances contains only the changed items! self.failUnlessEqual(len(instances), 2) self.failUnlessEqual(instances[0].tags, "new1 new2") self.failUnlessEqual(instances[1].tags, "new3 new4") # Check the m2m values: queryset = FormTest.objects.all() self.failUnlessEqual(queryset[0].tags, "test1 test2 test3") self.failUnlessEqual(queryset[1].tags, "new1 new2") self.failUnlessEqual(queryset[2].tags, "new3 new4") }}} The last two failUnlessEqual() would be failed, because the formset didn't updated tagging.models.Tag and tagging.models.TaggedItem output: {{{ FAIL: TagField in a Modelformset created by modelformset_factory ---------------------------------------------------------------------- Traceback (most recent call last): File "tagging/tests/tests.py", line 966, in test_tag_field_in_modelformset self.failUnlessEqual(queryset[1].tags, "new1 new2") AssertionError: u'test4 test5' != 'new1 new2' }}} IMHO it's not a django but: formset.save_m2m() teste exists here: http://code.djangoproject.com/browser/django/trunk/tests/modeltests/model_formsets/models.py#L330
  • Dec 03, 2009
    issue 228 (tagging.utils.edit_string_for_tags doesn't handle a single t...) commented on by paulswartz   -   Ugh, don't know how I missed *both* other copies of this bug. Wish c.g.c let me mark it as such.
    Ugh, don't know how I missed *both* other copies of this bug. Wish c.g.c let me mark it as such.
  • Dec 03, 2009
    issue 228 (tagging.utils.edit_string_for_tags doesn't handle a single t...) reported by paulswartz   -   >>> import tagging >>> tag, _ = tagging.models.Tag.objects.get_or_create(name='spa ces') >>> tagging.utils.edit_string_for_tags([tag]) u'spa ces' >>> tagging.utils.parse_tag_input(tagging.utils.edit_string_for_tags([tag])) [u'ces', u'spa'] Expected output: [u'spa ces'] edit_string_for_tags([tag]) should probably have returned u',spa ces' instead. Patch is attached.
    >>> import tagging >>> tag, _ = tagging.models.Tag.objects.get_or_create(name='spa ces') >>> tagging.utils.edit_string_for_tags([tag]) u'spa ces' >>> tagging.utils.parse_tag_input(tagging.utils.edit_string_for_tags([tag])) [u'ces', u'spa'] Expected output: [u'spa ces'] edit_string_for_tags([tag]) should probably have returned u',spa ces' instead. Patch is attached.
  • Dec 03, 2009
    issue 227 (Cache not updated after ModelFormset save) commented on by google.g...@jensdiemer.de   -   I tested it with tagging.register() and then tagging.models.Tag and tagging.models.TaggedItem updated with the ModelFormset. Why?
    I tested it with tagging.register() and then tagging.models.Tag and tagging.models.TaggedItem updated with the ModelFormset. Why?
  • Dec 03, 2009
    issue 227 (Cache not updated after ModelFormset save) commented on by google.g...@jensdiemer.de   -   Sorry, it's not a cache problem. Think the problem is: The ModelFormset doesn't have a .save_m2m() method. The tags would only be stored in the model tag CharField, but not in tagging.models.Tag and tagging.models.TaggedItem Note: I created with modelformset_factory only a formset with the tag field. It looks like this: {{{ ModelFormset = modelformset_factory( model=MyTaggedModel, extra=0, fields=("tags",) ) }}} My model is not registered with tagging.register(), because then i ran into this problem: http://code.google.com/p/django-tagging/issues/detail?id=151
    Sorry, it's not a cache problem. Think the problem is: The ModelFormset doesn't have a .save_m2m() method. The tags would only be stored in the model tag CharField, but not in tagging.models.Tag and tagging.models.TaggedItem Note: I created with modelformset_factory only a formset with the tag field. It looks like this: {{{ ModelFormset = modelformset_factory( model=MyTaggedModel, extra=0, fields=("tags",) ) }}} My model is not registered with tagging.register(), because then i ran into this problem: http://code.google.com/p/django-tagging/issues/detail?id=151
  • Dec 03, 2009
    issue 227 (Cache not updated after ModelFormset save) commented on by google.g...@jensdiemer.de   -   Same error as http://code.google.com/p/django-tagging/issues/detail?id=226 ?
  • Dec 03, 2009
    issue 227 (Cache not updated after ModelFormset save) reported by google.g...@jensdiemer.de   -   I edit a tagging field with a ModelFormset created by modelformset_factory. The internal tag field cache would not be updated after the ModelFormset saved.
    I edit a tagging field with a ModelFormset created by modelformset_factory. The internal tag field cache would not be updated after the ModelFormset saved.
  • Nov 28, 2009
    issue 226 (TagField won't be updated saving proxy models) reported by bencevoltam   -   If you use TagField in a model and create a proxy for that model, then the modification of the tags trough the proxy's admin wont't update the tag cache. It seems that the save signals (connected by the tagging module to the original model) aren't emited. (django 1.1.1 final)
    If you use TagField in a model and create a proxy for that model, then the modification of the tags trough the proxy's admin wont't update the tag cache. It seems that the save signals (connected by the tagging module to the original model) aren't emited. (django 1.1.1 final)
  • Nov 23, 2009
    issue 184 (edit_string_for_tags handles a single multiword tag incorrec...) commented on by winhamwr   -   Fix applied to my branch on github. Needs testing/review http://github.com/winhamwr/django-tagging
    Fix applied to my branch on github. Needs testing/review http://github.com/winhamwr/django-tagging
  • Nov 23, 2009
    issue 225 (edit_string_for_tags() returns wrong string when there is ju...) commented on by rub...@altimari.com.br   -   It is - and I *did* look the issue list before submitting this one... Sorry for the time lost.
    It is - and I *did* look the issue list before submitting this one... Sorry for the time lost.
  • Nov 23, 2009
    issue 225 (edit_string_for_tags() returns wrong string when there is ju...) commented on by winhamwr   -   This looks to be a duplicate of #184
    This looks to be a duplicate of #184
  • Nov 23, 2009
    issue 225 (edit_string_for_tags() returns wrong string when there is ju...) reported by rub...@altimari.com.br   -   If the tag list sent to edit_string_for_tags() contains just one tag, and this tag contains one or more spaces inside, the string returned will be wrong, since it lacks a trailing comma: import tagging t = tagging.models.Tag() t.name = 'tag with spaces inside' tagging.utils.edit_string_for_tags([t]) -> u'tag with spaces inside' That's because edit_string_for_tags() ends with: return glue.join(names) Even though glue will (correctly) be ', ' when the tag contains a space inside, join() won't append a trailing glue (it only puts glue in between tags, that is, if there is more than one tag).
    If the tag list sent to edit_string_for_tags() contains just one tag, and this tag contains one or more spaces inside, the string returned will be wrong, since it lacks a trailing comma: import tagging t = tagging.models.Tag() t.name = 'tag with spaces inside' tagging.utils.edit_string_for_tags([t]) -> u'tag with spaces inside' That's because edit_string_for_tags() ends with: return glue.join(names) Even though glue will (correctly) be ', ' when the tag contains a space inside, join() won't append a trailing glue (it only puts glue in between tags, that is, if there is more than one tag).

Earlier this year

  • Nov 18, 2009
    issue 224 (No TagField on ModelForm when using register()) reported by ringemup   -   I added tagging to a model using tagging.register(ModelName). When I create a ModelForm for that model, it would be useful for a TagField to be generated, but none is. Is this intentional?
    I added tagging to a model using tagging.register(ModelName). When I create a ModelForm for that model, it would be useful for a TagField to be generated, but none is. Is this intentional?
  • Nov 17, 2009
    issue 91 (utils.calculate_cloud can leave font_size unset for most fre...) commented on by arthur.furlan   -   I've encoutered this issue too. I open a new issue (sorry for that) and added a new patch on issue #223.
    I've encoutered this issue too. I open a new issue (sorry for that) and added a new patch on issue #223.
  • Nov 17, 2009
    issue 223 ([PATCH] Float precision problem on Tag.objects.cloud_for_mod...) commented on by arthur.furlan   -   Related to issue #91.
    Related to issue #91.
  • Nov 17, 2009
    issue 223 ([PATCH] Float precision problem on Tag.objects.cloud_for_mod...) commented on by arthur.furlan   -   It seems Google Code doesn't allow text formatting in their issues. :)
    It seems Google Code doesn't allow text formatting in their issues. :)
  • Nov 17, 2009
    issue 223 ([PATCH] Float precision problem on Tag.objects.cloud_for_mod...) reported by arthur.furlan   -   I'm having trouble with float precision in the `Tag.objects.cloud_for_model` method. The problem causes the no creation of the `font_size` attribute on the `Tag` object, what may cause problems to the users. In my case, for instance, I had a server error in *all my pages* due a `{{ tag.font_size|add:"10" }}` code in my base template. This error can be shown by the following code: {{{ from django.core.management import setup_environ from blog import settings setup_environ(settings) from diario.models import Entry from tagging.models import Tag tagcloud = Tag.objects.cloud_for_model(Entry) for tag in tagcloud: debug = 'tag: %s, count: %d, font_size:%s' print debug % (tag.name, tag.count, str(getattr(tag, 'font_size', '***ERROR***'))) }}} If I run the code above with the current version of the django-tagging, I got the following output: {{{ tag: debian, count: 5, font_size:4 tag: django, count: 3, font_size:3 tag: geoip, count: 1, font_size:1 tag: go, count: 1, font_size:1 tag: google, count: 1, font_size:1 tag: hello, count: 1, font_size:1 tag: ipython, count: 2, font_size:2 tag: programming, count: 1, font_size:1 tag: python, count: 6, font_size:***ERROR*** tag: seo, count: 1, font_size:1 tag: shell, count: 2, font_size:2 tag: sitemaps, count: 1, font_size:1 tag: sysadmin, count: 3, font_size:3 tag: ubuntu, count: 1, font_size:1 }}} _Note the `font_size:***ERROR***` of the python's tag._ I fixed the problem but I don't know if my patch is the best way to solve this issue and if it isn't, I'll be glad to know how to fix it. :) After adding my patch and running the same code above, I got the following output: {{{ tag: debian, count: 5, font_size:4 tag: django, count: 3, font_size:3 tag: geoip, count: 1, font_size:1 tag: go, count: 1, font_size:1 tag: google, count: 1, font_size:1 tag: hello, count: 1, font_size:1 tag: ipython, count: 2, font_size:2 tag: programming, count: 1, font_size:1 tag: python, count: 6, font_size:4 tag: seo, count: 1, font_size:1 tag: shell, count: 2, font_size:2 tag: sitemaps, count: 1, font_size:1 tag: sysadmin, count: 3, font_size:3 tag: ubuntu, count: 1, font_size:1 }}} _Note the `font_size:***ERROR***` of the python's tag that now shows the correct value._
    I'm having trouble with float precision in the `Tag.objects.cloud_for_model` method. The problem causes the no creation of the `font_size` attribute on the `Tag` object, what may cause problems to the users. In my case, for instance, I had a server error in *all my pages* due a `{{ tag.font_size|add:"10" }}` code in my base template. This error can be shown by the following code: {{{ from django.core.management import setup_environ from blog import settings setup_environ(settings) from diario.models import Entry from tagging.models import Tag tagcloud = Tag.objects.cloud_for_model(Entry) for tag in tagcloud: debug = 'tag: %s, count: %d, font_size:%s' print debug % (tag.name, tag.count, str(getattr(tag, 'font_size', '***ERROR***'))) }}} If I run the code above with the current version of the django-tagging, I got the following output: {{{ tag: debian, count: 5, font_size:4 tag: django, count: 3, font_size:3 tag: geoip, count: 1, font_size:1 tag: go, count: 1, font_size:1 tag: google, count: 1, font_size:1 tag: hello, count: 1, font_size:1 tag: ipython, count: 2, font_size:2 tag: programming, count: 1, font_size:1 tag: python, count: 6, font_size:***ERROR*** tag: seo, count: 1, font_size:1 tag: shell, count: 2, font_size:2 tag: sitemaps, count: 1, font_size:1 tag: sysadmin, count: 3, font_size:3 tag: ubuntu, count: 1, font_size:1 }}} _Note the `font_size:***ERROR***` of the python's tag._ I fixed the problem but I don't know if my patch is the best way to solve this issue and if it isn't, I'll be glad to know how to fix it. :) After adding my patch and running the same code above, I got the following output: {{{ tag: debian, count: 5, font_size:4 tag: django, count: 3, font_size:3 tag: geoip, count: 1, font_size:1 tag: go, count: 1, font_size:1 tag: google, count: 1, font_size:1 tag: hello, count: 1, font_size:1 tag: ipython, count: 2, font_size:2 tag: programming, count: 1, font_size:1 tag: python, count: 6, font_size:4 tag: seo, count: 1, font_size:1 tag: shell, count: 2, font_size:2 tag: sitemaps, count: 1, font_size:1 tag: sysadmin, count: 3, font_size:3 tag: ubuntu, count: 1, font_size:1 }}} _Note the `font_size:***ERROR***` of the python's tag that now shows the correct value._
  • Nov 17, 2009
    issue 83 (Proposed change: add slug to the tags) commented on by ringemup   -   I'd love to see this too, especially since there are already proposed patches.
    I'd love to see this too, especially since there are already proposed patches.
  • Nov 17, 2009
    issue 189 (TagSelectField (using FilteredSelectMultiple)) commented on by ammac...@gmail.com   -   i made a hacky kind of workaround: http://bitbucket.org/tehfink/django-taggroups/
    i made a hacky kind of workaround: http://bitbucket.org/tehfink/django-taggroups/
  • Nov 17, 2009
    issue 189 (TagSelectField (using FilteredSelectMultiple)) commented on by andreterra   -   this needs to be added to the project ASAP, it's a great feature and it really puzzled me that this wasn't the default approach for tagging when i first installed django- tagging. major thanks
    this needs to be added to the project ASAP, it's a great feature and it really puzzled me that this wasn't the default approach for tagging when i first installed django- tagging. major thanks
  • Nov 15, 2009
    issue 110 (installation issue) commented on by meenalpant   -   Seems like this should be fixed but I still get the error. I have to do all the steps in Eric's post to import tagging after a fresh install. I am using django1.1 and python2.6 $ sudo pip install django-tagging Python 2.6 (r26:66714, Jun 8 2009, 16:07:29) [GCC 4.4.0 20090506 (Red Hat 4.4.0-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import tagging Traceback (most recent call last): File "<stdin>", line 1, in <module> File "tagging/__init__.py", line 3, in <module> from tagging.managers import ModelTaggedItemManager, TagDescriptor File "tagging/managers.py", line 5, in <module> from django.contrib.contenttypes.models import ContentType File "/usr/lib/python2.6/site-packages/django/contrib/contenttypes/models.py", line 1, in <module> from django.db import models File "/usr/lib/python2.6/site-packages/django/db/__init__.py", line 10, in <module> if not settings.DATABASE_ENGINE: File "/usr/lib/python2.6/site-packages/django/utils/functional.py", line 269, in __getattr__ self._setup() File "/usr/lib/python2.6/site-packages/django/conf/__init__.py", line 38, in _setup 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. >>> from django.conf import settings >>> settings.configure() >>> import tagging >>> tagging.VERSION (0, 4, 'pre') >>>
    Seems like this should be fixed but I still get the error. I have to do all the steps in Eric's post to import tagging after a fresh install. I am using django1.1 and python2.6 $ sudo pip install django-tagging Python 2.6 (r26:66714, Jun 8 2009, 16:07:29) [GCC 4.4.0 20090506 (Red Hat 4.4.0-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import tagging Traceback (most recent call last): File "<stdin>", line 1, in <module> File "tagging/__init__.py", line 3, in <module> from tagging.managers import ModelTaggedItemManager, TagDescriptor File "tagging/managers.py", line 5, in <module> from django.contrib.contenttypes.models import ContentType File "/usr/lib/python2.6/site-packages/django/contrib/contenttypes/models.py", line 1, in <module> from django.db import models File "/usr/lib/python2.6/site-packages/django/db/__init__.py", line 10, in <module> if not settings.DATABASE_ENGINE: File "/usr/lib/python2.6/site-packages/django/utils/functional.py", line 269, in __getattr__ self._setup() File "/usr/lib/python2.6/site-packages/django/conf/__init__.py", line 38, in _setup 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. >>> from django.conf import settings >>> settings.configure() >>> import tagging >>> tagging.VERSION (0, 4, 'pre') >>>
  • Nov 14, 2009
    issue 222 (Presence of TagField on a model generates a SQL per object i...) reported by kingrolo   -   Hiya. Just a quick note. One latest trunk (revision 171) I'm seeing a SQL query generated per model item when displaying a list of them in my template when that model has a TagField property (whether or not I try an access tag information). I've reverted to using the version of tagging which comes with Pinax 0.7b3 and it doesn't happen (ie, I can have the TagField and access it and it doesn't create a new query each time). Cheers. Rolo.
    Hiya. Just a quick note. One latest trunk (revision 171) I'm seeing a SQL query generated per model item when displaying a list of them in my template when that model has a TagField property (whether or not I try an access tag information). I've reverted to using the version of tagging which comes with Pinax 0.7b3 and it doesn't happen (ie, I can have the TagField and access it and it doesn't create a new query each time). Cheers. Rolo.
  • Nov 13, 2009
    issue 166 (Model Inheritance ) commented on by Anatoliy.Larin   -   Updated patch for 0.3pre
    Updated patch for 0.3pre
  • Nov 05, 2009
    issue 28 (TagField doesn't sync the list when you TagField doesn't syn...) Status changed by brosner   -  
    Status: Fixed
    Status: Fixed
  • Nov 05, 2009
    issue 28 (TagField doesn't sync the list when you TagField doesn't syn...) Summary changed by brosner   -   Fixed in r170.
    Summary: TagField doesn't sync the list when you TagField doesn't sync when removing tags
    Fixed in r170.
    Summary: TagField doesn't sync the list when you TagField doesn't sync when removing tags
  • Nov 05, 2009
    r171 ([0.3.X] Fixed issue #28 — properly update TagField tag insta...) committed by brosner   -   [0.3.X] Fixed issue #28 — properly update TagField tag instance cache when loading the object to keep everything in sync. Thanks ebartels and carljm for the legwork. Backport of r170 from trunk
    [0.3.X] Fixed issue #28 — properly update TagField tag instance cache when loading the object to keep everything in sync. Thanks ebartels and carljm for the legwork. Backport of r170 from trunk
  • Nov 05, 2009
    r170 (Fixed issue #28 — properly update TagField tag instance cach...) committed by brosner   -   Fixed issue #28 — properly update TagField tag instance cache when loading the object to keep everything in sync. Thanks ebartels and carljm for the legwork.
    Fixed issue #28 — properly update TagField tag instance cache when loading the object to keep everything in sync. Thanks ebartels and carljm for the legwork.
  • Nov 03, 2009
    issue 220 (The testsuite fails if run with python 2.6) Status changed by brosner   -   Fixed in r168.
    Status: Fixed
    Fixed in r168.
    Status: Fixed
  • Nov 03, 2009
    r169 ([0.3.X] Fixed issue #220 — coerce Exception object using str...) committed by brosner   -   [0.3.X] Fixed issue #220 — coerce Exception object using str for consistency on 2.5 and 2.6. Thanks phxx.de for the report. Backport of r168 from trunk
    [0.3.X] Fixed issue #220 — coerce Exception object using str for consistency on 2.5 and 2.6. Thanks phxx.de for the report. Backport of r168 from trunk
  • Nov 03, 2009
    r168 (Fixed issue #220 — coerce Exception object using str for con...) committed by brosner   -   Fixed issue #220 — coerce Exception object using str for consistency on 2.5 and 2.6. Thanks phxx.de for the report.
    Fixed issue #220 — coerce Exception object using str for consistency on 2.5 and 2.6. Thanks phxx.de for the report.
  • Nov 03, 2009
    issue 220 (The testsuite fails if run with python 2.6) Status changed by brosner   -  
    Status: Accepted
    Status: Accepted
  • Nov 03, 2009
    issue 28 (TagField doesn't sync the list when you TagField doesn't sy...) commented on by carl.j.meyer   -   Updated patch for trunk, with unittest.
    Updated patch for trunk, with unittest.
  • Nov 01, 2009
    issue 115 (Multiple TagFields / Tag Types in One Model) commented on by ammac...@gmail.com   -   attached is a hacky workaround, using the TagSelectField from here: http://code.google.com/p/django- tagging/issues/detail?id=189#c3 sorry for the exec's! suggestions on avoiding them?
    attached is a hacky workaround, using the TagSelectField from here: http://code.google.com/p/django- tagging/issues/detail?id=189#c3 sorry for the exec's! suggestions on avoiding them?
  • Nov 01, 2009
    issue 221 (Adding atrributes to Tag model) commented on by Laundro   -   I was thinking, maybe an AbstractTag class (with the methods & properties Tag now has) would be an idea? Tag could be added to tagging.models as a simple subclass, inheriting all of AbstractTag, but users could then just import models.AbstractTag and do as they please (for instance add language, colours, and other properties or methods).
    I was thinking, maybe an AbstractTag class (with the methods & properties Tag now has) would be an idea? Tag could be added to tagging.models as a simple subclass, inheriting all of AbstractTag, but users could then just import models.AbstractTag and do as they please (for instance add language, colours, and other properties or methods).
  • Oct 29, 2009
    issue 221 (Adding atrributes to Tag model) reported by Laundro   -   Hi - It's very well possible that my lack of Python knowledge is causing this, but I was wondering whether it would be possible to add extra attributes to the Tag model without having to touch the django-tagging source code. I would like to be able to attach a 'colour' attribute to my tags. Thanks in advance, Mathieu
    Hi - It's very well possible that my lack of Python knowledge is causing this, but I was wondering whether it would be possible to add extra attributes to the Tag model without having to touch the django-tagging source code. I would like to be able to attach a 'colour' attribute to my tags. Thanks in advance, Mathieu
  • Oct 22, 2009
    issue 44 (TagManager.usage_for_model returns list instead of queryset) commented on by litt.fire.SA   -   For anyone interested in a solution to order the tags by count in the templates: the built in django {% regroup %} tag can be used quite effectively. http://docs.djangoproject.com/en/dev/ref/templates/builtins/#regroup Scroll down, just above the next section (spaceless tag), and you will see how to order the set. I ended up with this: {% regroup tag_list|dictsort:"count" by count as sorted_tags %} <div class="portlet" id="tag_list"> {% for tags in sorted_tags %} <h3>Tags</h3> <ul> {% for tag in tags.list %} <li><a href="#">{{ tag }} ({{ tag.count }})</a></li> {% endfor %} </ul> {% endfor %} </div>
    For anyone interested in a solution to order the tags by count in the templates: the built in django {% regroup %} tag can be used quite effectively. http://docs.djangoproject.com/en/dev/ref/templates/builtins/#regroup Scroll down, just above the next section (spaceless tag), and you will see how to order the set. I ended up with this: {% regroup tag_list|dictsort:"count" by count as sorted_tags %} <div class="portlet" id="tag_list"> {% for tags in sorted_tags %} <h3>Tags</h3> <ul> {% for tag in tags.list %} <li><a href="#">{{ tag }} ({{ tag.count }})</a></li> {% endfor %} </ul> {% endfor %} </div>
  • Oct 21, 2009
    issue 189 (TagSelectField (using FilteredSelectMultiple)) commented on by ammac...@gmail.com   -   litchfield4: i modified your TagSelectField to allow for filtered choices. if 'choices' is passed as a keyword 2 tuple, only a subset of tags are displayed/chosen. however this has a problem: forms in the admin generated from model fields work as expected, but the same syntax in admin forms in admin.py throws an error or is ignored. :(
    litchfield4: i modified your TagSelectField to allow for filtered choices. if 'choices' is passed as a keyword 2 tuple, only a subset of tags are displayed/chosen. however this has a problem: forms in the admin generated from model fields work as expected, but the same syntax in admin forms in admin.py throws an error or is ignored. :(
  • Oct 21, 2009
    issue 28 (TagField doesn't sync the list when you TagField doesn't sy...) commented on by ammac...@gmail.com   -   thanks carl, very helpful. i got caught by this, and couldn't figure out why added/deleted tags were not visible/still returned in queries.
    thanks carl, very helpful. i got caught by this, and couldn't figure out why added/deleted tags were not visible/still returned in queries.
  • Oct 21, 2009
    issue 83 (Proposed change: add slug to the tags) commented on by mikkelhoegh   -   Any chance of this getting accepted? I really need this functionality, and I'd rather not like to maintain my own fork :)
    Any chance of this getting accepted? I really need this functionality, and I'd rather not like to maintain my own fork :)
  • Oct 19, 2009
    issue 44 (TagManager.usage_for_model returns list instead of queryset) commented on by kyle.fox   -   Any updates on this issue? I'm wondering why `usage_for_model` returns a list in the first place, rather than a queryset...
    Any updates on this issue? I'm wondering why `usage_for_model` returns a list in the first place, rather than a queryset...
  • Oct 15, 2009
    issue 189 (TagSelectField (using FilteredSelectMultiple)) commented on by ter...@califex.com   -   I agree. We don't expect to allow user tagging on our site (not a blog), but entries tagged by us would be very useful. And FilterSelectMultiple is the proper interface for that.
    I agree. We don't expect to allow user tagging on our site (not a blog), but entries tagged by us would be very useful. And FilterSelectMultiple is the proper interface for that.
  • Oct 14, 2009
    issue 189 (TagSelectField (using FilteredSelectMultiple)) commented on by ammac...@gmail.com   -   very cool feature, should be included
    very cool feature, should be included
  • Oct 14, 2009
    issue 95 (TagField and tagging.register) commented on by ammac...@gmail.com   -   thanks, this fixed the error: IntegrityError: tagging_taggeditem.object_id may not be NULL
    thanks, this fixed the error: IntegrityError: tagging_taggeditem.object_id may not be NULL
 
Hosted by Google Code