
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
HTML Meta tags OpenGraph for Django. The project uses the project DjangoCMS Meta OG project.
pip install django-meta-og
Add into settings.py:
from django.utils.translation import gettext_lazy as _
INSTALLED_APPS = [
"django_meta_og",
...
]
TEMPLATES = [
{"OPTIONS": {
"context_processors": [
"django_meta_og.context_processors.meta",
...
]
}
}
]
Add into the templates:
{% load django_meta_og %}
{% django_meta_og_prefix as og_prefix %}
<head{% if og_prefix %} prefix="{{ og_prefix }}"{% endif %}>
{% include "django_meta_og/header_meta.html" %}
The result can be:
<head prefix="og: https://ogp.me/ns#">
<meta property="og:type" content="website" />
<meta property="og:title" content="The Title" />
<meta property="og:url" content="https%3A%2F%2Fexample.com%2F" />
...
</head>
Some Meta tags may already be defined in the template. Their prefix is included in the prefix list via the definition in settings:
# Example of tag definition already used in the templates.
META_OG_PREFIX_IN_TEMLATES = (
("og", "https://ogp.me/ns#"),
("article", "https://ogp.me/ns/article#"),
)
Special values can be replaced with some content. A list of these values is provided in the form in the item administration.
# Dynamic content - Key replacement for specific content.
PAGE_META_OG_DYNAMIC_CONTENT = {
"ogc:page_url": (
"django_meta_og.dynamic_content.get_page_url",
_("Set the page absolute URL (together with parameters)."),
),
}
You can enter any Meta values. These are entered in three levels - Namespace, Property and Content.
BSD License
FAQs
Django HTML Meta tags for OpenGraph.
We found that django-meta-og demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.