OpenGraph, Twitter Card and Google+ snippet tags for Wagtail CMS pages
Project description
wagtail-metadata-mixin
OpenGraph, Twitter Card and Google+ snippet tags for Wagtail CMS pages
Requirements
You must have django-meta installed and configured, see the django-meta documentation for details and setup instructions.
Installation
First install the module, preferably in a virtual environment. It can be installed from PyPI:
pip install wagtail-metadata-mixin
Setup
Make sure the project is configured for django-meta.
Then add the following settings:
INSTALLED_APPS += (
'wagtailmetadata',
)
and just include meta/meta.html template in your templates
{% load meta %}
<html {% meta_namespaces_gplus %}>
<head {% meta_namespaces %}>
{% include "meta/meta.html" %}
</head>
<body>...</body>
</html>
Usage
# models.py
from django.utils import six
from wagtail.wagtailcore.models import Page, PageBase
from wagtailmetadata.models import MetadataPageMixin
class CustomPage(six.with_metaclass(PageBase, MetadataPageMixin, Page)):
promote_panels = Page.promote_panels + MetadataPageMixin.panels
Please see example application. This application is used to manually test the functionalities of this package. This also serves as good example…
You need Django 1.8.1 or above to run that. It might run on older versions but that is not tested.
Contributing
If you like this module, forked it, or would like to improve it, please let us know! Pull requests are welcome too. :-)
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 wagtail-metadata-mixin-0.0.3.tar.gz
.
File metadata
- Download URL: wagtail-metadata-mixin-0.0.3.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1a1e04a84ca2fd10cd2607a1079ed2a1ba113253e5257774f5d59fb45e260b1 |
|
MD5 | 1576bc0a7d19f966424c19f6f4e5b761 |
|
BLAKE2b-256 | b27e88c42d08d31296fde716c3fcf40358845c30ce7f77fce2f587bd79cef041 |
Provenance
File details
Details for the file wagtail_metadata_mixin-0.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: wagtail_metadata_mixin-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | adabe2c77319c9b42bcac75890a88b4212a0e54227d36b5f3af37d1c4d3f185b |
|
MD5 | dd7021401242eaf803c87784de103a86 |
|
BLAKE2b-256 | 1ee8986086fe1424594e8cb8c4743b52e91d2430b50b3a04add457342b44e38a |