Return, as html or as a template variable, a Django form to add or remove
a bookmark for the given instance and key, and for current user.

Usage:

{%bookmark_formfor*instance*[using*key*][as*varname*]%}

The key can be given hardcoded (surrounded by quotes)
or as a template variable.
Note that if the key is not given, it will be generated using
the handler’s get_key method, that, if not overridden, returns
the default key.

If the varname is used then it will be a context variable
containing the form.
Otherwise the form is rendered using the first template found in the order
that follows:

Use this just like the bookmark_form templatetag.
The only difference here is that it always render a form template
(so you can’t use the as varname part), and the form template
is rendered using an AJAX request.

This is useful for example when you want to show add/remove
bookamrk interaction for authenticated users even in a cached template.

Return as a template variable a bookmark object for the given instance
and key, and for current user.

Usage:

{%bookmarkfor*instance*[using*key*]as*varname*%}

The key can be given hardcoded (surrounded by quotes)
or as a template variable.
Note that if the key is not given, it will be generated using
the handler’s get_key method, that, if not overridden, returns
the default key.

Return as a template variable all bookmarks, with possibility to filter
them by user, or to take only bookmarks of a particular model and
using a specified key. It is also possible to reverse the order
of bookmarks (by default they are ordered by date).

Usage:

{%bookmarks[of*model*][by*user*][using*key*][reversed]as*varname*%}

Examples:

{# get all bookmarks saved by myuser #}{%bookmarksbymyuserasmyuser_bookmarks%}{# get all bookmarks for myinstance using mykey #}{%bookmarksofmyinstanceusing*mykey*asbookmarks%}{# getting all bookmarks for model 'myapp.mymodel' in reverse order #}{%bookmarksof'myapp.mymodel'reversedasvarname%}

Note that the args model can be:

a model name as string (e.g.: ‘myapp.mymodel’)

a model instance

The key can be given hardcoded (surrounded by quotes)
or as a template variable.