django-supertagging
Welcome Guest, login or register
BDFL('s): Hose-A S-Warez,
Contributors:

Repository URL: /projects/public/django-supertagging/

MainPage

Quick start:

There is 2 ways you can use supertagging, one is completely automated, it will setup post save and post delete signals. The other is to use supertagging similar to django-tagging.

-Dependencies python-calais

First steps are:

-Sign up free on OpenCalais.com to get your api_key

For the automated way:

-Just setup which modules and fields you would like supertagging to process, as shown below.

SUPERTAGGING_AUTO_PROCESS = True
SUPERTAGGING_CALAIS_API_KEY = 'your api key'
SUPERTAGGING_MODULES = {
'stories.story': {'fields':({'name': 'content', 'content_type':'TEXT/RAW'},
                            {'name': 'tease',},)}
}
 

Supertagging will setup post_save and post_delete to manage the data.

After saving an object, you can use the template tags (same as django-tagging) to retrieve the tags...

{% supertags_for_model stories.Story as story_tags %}
 

For the manual way: -Turn auto processing off (it's off by default), along with the other settings above.

...
SUPERTAGGING_AUTO_PROCESS = False
...

  * Add the field to your model

...
supertags = SuperTagField()
...

  -You can then save your Model without filling in any tags, and tags should show up if OpenCalais returned tags. -This works just like django-tagging, you can add, remove tags as needed (Note: if you delete all your tags, anything that OpenCalais returns will be shown)

Differences from django-tagging:

  • Tags are comma delimited when shown in the field. This is because OpenCalais will return tags that are multiple words.
  • Tags are also lower case.

TODO:

  • Docs
  • Tests