Use this app to tag objects like you tag your friends on facebook, but using any objects as the tagger and the tagged. Think of a `User` tagging a `Friend` in a `Photo` all of them being different models.
Project description
Welcome to the documentation for django-o2o_tagging! Use this app to tag objects like you tag your friends on facebook, but using any objects as the tagger, the tagged and the tagged in. Think of a User tagging a Friend in a Photo all of them being different models.
Quick start
Install using pip:
pip install django-o2o_tagging
Add o2o_tagging to your INSTALLED_APPS setting like this:
INSTALLED_APPS = ( ... 'o2o_tagging', )
Usage
Models
Tag your objects:
... tag = O2OTag.objects.tag(tagger, tagged, tagged_in)
Get for tagged in objects:
... tags = O2OTag.objects.for_tagged_in(tagged_in)
Get for tagger objects:
... tags = O2OTag.objects.for_tagger(tagger)
Get for tagged objects:
... tags = O2OTag.objects.for_tagged(tagged)
You can then filter:
... tags.for_tagger(tagger).for_tagged(tagged)
URLs
You can add this views to your urls:
... ('^tagging/$', include('o2o_tagging')),
Views
o2o_taggin provides two views:
TagCreateView TagsCreateView
Running the Tests
You can run the tests with via:
python setup.py test
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-o2o_tagging-0.2.1.tar.gz
.
File metadata
- Download URL: django-o2o_tagging-0.2.1.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2941e6fdb7970198c3cd7b48c75bc8f773a9bd08fa5bba2195d9f9cb17168376 |
|
MD5 | 8b591b903839323414c612876c864c03 |
|
BLAKE2b-256 | 8b14ae8f0d0b25b4c7424eb3f7c290484100442889ec42b219bca0a93c986929 |
File details
Details for the file django-o2o_tagging-0.2.1.linux-i686.tar.gz
.
File metadata
- Download URL: django-o2o_tagging-0.2.1.linux-i686.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15ab05fe16670e7692cf1a8388433d32b802a4e0a26aabcc617971b85d368bed |
|
MD5 | 7dbbfc35f89e4a00df3182e23ccc9b07 |
|
BLAKE2b-256 | 3acaf97e5b9212ecc11d77a8d1ee187babb39fbeda9927227860b667246308af |