This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A Django application based on the python-instagram API. It allows to use some template tags to display content from Instagram.

Installation

Install django from your favourite linux packaging system if you can find it. Or you can use pip for installing python packages that are not listed in the package system of your distribution:

Use pip to install Django Instagram:

pip install django-instagram

Pip should take care of the package dependencies for Django Instagram.

Configuration

Add the application to INSTALLED_APPS:

INSTALLED_APPS = ('...',
                  'django_instagram',)

Rebuild your application database, this command depends on which version of Django you are using.

In Django 1.9 (recommended):

python manage.py makemigrations django_instagram

Them migrate the db:

python manage.py migrate

Go to the Django Instagram administration panel and click on “Get Access Token” button to receive your access token from Instagram. Then copy and paste it to the configuration field and save.

Remember to be logged in with the Instagram account that you want to get the access token for.

Usage

After you are done with this, you can use the tags who need user access to Instagram, this tag will give you a context variable called: ‘recent_media’, you can display the data contained in the recent_media list like this:

{% load instagram_client %}

{% instagram_recent_media count=6 %}

<div id="django_recent_media_wall">
  {% for media in recent_media %}
    <div class="django_instagram_media_wall_item">
      <a href="{{ media.link }}" target="_blank" title="{{ media.caption.text }}">
        <img src="{{ media|thumbnail }}"/>
        <span>{{ media.caption.text }}</span>
      </a>
    </div>
  {% endfor %}
</div>

To get Instagram popular media you don’t need an access token instead, so you can ignore the last configuration step above.

{% load instagram_client %}

{% instagram_popular_media count=10 %}
<div id="django_instagram_media_wall">
  {% for media in popular_media %}
    <div class="django_instagram_media_wall_item">
      <a href="{{ media.link }}" target="_blank" title="{{ media.caption.text }}">
        <img src="{{ media|standard_size }}"/>
        <span>{{ media.caption.text }}</span>
      </a>
    </div>
  {% endfor %}
</div>

This tag will give you a context variable called: ‘popular_media’

There are also two inclusion tags that includes an example of how to parse data from Instagram, you can also use them like this:

{% load instagram_client %}

<h1>Instagram media wall</h1>
{% instagram_recent_media_wall %}

<h1>Instagram sliding box</h1>
{% instagram_recent_media_box %}

Filters

As you may have noticed some filters can be used for sizing the pictures, here is the list of the usable fitlers:

For standard size:

{% for media in recent_media %}
...
<img src="{{ media|standard_size }}"/>
...
{% endfor %}

For low resolution images:

{% for media in recent_media %}
...
<img src="{{ media|low_resolution }}"/>
...
{% endfor %}

For thumbnail size:

{% for media in recent_media %}
...
<img src="{{ media|thumbnail }}"/>
...
{% endfor %}

Releases

  • 0.1.1 Numerous bug fixes, better documentation.
  • 0.1.0 Work in progress version.
Release History

Release History

0.2.0a1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-instagram-0.1.1.tar.gz (34.2 kB) Copy SHA256 Checksum SHA256 Source Jan 5, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting