Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    django-simple-open-graph 0.3

    Download button

    No screenshots available
    Downloads: 96  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Denis Veselov | More programs
    ISC License / FREE
    September 24th, 2012, 19:17 GMT [view history]
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django-simple-open-graph description

    Embed open graph layout in templates

    django-simple-open-graph is a Django app that's best described for its simplicity to embed an open graph layout in templates for various objects.

    Installation

    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: http://ogp.me/ns#" >

    or for facebook:

    < html xmlns:fb="http://ogp.me/ns/fb#" lang="en" >

    And add block in base template:

    < head >
     ...
     {% block extra_head %}{% endblock %}
     ...
    < /head >


    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" >


    Excellent!


    Product's homepage

    Requirements:

    · Python
    · Django

    What's New in This Release: [ read full changelog ]

    · Fix absolute urls

      


    TAGS:

    graph layout | embed graphs | Django graph | Django | graph | layout

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM