o2o_tagging
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
Templates
There are two templatetags available
for_tagged_in:
{% for_tagged_in object as tags %}for_tagged_in_nodups:
{% for_tagged_in_nodups object as tags %}
Apply distinct on tagged_object_id in order to get only one tagged user.
Running the Tests
You can run the tests with via:
python setup.py test
Metadata
Release files for django-o2o_tagging 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-o2o_tagging-0.2.3.tar.gz | 20.2 kB | Without provenance | Details |
Release files / django-o2o_tagging-0.2.3.tar.gz
| Download URL | django-o2o_tagging-0.2.3.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a900770e2224fd8d48ecdfe50450ae255a2daa8dd2ac015f8d9770b65bf87f5
|
|
BLAKE2b-256 checksum How to use checksums |
5ac0632820c1e0d392280cda84bd8357ac35137a9732fbf0ae93af89c6650fd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-o2o_tagging 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.