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 resuable [Django]( application to display a [Flickr]( badge.

django-badgr uses the [Flickr API]( to [search]( Flickr and return a user's most recent photos. The results are cached and stored in the Django context. The photo pool is then accessible as a template variable.


* [flickrapi]( is used to interface with the Flickr API.


1. Put the `badgr` directory somewhere inside your Python path (like in your Django project folder).
2. Add `` to your `settings.TEMPLATE_CONTEXT_PROCESSORS`.

A good way to do this with overriding all of Django's default context processors is to first import the variable from the global settings and then append to it:

from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS


### Optional

If you want to take advantage of django-badgr's default template, add `badgr` to your `settings.INSTALLED_APPS`.


After installing, the `flickr_badge` variable will be available to all templates. This is a list of dictionaries, each containing all information returned by the Flickr API for each photo. In addition, the URL both to the image itself and to the associated Flickr badge have been prebuilt and are included in the dictionary.

If you have added `badgr` to your `settings.INSTALLED_APPS`, django-badgr's default template will be available for use. This outputs a list of images, each linked to the corresponding Flickr page. To use it, simply include the template in your desired location.

{% include 'badgr/photos.html' %}


django-badgr includes a few settings that you may define in your project's main `settings` file.


The Flickr API key to use. This can be acquired at


The Flickr user ID to use. This is the ugly string on characters, not the pretty name you may have set for your account. If you do not know your user ID, you may find it at


The number of photos to pull. This defaults to 12. Flickr's maximum is 500.


For how long should the photo pool be stored in the cache. This defaults to the [Django cache timeout](, which defaults to 300 seconds (5 minutes). Flickr requests that an application not make more than 3600 requests per API key per hour.


The size of the image you wish to build the URL for. The default is medium (500 on the longest side). Available options are:

* 's': small square 75x75
* 'q': large square 150x150
* 't': thumbnail, 100 on longest side
* 'm': small, 240 on longest side
* 'n': small, 320 on longest side
* '' : medium, 500 on the longest side
* 'z': medium, 640 on longest side
* 'c': medium, 800 on longest side
* 'b': large 1024 on longest side
Release History

Release History


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_badgr-1.0-py2.7.egg (6.2 kB) Copy SHA256 Checksum SHA256 2.7 Egg Sep 15, 2012
django-badgr-1.0.tar.gz (4.8 kB) Copy SHA256 Checksum SHA256 Source Sep 15, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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