Getting Started¶
If you have not installed SuperTagging yet, go to the Installation page.
Create basic settings¶
In your settings.py
file:
SUPERTAGGING_SETTINGS = {
'ENABLED': True,
'DEBUG': True,
}
Setting up OpenCalais API¶
Go to OpenCalais‘s website and register for
an api key, and in your settings.py
file, alter SUPERTAGGING_SETTINGS
:
SUPERTAGGING_SETTINGS = {
'ENABLED': True,
'DEBUG': True,
'OPEN_CALAIS': {
'API_KEY': 'YOUR_API_KEY',
}
}
Setting up models to be tagged¶
You will need to decide which models and which fields in those models you will want SuperTagging to mark for tagging:
SUPERTAGGING_SETTINGS = {
'ENABLED': True,
'DEBUG': True,
'OPEN_CALAIS': {
'API_KEY': 'YOUR_API_KEY',
},
'WATCHED_FIELDS': {
'stories.story': {
'fields':[
{'name': 'body'},
],
},
},
}
The code above tells SuperTagging to tag the body field of model stories.story. We can specify any number of fields and models as well.
SUPERTAGGING_SETTINGS = {
'ENABLED': True,
'DEBUG': True,
'OPEN_CALAIS': {
'API_KEY': 'YOUR_API_KEY',
},
'WATCHED_FIELDS': {
'stories.story': {
'fields':[
{'name': 'body'},
{'name': 'tease'},
{'name': 'kicker'},
],
},
'media.image': {
'fields':[
{'name': 'caption'},
{'name': 'description'},
],
}
},
}
View WATCHED_FIELDS for more information.
Set up automatic processing¶
Finally, add:
SUPERTAGGING_SETTINGS = {
'ENABLED': True,
'DEBUG': True,
'OPEN_CALAIS': {
'API_KEY': 'YOUR_API_KEY',
},
'WATCHED_FIELDS': {
'stories.story': {
'fields':[
{'name': 'body'},
],
},
},
'AUTO_PROCESS': True,
}
Post save and post delete signals will be connected to the models specified in WATCHED_FIELDS. Visit Settings to view more details about the SuperTagging settings
View the complete list of Settings
Conclusion¶
That is all that is needed to get SuperTagging to start tagging your data. Upon saving a instance of one of the models specified in SUPERTAGGING_MODULES, the field(s) data will be sent to OpenCalais for processing.
Next step: View the Real World Example section of how The Washington Times has SuperTagging setup.