Package documentation¶
-
class
meta.models.
ModelMeta
[source]¶ Bases:
object
Meta information mixin.
Retrieve the author object. This is meant to be overridden in the model to return the actual author instance (e.g.: the user object).
Sample method to return the author google plus URL
Sample method to return the author full name
Sample method to return the author twitter account
Sample method to return the author facebook URL
-
class
meta.views.
Meta
(**kwargs)[source]¶ Bases:
object
Helper for building context meta object
-
image
¶
-
keywords
¶
-
request
= None¶
-
url
¶
-
-
class
meta.views.
MetadataMixin
(**kwargs)[source]¶ Bases:
object
Django CBV mixin to prepare metadata for the view context
-
context_meta_name
= u'meta'¶
-
custom_namespace
= None¶
-
description
= None¶
-
extra_custom_props
= None¶
-
extra_props
= None¶
-
facebook_app_id
= None¶
-
gplus_publisher
= None¶
-
gplus_title
= None¶
-
gplus_type
= None¶
-
image
= None¶
-
keywords
= []¶
-
locale
= None¶
-
object_type
= None¶
-
og_title
= None¶
-
site_name
= None¶
-
title
= None¶
-
twitter_card
= None¶
-
twitter_creator
= None¶
-
twitter_site
= None¶
-
twitter_title
= None¶
-
url
= None¶
-
use_og
= False¶
-
use_sites
= False¶
-
use_title_tag
= False¶
-
Generates a custom meta tag:
<meta {attr}=”{name}” content=”{content}”>
Parameters: - attr – meta attribute name
- name – meta name
- content – content value
Generates the markup for a list of custom meta tags
Each tuple is passed to :py:func:custom_meta to generate the markup
Parameters: extra_custom_props – list of tuple of additional meta tags
Generic Facebook property
Parameters: - name – property name (without ‘fb:’ namespace)
- value – property value
Generic property setter that allows to create custom namespaced meta e.g.: fb:profile_id.
This is meant to be used as attribute to html / body or other tags to define schema.org type
Parameters: value – declared scope
Generic Google+ property
Parameters: - name – property name
- value – property value
Alias for googleplus_html_scope
Parameters: value – declared scope
Generates a meta tag according to the following markup:
<meta name=”{name}” content=”{content}”>
Parameters: - name – meta name
- content – content value
Generates the markup for a list of meta tags
Each key,value paur is passed to :py:func:meta to generate the markup
Parameters: extra_props – dictionary of additional meta tags
Renders in a single meta a list of values (e.g.: keywords list)
Parameters: - name – meta name
- lst – values
Include OG namespaces. To be used in the <head> tag.
Include google+ attributes. To be used in the <html> or <body> tag.
Generic OpenGraph property
Parameters: - name – property name (without ‘og:’ namespace)
- value – property value
Title tag
Parameters: value – title value
Generic Twitter property
Parameters: - name – property name (without ‘twitter:’ namespace)
- value – property value