Skip to main content

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

Build Status

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

  1. Install using pip:

    pip install django-o2o_tagging
  2. 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

django-o2o_tagging-0.1.0.tar.gz (16.7 kB view hashes)

Uploaded Source

Built Distributions

django_o2o_tagging-0.1.0-py2.7.egg (16.1 kB view hashes)

Uploaded Source

django_o2o_tagging-0.1.0-py2.6.egg (16.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page