Skip to main content

largeblue.tag provides an uber simple tagging adapter. If included:

<include package="largeblue.tag" />

It will adapt any object configured to implement largeblue.tag.interfaces.ITaggable, e.g:

<class class=".objects.MyContentObject">
  <implements interface="largeblue.tag.interfaces.ITaggable" />
  ...
</class>

This will hang a @@tags.html view of each instance of the adapted content object, which provides a single textline input to enter tags (seperated by a space). Thus if you enter ‘foo bar dolores’ into the text input and submit, you’ll find:

>>> context = my_obj
>>> from largeblue.tag.interfaces import ITag
>>> t = ITag(context)
>>> t.tags
['foo', 'bar', 'dolores']
>>> t.tagstring
u'foo bar dolores'

You can add, remove and update:

>>> t.add_tag('elephants')
>>> t.tags
['foo', 'bar', 'dolores', 'elephants']
>>> t.remove_tag('dolores')
>>> t.tags
['foo', 'bar', 'elephants']
>>> t.update_tags(['coffee', 'milk'])
>>> t.tags
['coffee', 'milk']

That’s it.

Metadata

Release files for largeblue.tag 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for largeblue.tag 0.1.1
File Size Uploaded
largeblue.tag-0.1.1.tar.gz 7.9 kB Details

Release files / largeblue.tag-0.1.1.tar.gz

Download URL largeblue.tag-0.1.1.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
65c7003020cb408f4d2d30b88b0bed966a934cbbc1fed994c02543a7947475e4
BLAKE2b-256 checksum
How to use checksums
aa6b70adc8be9882a171674e383de44d91d287913df33be299cc2921a2339cd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page