Skip to main content

Django HTML Meta tags for OpenGraph.

Project description

Django Meta OG

HTML Meta tags OpenGraph for Django. The project uses the project DjangoCMS Meta OG project.

Install

pip install django-meta-og

Add into settings.py:

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" />
    ...
</head>

License

BSD License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_meta_og-1.0.2.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_meta_og-1.0.2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file django_meta_og-1.0.2.tar.gz.

File metadata

  • Download URL: django_meta_og-1.0.2.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for django_meta_og-1.0.2.tar.gz
Algorithm Hash digest
SHA256 342fae87e01550a5fa5801d8edd04b1739756666cd1ffb9ea15eeb8777e91209
MD5 0bf30538dd9c1082078c88030ba8da53
BLAKE2b-256 a65a1ed7e9608a8215126f6fb314658f735cbd1b0e3c093b1145de227c3c50b4

See more details on using hashes here.

File details

Details for the file django_meta_og-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: django_meta_og-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for django_meta_og-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dc81567eca3390a53180f36971faa44a34e252e065c54652a9d94096fd830229
MD5 1343eb57ce835c4e8cd0672ec8202db6
BLAKE2b-256 cfb76bd2a77592119e8818ce80e22188a7cc283e27a9361271a54b2ecd8694a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page