Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Django package for simplicity embed open graph (og:) layout in templates for different objects

Project description


Django package for simplicity embed open graph (og:) layout in templates for different objects


If you use many different objects and you need embed open-graph (e.g. fb: for facebook) layout for all pages in site.


This package help you! 

█▄▄ ███ █▄▄ █▄█▄█ █▄█ ▀█▀


You can install from PyPI:

$ pip install django-simple-open-graph==0.1

And add simple_open_graph in your INSTALLED_APPS.

Example Of Usage

Add og namespace in your base template:

<html prefix="og:">

or for facebook:

<html xmlns:fb="" lang="en">

And add block in base template:

    {% block extra_head %}{% endblock %}

Aaand! You can use this package in different templates:

{% load simple_open_graph %}

{% block extra_head %}
    {% thumbnail object.user.image 150x150 as uimage %} <!-- as example for use easy_thumbnails package -->
    {% opengraph_meta "url=object.get_absolute_url, title=object.title, type='website', image=uimage.url" %}
{% endblock %}

This tag converted in meta html properties:

<meta property="og:url" content="/users/1">
<meta property="og:image" content="/media/thumbnails/users/person1.jpg.150x150_q85.jpg">
<meta property="og:type" content="website">
<meta property="og:title" content="Profile: user #1">



0.3 (2012-09-28)

  • fix absolute urls

0.2 (2012-09-19)

  • fix mistake in readme (installation)
  • fix VariableDoesNotExist error (for resolve not existing keys)

0.1 (2012-09-12)

Initial release.

Project details

Download files

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

Files for django-simple-open-graph, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size django-simple-open-graph-0.3.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page