dlamotte / django-tagging

Automatically exported from code.google.com/p/django-tagging
Other
0 stars 0 forks source link

How to get tags fields without parse and hit the database getting tags instances #231

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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?

Original issue reported on code.google.com by marioces...@gmail.com on 13 Dec 2009 at 7:26

GoogleCodeExporter commented 8 years ago
Duplicate of #235 — using that ticket as it has a patch.

Original comment by bros...@gmail.com on 5 Jan 2010 at 6:18