tag component for the CubicWeb framework
Project description
Summary
The tag cube allows to add labels to an entity as a simple yet powerful way to classify your content. Tags can be used to refine a search using facets.
It is a CubicWeb component. CubicWeb is a semantic web application framework, see http://www.cubicweb.org
Install
Auto-install from sources is preferred with pip/Distribute:
pip install cubicweb-tag
If you have troubles, use easy_install/setuptools and eggs:
easy_install cubicweb-tag
You can install the package manually from the uncompressed tarball:
python setup.py install # auto-install dependencies
If you don’t want the dependencies to be installed automatically, you can force the setup to use the standard library distutils:
NO_SETUPTOOLS=1 python setup.py install
More details at http://www.cubicweb.org/doc/en/admin/setup
Usage
To allow tags on an entity type, you must allow the tags relation between Tag and your entity type(s).
For instance to activate the tag functionality on Person, Company and Division entity type, one should add to his schema:
from yams.buildobjs import RelationDefinition
class tags(RelationDefinition):
subject = 'Tag'
object = ('Person', 'Company', 'Division')
You should then see the tags box appearing on the primary view for entities of those type. The`TagsBox` display tags applied to the entity but also provides an easily way to add / remove tags, if you’ve the permission to do so.
More views
The SimilarEntitiesBox shows some entities which share the most tags together
The TagsCloudView, a classical, displaying a set of tags appearing more or less big according to the number of tagged entities. It’s used by the TagsCouldBox, which is not visible by default (user can activate it using their preferences) but that you can activate by default using the code snippet below:
from cubicweb_tag.views import TagsCloudBox # make the tags cloud box visible by default TagsCloudBox.visible = True
The primary view for tags provides a tags merging interface to site administrators, very useful to manage tags on a site where people tend to express the same thing with different words, or spelling.
Documentation
Look in the doc/ subdirectory or read http://www.cubicweb.org/doc/en/
Project details
Release history Release notifications | RSS feed
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 cubicweb-tag-3.0.0.tar.gz
.
File metadata
- Download URL: cubicweb-tag-3.0.0.tar.gz
- Upload date:
- Size: 46.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6698194330390c3037de4645bfcbe51d12411b3cb3bcab37ade48fd257ad7c6 |
|
MD5 | fabfa454d40ea06c7d12974a62e9a75c |
|
BLAKE2b-256 | cd5235f42330336bd4e20f9f4d53e287ab48ce1b9fecce7a3c5da3f062ed4961 |
File details
Details for the file cubicweb_tag-3.0.0-py3-none-any.whl
.
File metadata
- Download URL: cubicweb_tag-3.0.0-py3-none-any.whl
- Upload date:
- Size: 45.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d29ac01f0c932fe078b8200dc7f074a358359d653b3cb31145f2e803d2ed6122 |
|
MD5 | 9d4f99e1c5aa0c3883b9408e3c6ccb5f |
|
BLAKE2b-256 | c51c5836c0510e3ea49c7425b51c691275eccffdeee1e8f3de13eb620919dfee |