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
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)
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 Distributions
File details
Details for the file django-o2o_tagging-0.1.0.tar.gz
.
File metadata
- Download URL: django-o2o_tagging-0.1.0.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2ec1b37d925e1c3fd5f8ad5510c4fac53de7abfff5338d47bc28d9544dfcabf |
|
MD5 | afe355a28a47c04e69e18246e8e952f1 |
|
BLAKE2b-256 | 0a2b8a152e7e46ca9fe02c8cae6732e30bb80dbd3ac8bf6d55e2e9560ad2416a |
File details
Details for the file django_o2o_tagging-0.1.0-py2.7.egg
.
File metadata
- Download URL: django_o2o_tagging-0.1.0-py2.7.egg
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88c14ed3170530c03c3628b87286469bdc907549b16ba40a8d9de352cc3aaeb0 |
|
MD5 | 9b407cfeb20bb2b58e84a298af1b5101 |
|
BLAKE2b-256 | 2c23acee552c08847a7e59083cc1ea556bbaf9f9a873c71aedd513b8062734d0 |
File details
Details for the file django_o2o_tagging-0.1.0-py2.6.egg
.
File metadata
- Download URL: django_o2o_tagging-0.1.0-py2.6.egg
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf3987de5d301c21c5cd7017da191df3e6d6f2f2a9f8b5feff42c6aaf2f09f7e |
|
MD5 | 5ab20bcc76ed09aab21e7cc1242f9e8b |
|
BLAKE2b-256 | ab78bef2d343a41ec48ad1e8db9025510e987bc13d7f3be920f9391bf67a389a |