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
Authored by Basil Shubin, and some great contributors.
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>
<head {% meta_namespaces %}>
{% include "meta/meta.html" %}
</head>
<body>...</body>
</html>
Usage
# models.py
from django.utils import six
from wagtail.core.models import Page, PageBase
from wagtailmetadata.models import MetadataPageMixin
# ensure MetadataPageMixin class goes before Page class
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.5.tar.gz
.
File metadata
- Download URL: wagtail-metadata-mixin-0.0.5.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc5cad209b7d2c021cc1e6d4ab5ba44743f8c436a43cd1bbf363e0af02bce239 |
|
MD5 | a326cacaaf044c7bd78622817f00ee22 |
|
BLAKE2b-256 | de667d511c3154d8f03596c00e5576831f2b8756cd65ca264d14b18ecb71e94d |
File details
Details for the file wagtail_metadata_mixin-0.0.5-py2.py3-none-any.whl
.
File metadata
- Download URL: wagtail_metadata_mixin-0.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9092e1f81dc8045b27acdf20bcae63757992d0820f207ca67c3758679f63798 |
|
MD5 | d0a0cf60aac75f3a59d7954ee5ba3ca0 |
|
BLAKE2b-256 | 9b2451e2d985c17dd12064bebe178dd3dffe30440d9b79079ea356407c39e728 |