Skip to main content

TurboGears2 pluggable application for comments to entities with facebook sharing

Project description

About tgcomments

tgcomments is a Pluggable Comments application for TurboGears2. Comments can be added to any webpage by using the comments_for partial.

TGComments supports Facebook for avatar if the user logged using tgapp-fbauth or if the User model provides a similar interface. Otherwise will fallback to Gravatar.

Installing

tgcomments can be installed both from pypi or from bitbucket:

pip install tgapp-tgcomments

should just work for most of the users

Plugging tgcomments

In your application config/app_cfg.py import plug:

from tgext.pluggable import plug

Then at the end of the file call plug with tgcomments:

plug(base_config, 'tgcomments')

To expose comments support for an entity, just call the comments_for(entity)  partial for that entity inside your templates as explained in the Exposed Partials section.

Exposed Partials

tgcomments exposes a bunch of partials which can be used to render pieces of the blogging system anywhere in your application:

  • tgcomments.partials:comments_for(entity)

    Given any SQLAlchemy entity which is available inside your application model module it will display a list of comments for that entity with a box to add a new comment.

Provided Options

tgcomments supports a bunch of options that can be passed to the plug call to change its behavior:

  • notify_facebook (default:True) automatically notify on facebook comments that

    the user wrote if he has logged using Facebook

  • allow_anonymous (default:True) allow anonymous users to comment

Exposed Templates

The templates used by registration and that can be replaced with tgext.pluggable.replace_template are:

  • tgcomments.templates.comments_partial

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

tgapp-tgcomments-0.0.8.tar.gz (7.5 kB view details)

Uploaded Source

File details

Details for the file tgapp-tgcomments-0.0.8.tar.gz.

File metadata

File hashes

Hashes for tgapp-tgcomments-0.0.8.tar.gz
Algorithm Hash digest
SHA256 668b9f8bfed1f6e66de4e88401090baa9b291752e8f3738bfafec88efb8b9c75
MD5 653cf12f676afff447a4ca8ad5c2a14d
BLAKE2b-256 61af642e59fd229fae3cd52b55d303b05b4e84780f5f01156be4988b60e287f3

See more details on using hashes here.

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