No project description provided
Project description
Helpers and mixins for making meta and open graph tags less annoying.
Usage
Inherit feincms3_meta.models.MetaMixin
Optional, but recommended: Add a setting for default tags:
META_TAGS = { 'site_name': 'My site', 'title': 'Default title', 'description': ( 'The default description,' ' maybe long.' ), 'image': '/static/app/logo.png', }
If you define fieldsets on a ModelAdmin subclass, you may want to use the helper MetaMixin.admin_fieldset(), or maybe not.
Use the dictionary returned by feincms3_meta.utils.meta_tags either directly (its __str__ method renders as a HTML fragment) or access individual properties using standard dictionary access:
return render(request, ..., { ... 'meta_tags': meta_tags( [object], request=request, ), })
meta_tags also supports overriding or removing individual tags using keyword arguments. Falsy values are discarded, None causes the complete removal of the tag from the dictionary.
The rendering of a meta tags dictionary is also usable standalone with feincms3_meta.utils.format_meta_tags.
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 feincms3-meta-1.4.1.tar.gz
.
File metadata
- Download URL: feincms3-meta-1.4.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f467e2c842965d249b78288b32712b4f570d1f0d9368d4d33b7f410c3f64f947 |
|
MD5 | 93c65b77e11893fde849ad9cdf3d2b92 |
|
BLAKE2b-256 | 67e9174fad2995b883e200015e6cf1ad4b3ad6ce7837cb992f38c5a798b3cf06 |
File details
Details for the file feincms3_meta-1.4.1-py2.py3-none-any.whl
.
File metadata
- Download URL: feincms3_meta-1.4.1-py2.py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | def05c1001f2ef7a2e8af89aa238f02a75789b746f3de8f467474309d04d35ce |
|
MD5 | ad685f9728b53ff3bdbb102b3d0f594b |
|
BLAKE2b-256 | 126162e00e6942770e19f53d0cc39923e3cca6ba3abbb54114b93562ddc70d98 |