Stockphoto is a photogallery application written using the Django web application framework. It is designed to integrate into existing dynamic websites built with Django, to be easy to install, and to have few prerequisites, both in terms of third-party modules and in terms of expectations about site layout. It attempts to make maximum use of built-in Django facilities (authentication, admin pages, generic views) as much as possible in order to provide the simplest possible photogallery application while providing a reasonably full set of features.
There are quite probably better photogallery applications out there, but the best one I looked at also had a lot of requirements and was complex to install. Stockphoto has limited ambitions: it is not supposed to be a Flickr replacement, but just an easy way to add a photogallery section to a website.
This document refers to version 0.2.1 of stockphoto.
The patch listed above is probably necessary if you intend to batch upload large photographs (in zip archives) to your gallery, rather than upload them one at a time.
This package uses setuptools. You can install it using python ./setup.py install, for example. Add "stockphoto" to your INSTALLED_APPS variable in settings.py.
Stockphoto makes use of Django's admin and auth applications, so django.contrib.admin and django.contrib.auth must be in your installed apps. You should probably have the admin interface working before trying to install stockphoto.
There are a number of optional settings you can add to settings.py, as well. These are:
You must have MEDIA_ROOT and MEDIA_URL set to sensible values for the gallery to work. Once your settings.py is set up, you can run
Add this line to your urls.py: (r'^stockphoto/', include('stockphoto.urls')),
You will probably want to install your own templates, but the included ones should get you up and running. The templates all inherit from the template stockphoto/base.html, which does nothing but inherit from site_base.html. If your site's main template is not called site_base.html, you will need to change this. Also, the default templates expect your site's main template to contain the blocks "title" and "content" for overriding.
You can install new galleries and single photos through the admin interface. The sample templates included provide links to the admin interface for logged in users, and access to the batch upload and export features.
Remote import
Images should be importable from remote zipfiles (by URL), allowing you to easily import photos from online film processing sites.
Tagging
Currently, photos are organized only by gallery. In the future, it will be possible to search by tags in order to organize photos in other ways.
Searching
Support for searching all text fields associated with photos is planned.
Manual re-ordering
It might make sense for there to be a way to manually re-order photographs, especially if they were batch-imported.
Non-browseable galleries
You might wish to use stockphoto to manage images for your blog app, for example, but not wish to have the images in a browseable gallery.
Automatic rotation of images based on EXIF tags
Better reverse url resolution
Special thanks to Guillermo Fernandez Castellanos, William McVey, Amit Ramon, and Evgeniy Tarassov for contributing patches to stockphoto's development, and to the many others who submitted bug reports on 0.2, and to anyone I may have forgotten.
Contact jmcbray-django@carcosa.net for more information.