On Wed, May 28, 2008 at 1:21 AM, mwebs <[EMAIL PROTECTED]> wrote: > > Hi Alex, > > I was trying to use this, but I got an no-attribute-tag-field-error... > I also tried tagging.TagField() and models.TagField() > > Any idea?
Try this, Toni. At the top of my models file, I have this import: from tagging.fields import TagField where "tagging" is the directory where I made a SVN checkout of the django-tagging app. Make sure that's in your python-path somewhere. This may be where your problem lies. The code for the tagging app has to live somewhere so that your import calls can find it. In my model definition, I use TagField like: tags = TagField(max_length=255) When I retrieve that model, I can then get 'tags' just like I would any attribute of the model. It will simply be a string. If you want to turn them into links (like to a page to show all models with that tag), the django-tagging app has methods for that as well. /alex > On 28 Mai, 08:05, "Alex Ezell" <[EMAIL PROTECTED]> wrote: >> On Wed, May 28, 2008 at 1:00 AM, mwebs <[EMAIL PROTECTED]> wrote: >> >> > My problem is that a.tags returns a list with tag objects.But what I >> > need is a String of concatenated String like >> >> > 'cool, funky, fresh, exiting' >> >> > Has anybody an idea how to do this without iterating over the list of >> > tagobjects and concatenating them by hand? >> >> Toni, >> Have you looked at using the TagField in the model which you are >> tagging. This makes it really easy to get these values as an attribute >> of the model which you are tagging. >> >> /alex > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---