Anonymous avatar Anonymous committed 2e8a50d

Bump version. Updated docs for use with new django-generic-images version.

Comments (0)

Files changed (16)

Add a comment to this file

docs/_build/doctrees/environment.pickle

Binary file modified.

Add a comment to this file

docs/_build/doctrees/index.doctree

Binary file modified.

docs/_build/html/.buildinfo

 # Sphinx build info version 1
 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 6de2feec01bd372bf36422ce8ffc96fb
+config: e586ac91385ef7712f57548ccf4afde3
 tags: fbb0d17656682115ca4d033fb2f83ba1

docs/_build/html/_sources/index.txt

    sphinx-quickstart on Fri Sep 18 05:13:19 2009.
    You can adapt this file completely to your liking, but it should at least
    contain the root `toctree` directive.
-   
+
 .. toctree::
    :maxdepth: 2
-   
+
 ==============================================
 django-photo-albums's documentation
 ==============================================
-   
+
 django-photo-albums is a pluggable django image gallery app.
 
-Image galleries can be attached to any Django model. And thanks to 
-django 1.1 url namespaces it is possible to have multiple 'albums' app 
-instances (for example, for different models) that use different sets of 
-templates, different permission rules, have dedicated integration test suites 
+Image galleries can be attached to any Django model. And thanks to
+django 1.1 url namespaces it is possible to have multiple 'albums' app
+instances (for example, for different models) that use different sets of
+templates, different permission rules, have dedicated integration test suites
 and are available from different urls.
 
-Each image gallery provide functionality for image viewing, editing, 
-uploading, uploading entire albums in one zip file, reordering, 
+Each image gallery provide functionality for image viewing, editing,
+uploading, uploading entire albums in one zip file, reordering,
 marking/unmarking as main and deleting.
 
-django-photo-albums requires Django >= 1.1 (or svn version with 
-url namespaces), setuptools for installation, django-generic-images 
-for image management and django-annoying. django-generic-images and
-django-annoying will be installed automatically if you install 
-django-photo-albums via easy_install or pip.
+django-photo-albums is an application based on
+`django-generic-images <http://bitbucket.org/kmike/django-generic-images/>`_ .
+django-photo-albums requires Django >= 1.1 (or svn version with
+url namespaces), setuptools for installation, django-annoying for some utils and
+django-generic-images for image management and advanced admin image uploader.
+django-generic-images and django-annoying will be installed automatically if
+you install django-photo-albums via easy_install  or pip.
 
 django-photo-albums does not provide any thumbnail creation solution because
-there are external django apps (such as sorl-thumbnail) that would do this 
-better. 
+there are external django apps (such as sorl-thumbnail) that would do this
+better.
 
-Testing if app instance is integrated correctly (at least that templates 
-don't raise exceptions) is easy because base class for integration testcases 
+Testing if app instance is integrated correctly (at least that templates
+don't raise exceptions) is easy because base class for integration testcases
 is provided.
 
+
 ************
 Installation
 ************
 ::
 
-	$ pip install django-photo-albums
+    $ pip install django-photo-albums
 
 or::
 
-	$ easy_install django-photo-albums
+    $ easy_install django-photo-albums
 
 or::
 
-	$ hg clone http://bitbucket.org/kmike/django-photo-albums/ 
-	$ cd django-photo-albums
-	$ python setup.py install
+    $ hg clone http://bitbucket.org/kmike/django-photo-albums/
+    $ cd django-photo-albums
+    $ python setup.py install
 
-Then add 'photo_albums' and 'generic_images' to your ``INSTALLED_APPS`` in 
-settings.py and run ``./manage.py syncdb`` (syncdb is not needed if 
+Then add 'photo_albums' and 'generic_images' to your ``INSTALLED_APPS`` in
+settings.py and run ``./manage.py syncdb`` (syncdb is not needed if
 django-generic-images was already installed).
-   
+
+Note: django-generic-images app provides admin image uploader (see more in
+`django-generic-images docs <http://django-generic-images.googlecode.com/hg/docs/_build/html/index.html#admin>`_ ).
+For this admin uploader to work ``generic_images`` folder from
+``generic_images/media/`` should be copied to project's ``MEDIA_ROOT``.
+
+
 *********
 Basic use
 *********
 
 .. automodule:: photo_albums.urls
 
-	.. autoclass:: photo_albums.urls.PhotoAlbumSite()
-		
-	
+    .. autoclass:: photo_albums.urls.PhotoAlbumSite()
+
+
 
 Templates used by django-photo-albums
 =====================================
 
-Templates usually should be placed in ``templates/albums/<app_name>/`` folder. 
-App_name should be the name of queryset model's app as it appears in contenttypes 
+Templates usually should be placed in ``templates/albums/<app_name>/`` folder.
+App_name should be the name of queryset model's app as it appears in contenttypes
 table (e.g. 'auth' for User). It is possible to override templates per-model
-(by placing them in ``templates/albums/<app_name>/<model_name>/`` folder) or to 
-have a kind of default fallback templates for several apps (by placing them in 
+(by placing them in ``templates/albums/<app_name>/<model_name>/`` folder) or to
+have a kind of default fallback templates for several apps (by placing them in
 ``templates/albums/`` folder).
 
 Common context
 
 Each view have at least 2 variables in context:
 
-* ``<template_object_name>``: object for which gallery is attached to (the name 
-    of variable is set in PhotoAlbumsSite constructor 
-    (:ref:`here<template_object_name>`), default is ``'object'``)	
-	
+* ``<template_object_name>``: object for which gallery is attached to (the name
+    of variable is set in PhotoAlbumsSite constructor
+    (:ref:`here<template_object_name>`), default is ``'object'``)
+
 * ``current_app``: app name, ``'albums'`` by default
 
 
 
 * ``edit_album.html`` displays entire album. Used by edit_album view.
 
-* ``reorder_images.html`` displays entire album. Used by reorder_images view. 
-	These 3 templates have ``images`` variable in context with iterable of all 
-	images in gallery. 
-	
+* ``reorder_images.html`` displays entire album. Used by reorder_images view.
+    These 3 templates have ``images`` variable in context with iterable of all
+    images in gallery.
+
 Example::
-	
+
     {% for image in images %}
         <img src='{{ image.image }}' alt='{{image.caption}}'>
     {% endfor %}
-    
+
 With sorl-thumbnail::
-    
+
     {% for image in images %}
         <img src='{% thumbnail image.image 100x50 %}' alt='{{ image.caption }}'>
     {% endfor %}
-	
 
-* ``show_image.html`` - displays one image. Has ``image``, ``prev`` and ``next`` 
-	variables in context. ``prev`` and ``next`` are id's of previous and next 
-	(by image.order field) images in gallery.
 
-* ``edit_image.html`` - displays one image for editing purposes. Has ``form``, 
-    ``image``, ``prev`` and ``next`` variables in context. ``prev`` and ``next`` 
-    are id's of previous and next (by image.order field) images in gallery. 
+* ``show_image.html`` - displays one image. Has ``image``, ``prev`` and ``next``
+    variables in context. ``prev`` and ``next`` are id's of previous and next
+    (by image.order field) images in gallery.
+
+* ``edit_image.html`` - displays one image for editing purposes. Has ``form``,
+    ``image``, ``prev`` and ``next`` variables in context. ``prev`` and ``next``
+    are id's of previous and next (by image.order field) images in gallery.
     ``form`` is a form of :ref:`edit_form_class<edit_form_class>` class.
 
 Example::
-    
+
     <img src='{{ image.image }}' alt='{{image.caption}}'>
-    
+
     <a href='{% url user_images:edit_image album_user.id prev %}'>previous image</a>
     <a href='{% url user_images:edit_image album_user.id next %}'>next image</a>
-    
+
     <form action='' method='POST'>
         {{ form }}
         <input type='submit' value='Save'>
     </form>
 
 
-* ``upload_images.html`` - displays the formset for bulk image upload. 
-	Formset is of :ref:`upload_formset_class<upload_formset_class>` class and is 
-	available as ``formset`` context variable. 
-	
+* ``upload_images.html`` - displays the formset for bulk image upload.
+    Formset is of :ref:`upload_formset_class<upload_formset_class>` class and is
+    available as ``formset`` context variable.
+
 Example::
 
     <form action="" method="POST" enctype="multipart/form-data">
         {{ formset }}
         <input type="submit" value="Upload images">
-    </form>    
-    	
+    </form>
 
-* ``upload_main_image.html`` - displays form for uploading one image. Uploaded 
-	image becomes main in gallery. Has ``form`` in context, it's a form of type 
-	:ref:`upload_form_class<upload_form_class>`.
-	
+
+* ``upload_main_image.html`` - displays form for uploading one image. Uploaded
+    image becomes main in gallery. Has ``form`` in context, it's a form of type
+    :ref:`upload_form_class<upload_form_class>`.
+
 * ``upload_zip.html`` - displays form for uploading zip archive with images.
-    Has ``form`` in context, it's a form of type 
+    Has ``form`` in context, it's a form of type
     :ref:`upload_zip_form_class<upload_zip_form_class>`
 
-* ``confirm_delete.html`` - displays confirmation dialog for deleting image. 
-	Has ``image`` in context. Should have a form that do POST request to delete 
-	view on submit.
-	
-	
+* ``confirm_delete.html`` - displays confirmation dialog for deleting image.
+    Has ``image`` in context. Should have a form that do POST request to delete
+    view on submit.
+
+
 Views
 =====
 
 .. automodule:: photo_albums.views
-	:members:
-	:undoc-members:
-	
+    :members:
+    :undoc-members:
+
 Forms
 =====
 
 .. automodule:: photo_albums.forms
 
     .. class:: photo_albums.forms.ImageEditForm()
-        
-        ::    
+
+        ::
 
             class ImageEditForm(forms.ModelForm):
                 class Meta:
                     model = AttachedImage
                     fields = ['caption']
-    
-    
+
+
     .. _photoformset:
-    
+
     .. class:: photo_albums.forms.PhotoFormSet
-    
+
         ``modelformset_factory(AttachedImage, extra=3, fields = ['image', 'caption'])``
 
     .. autoclass:: photo_albums.forms.UploadZipForm()
         :members:
-        
+
     .. autoclass:: photo_albums.forms.UploadZipAlbumForm
         :members:
         :show-inheritance:
-        
+
     Example::
-    
+
         if request.method == 'POST':
             form = UploadZipAlbumForm(request.user, obj, request.POST, request.FILES)
             if form.is_valid():
                 form.process_zip_file()
                 success_url = album_site.reverse('show_album', args=[object_id])
-                return HttpResponseRedirect(success_url)        
+                return HttpResponseRedirect(success_url)
         else:
             form = UploadZipAlbumForm(request.user, obj)
-        
-            
-    
+
+
+
 
 *******
 Testing
 
 Integration testing
 ===================
-	
+
 .. automodule:: photo_albums.test_utils
     :show-inheritance:
     :members:
     :undoc-members:
-	
+
 Bugs
 ====
 

docs/_build/html/genindex.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Index &mdash; django-photo-albums v0.20 documentation</title>
+    <title>Index &mdash; django-photo-albums v0.20.3 documentation</title>
     <link rel="stylesheet" href="_static/default.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
-        VERSION:     '0.20',
+        VERSION:     '0.20.3',
         COLLAPSE_MODINDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="top" title="django-photo-albums v0.20 documentation" href="index.html" /> 
+    <link rel="top" title="django-photo-albums v0.20.3 documentation" href="index.html" /> 
   </head>
   <body>
     <div class="related">
         <li class="right" >
           <a href="modindex.html" title="Global Module Index"
              accesskey="M">modules</a> |</li>
-        <li><a href="index.html">django-photo-albums v0.20 documentation</a> &raquo;</li> 
+        <li><a href="index.html">django-photo-albums v0.20.3 documentation</a> &raquo;</li> 
       </ul>
     </div>  
 
 
    <h1 id="index">Index</h1>
 
-   <a href="#A"><strong>A</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#E"><strong>E</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#I"><strong>I</strong></a> | <a href="#N"><strong>N</strong></a> | <a href="#P"><strong>P</strong></a> | <a href="#T"><strong>T</strong></a> | <a href="#U"><strong>U</strong></a> 
+   <a href="#A"><strong>A</strong></a> | <a href="#C"><strong>C</strong></a> | <a href="#D"><strong>D</strong></a> | <a href="#E"><strong>E</strong></a> | <a href="#F"><strong>F</strong></a> | <a href="#I"><strong>I</strong></a> | <a href="#N"><strong>N</strong></a> | <a href="#P"><strong>P</strong></a> | <a href="#S"><strong>S</strong></a> | <a href="#T"><strong>T</strong></a> | <a href="#U"><strong>U</strong></a> 
 
    <hr />
 
 
 <dt><a href="index.html#photo_albums.test_utils.AlbumTest.check">check() (photo_albums.test_utils.AlbumTest method)</a></dt>
 <dt><a href="index.html#photo_albums.forms.UploadZipForm.clean_zip_file">clean_zip_file() (photo_albums.forms.UploadZipForm method)</a></dt></dl></td><td width="33%" valign="top"><dl>
+<dt><a href="index.html#photo_albums.views.clear_main_image">clear_main_image (in module photo_albums.views)</a></dt>
+</dl></td></tr></table>
+
+<h2 id="D">D</h2>
+<table width="100%" class="indextable"><tr><td width="33%" valign="top">
+<dl>
+
+<dt><a href="index.html#photo_albums.views.delete_image">delete_image (in module photo_albums.views)</a></dt></dl></td><td width="33%" valign="top"><dl>
 </dl></td></tr></table>
 
 <h2 id="E">E</h2>
 <table width="100%" class="indextable"><tr><td width="33%" valign="top">
 <dl>
 
-<dt><a href="index.html#photo_albums.test_utils.AlbumTest.excluded_views">excluded_views (photo_albums.test_utils.AlbumTest attribute)</a></dt></dl></td><td width="33%" valign="top"><dl>
+<dt><a href="index.html#photo_albums.views.edit_album">edit_album (in module photo_albums.views)</a></dt>
+<dt><a href="index.html#photo_albums.views.edit_image">edit_image (in module photo_albums.views)</a></dt></dl></td><td width="33%" valign="top"><dl>
+<dt><a href="index.html#photo_albums.test_utils.AlbumTest.excluded_views">excluded_views (photo_albums.test_utils.AlbumTest attribute)</a></dt>
 </dl></td></tr></table>
 
 <h2 id="F">F</h2>
 <dt><a href="index.html#photo_albums.forms.UploadZipForm.process_zip_file">process_zip_file() (photo_albums.forms.UploadZipForm method)</a></dt>
 </dl></td></tr></table>
 
+<h2 id="S">S</h2>
+<table width="100%" class="indextable"><tr><td width="33%" valign="top">
+<dl>
+
+<dt><a href="index.html#photo_albums.views.set_as_main_image">set_as_main_image (in module photo_albums.views)</a></dt>
+<dt><a href="index.html#photo_albums.views.show_album">show_album() (in module photo_albums.views)</a></dt></dl></td><td width="33%" valign="top"><dl>
+<dt><a href="index.html#photo_albums.views.show_image">show_image() (in module photo_albums.views)</a></dt>
+</dl></td></tr></table>
+
 <h2 id="T">T</h2>
 <table width="100%" class="indextable"><tr><td width="33%" valign="top">
 <dl>
 <table width="100%" class="indextable"><tr><td width="33%" valign="top">
 <dl>
 
-<dt><a href="index.html#photo_albums.forms.UploadZipAlbumForm">UploadZipAlbumForm (class in photo_albums.forms)</a></dt>
-<dt><a href="index.html#photo_albums.forms.UploadZipForm">UploadZipForm (class in photo_albums.forms)</a></dt></dl></td><td width="33%" valign="top"><dl>
+<dt><a href="index.html#photo_albums.views.upload_images">upload_images (in module photo_albums.views)</a></dt>
+<dt><a href="index.html#photo_albums.views.upload_main_image">upload_main_image (in module photo_albums.views)</a></dt>
+<dt><a href="index.html#photo_albums.views.upload_zip">upload_zip (in module photo_albums.views)</a></dt>
+<dt><a href="index.html#photo_albums.forms.UploadZipAlbumForm">UploadZipAlbumForm (class in photo_albums.forms)</a></dt></dl></td><td width="33%" valign="top"><dl>
+<dt><a href="index.html#photo_albums.forms.UploadZipForm">UploadZipForm (class in photo_albums.forms)</a></dt>
 <dt><a href="index.html#photo_albums.test_utils.AlbumTest.username">username (photo_albums.test_utils.AlbumTest attribute)</a></dt>
 </dl></td></tr></table>
 
         <li class="right" >
           <a href="modindex.html" title="Global Module Index"
              >modules</a> |</li>
-        <li><a href="index.html">django-photo-albums v0.20 documentation</a> &raquo;</li> 
+        <li><a href="index.html">django-photo-albums v0.20.3 documentation</a> &raquo;</li> 
       </ul>
     </div>
     <div class="footer">

docs/_build/html/index.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>django-photo-albums’s documentation &mdash; django-photo-albums v0.20 documentation</title>
+    <title>django-photo-albums’s documentation &mdash; django-photo-albums v0.20.3 documentation</title>
     <link rel="stylesheet" href="_static/default.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
-        VERSION:     '0.20',
+        VERSION:     '0.20.3',
         COLLAPSE_MODINDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="top" title="django-photo-albums v0.20 documentation" href="" /> 
+    <link rel="top" title="django-photo-albums v0.20.3 documentation" href="" /> 
   </head>
   <body>
     <div class="related">
         <li class="right" >
           <a href="modindex.html" title="Global Module Index"
              accesskey="M">modules</a> |</li>
-        <li><a href="">django-photo-albums v0.20 documentation</a> &raquo;</li> 
+        <li><a href="">django-photo-albums v0.20.3 documentation</a> &raquo;</li> 
       </ul>
     </div>  
 
 <p>Each image gallery provide functionality for image viewing, editing,
 uploading, uploading entire albums in one zip file, reordering,
 marking/unmarking as main and deleting.</p>
-<p>django-photo-albums requires Django &gt;= 1.1 (or svn version with
-url namespaces), setuptools for installation, django-generic-images
-for image management and django-annoying. django-generic-images and
-django-annoying will be installed automatically if you install
-django-photo-albums via easy_install or pip.</p>
+<p>django-photo-albums is an application based on
+<a class="reference" href="http://bitbucket.org/kmike/django-generic-images/">django-generic-images</a> .
+django-photo-albums requires Django &gt;= 1.1 (or svn version with
+url namespaces), setuptools for installation, django-annoying for some utils and
+django-generic-images for image management and advanced admin image uploader.
+django-generic-images and django-annoying will be installed automatically if
+you install django-photo-albums via easy_install  or pip.</p>
 <p>django-photo-albums does not provide any thumbnail creation solution because
 there are external django apps (such as sorl-thumbnail) that would do this
 better.</p>
 <p>Then add &#8216;photo_albums&#8217; and &#8216;generic_images&#8217; to your <tt class="docutils literal"><span class="pre">INSTALLED_APPS</span></tt> in
 settings.py and run <tt class="docutils literal"><span class="pre">./manage.py</span> <span class="pre">syncdb</span></tt> (syncdb is not needed if
 django-generic-images was already installed).</p>
+<p>Note: django-generic-images app provides admin image uploader (see more in
+<a class="reference" href="http://django-generic-images.googlecode.com/hg/docs/_build/html/index.html#admin">django-generic-images docs</a> ).
+For this admin uploader to work <tt class="docutils literal"><span class="pre">generic_images</span></tt> folder from
+<tt class="docutils literal"><span class="pre">generic_images/media/</span></tt> should be copied to project&#8217;s <tt class="docutils literal"><span class="pre">MEDIA_ROOT</span></tt>.</p>
 </div>
 <div class="section" id="basic-use">
 <h2>Basic use<a class="headerlink" href="#basic-use" title="Permalink to this headline">¶</a></h2>
 <ol class="arabic">
 <li><p class="first">Create album site instance and plug it&#8217;s urls to urlconf:</p>
 <div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">photo_albums.urls</span> <span class="kn">import</span> <span class="n">PhotoAlbumSite</span>
-<span class="n">accounts_photo_site</span> <span class="o">=</span> <span class="n">PhotoAlbumSite</span><span class="p">(</span><span class="n">instance_name</span> <span class="o">=</span> <span class="s">&#39;user_images&#39;</span><span class="p">,</span> 
-                         <span class="n">queryset</span> <span class="o">=</span> <span class="n">User</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">all</span><span class="p">(),</span> 
+<span class="n">accounts_photo_site</span> <span class="o">=</span> <span class="n">PhotoAlbumSite</span><span class="p">(</span><span class="n">instance_name</span> <span class="o">=</span> <span class="s">&#39;user_images&#39;</span><span class="p">,</span>
+                         <span class="n">queryset</span> <span class="o">=</span> <span class="n">User</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">all</span><span class="p">(),</span>
                          <span class="n">template_object_name</span> <span class="o">=</span> <span class="s">&#39;album_user&#39;</span><span class="p">,</span>
-                         <span class="n">has_edit_permission</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">request</span><span class="p">,</span> <span class="n">obj</span><span class="p">:</span> <span class="n">request</span><span class="o">.</span><span class="n">user</span><span class="o">==</span><span class="n">obj</span><span class="p">)</span> 
+                         <span class="n">has_edit_permission</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">request</span><span class="p">,</span> <span class="n">obj</span><span class="p">:</span> <span class="n">request</span><span class="o">.</span><span class="n">user</span><span class="o">==</span><span class="n">obj</span><span class="p">)</span>
 <span class="n">urlpatterns</span> <span class="o">+=</span> <span class="n">patterns</span><span class="p">(</span><span class="s">&#39;&#39;</span><span class="p">,</span> <span class="n">url</span><span class="p">(</span><span class="s">r&#39;^accounts/&#39;</span><span class="p">,</span> <span class="n">include</span><span class="p">(</span><span class="n">accounts_photo_site</span><span class="o">.</span><span class="n">urls</span><span class="p">)),)</span>
 </pre></div>
 </div>
 </li>
 </ol>
-<p>Please note that if you deploy multiple albums (ex. for different models), 
-you must provide unique <tt class="docutils literal"><span class="pre">instance_name</span></tt> for each instance to make url 
+<p>Please note that if you deploy multiple albums (ex. for different models),
+you must provide unique <tt class="docutils literal"><span class="pre">instance_name</span></tt> for each instance to make url
 reversing work.</p>
-<p>Included urls looks like <tt class="docutils literal"><span class="pre">&lt;object_id&gt;/&lt;app_name&gt;/&lt;action&gt;</span></tt> or 
+<p>Included urls looks like <tt class="docutils literal"><span class="pre">&lt;object_id&gt;/&lt;app_name&gt;/&lt;action&gt;</span></tt> or
 <tt class="docutils literal"><span class="pre">&lt;object_id&gt;/&lt;app_name&gt;/&lt;image_id&gt;/&lt;action&gt;</span></tt>,
-where object_id is the id of object which is gallery attached to, 
-app_name is &#8220;album&#8221; by default (you can change it <a class="reference" href="#app-name-param"><em>here</em></a>), 
-image_id is image id :-) and action is the performed action (view, edit, etc). 
-It is possible to use slug instead of object&#8217;s id 
+where object_id is the id of object which is gallery attached to,
+app_name is &#8220;album&#8221; by default (you can change it <a class="reference" href="#app-name-param"><em>here</em></a>),
+image_id is image id :-) and action is the performed action (view, edit, etc).
+It is possible to use slug instead of object&#8217;s id
 (look at <tt class="docutils literal"><span class="pre">object_regex</span></tt> and <tt class="docutils literal"><span class="pre">lookup_field</span></tt> <a class="reference" href="#custom-url-scheme"><em>parameters</em></a>).</p>
+<p>It is also possible to attach PhotoAlbumSite to any url using
+<a class="reference" href="#object-getter"><em>object_getter</em></a> parameter.</p>
 <ol class="arabic simple" start="2">
 <li>Create the necessary templates.</li>
 <li>Link people to image gallery using <tt class="docutils literal"><span class="pre">{%</span> <span class="pre">url</span> <span class="pre">..</span> <span class="pre">%}</span></tt> template tags.</li>
 </ol>
 <p>You can use these urls (assuming that <tt class="docutils literal"><span class="pre">user_images</span></tt> is an instance name,
-<tt class="docutils literal"><span class="pre">album_user</span></tt> is the object for which gallery is attached to, <tt class="docutils literal"><span class="pre">image</span></tt> is an image 
+<tt class="docutils literal"><span class="pre">album_user</span></tt> is the object for which gallery is attached to, <tt class="docutils literal"><span class="pre">image</span></tt> is an image
 in gallery and slugs are not used):</p>
 <div class="highlight-python"><pre>{% url user_images:show_album album_user.id %}
 
 class </em><tt class="descclassname">photo_albums.urls.</tt><tt class="descname">PhotoAlbumSite</tt><a class="headerlink" href="#photo_albums.urls.PhotoAlbumSite" title="Permalink to this definition">¶</a></dt>
 <dd><blockquote>
 <p>Constructor parameters:</p>
-<p><tt class="docutils literal"><span class="pre">instance_name</span></tt>: String. Required. App instance name for url 
+<p><tt class="docutils literal"><span class="pre">instance_name</span></tt>: String. Required. App instance name for url
 reversing. Must be unique.</p>
-<p><tt class="docutils literal"><span class="pre">queryset</span></tt>: QuerySet. Required. Albums will be attached to objects 
+<p><tt class="docutils literal"><span class="pre">queryset</span></tt>: QuerySet. Required. Albums will be attached to objects
 in this queryset.</p>
-<p id="custom-url-scheme"><tt class="docutils literal"><span class="pre">object_regex</span></tt>: String. Optional, default is <tt class="docutils literal"><span class="pre">'\d+'</span></tt>. It should be a 
-URL regular expression for object in URL. You should use smth. 
+<p id="custom-url-scheme"><tt class="docutils literal"><span class="pre">object_regex</span></tt>: String. Optional, default is <tt class="docutils literal"><span class="pre">'\d+'</span></tt>. It should be a
+URL regular expression for object in URL. You should use smth.
 like <tt class="docutils literal"><span class="pre">'[\w\d-]+'</span></tt> for slugs.</p>
-<p><tt class="docutils literal"><span class="pre">lookup_field</span></tt>: String. Optional, default is <tt class="docutils literal"><span class="pre">'pk'</span></tt>. It is a field 
-name to lookup. It may contain <tt class="docutils literal"><span class="pre">__</span></tt> and follow relations 
+<p><tt class="docutils literal"><span class="pre">lookup_field</span></tt>: String. Optional, default is <tt class="docutils literal"><span class="pre">'pk'</span></tt>. It is a field
+name to lookup. It may contain <tt class="docutils literal"><span class="pre">__</span></tt> and follow relations
 (ex.: <tt class="docutils literal"><span class="pre">userprofile__slug</span></tt>).</p>
-<p id="app-name-param"><tt class="docutils literal"><span class="pre">app_name</span></tt>: String. Optional, default value is <tt class="docutils literal"><span class="pre">'album'</span></tt>. Used by url 
+<p id="app-name-param"><tt class="docutils literal"><span class="pre">app_name</span></tt>: String. Optional, default value is <tt class="docutils literal"><span class="pre">'album'</span></tt>. Used by url
 namespaces stuff.</p>
-<p><tt class="docutils literal"><span class="pre">extra_context</span></tt>: Dict. Optional. Extra context that will be passed 
+<p><tt class="docutils literal"><span class="pre">extra_context</span></tt>: Dict. Optional. Extra context that will be passed
 to each view.</p>
 </blockquote>
 <blockquote id="template-object-name">
-<p><tt class="docutils literal"><span class="pre">template_object_name</span></tt>: String. Optional. The name of template 
-context variable with object for which album is attached. 
+<p><tt class="docutils literal"><span class="pre">template_object_name</span></tt>: String. Optional. The name of template
+context variable with object for which album is attached.
 Default is <tt class="docutils literal"><span class="pre">'object'</span></tt>.</p>
-<p><tt class="docutils literal"><span class="pre">has_edit_permission</span></tt>: Optional. Function that accepts request and 
-object and returns True if user is allowed to edit album for 
-object and False otherwise. Default behaviour is to always 
+<p><tt class="docutils literal"><span class="pre">has_edit_permission</span></tt>: Optional. Function that accepts request and
+object and returns True if user is allowed to edit album for
+object and False otherwise. Default behaviour is to always
 return True.</p>
-<p><tt class="docutils literal"><span class="pre">context_processors</span></tt>: Optional. A list of callables that will be 
+<p><tt class="docutils literal"><span class="pre">context_processors</span></tt>: Optional. A list of callables that will be
 used as additional context_processors in each view.</p>
-<p id="edit-form-class"><tt class="docutils literal"><span class="pre">edit_form_class</span></tt>: Optional, default is 
-<tt class="xref docutils literal"><span class="pre">ImageEditForm</span></tt>. ModelForm subclass to be used in 
-<tt class="xref docutils literal"><span class="pre">edit_image()</span></tt> view.</p>
-<p id="upload-form-class"><tt class="docutils literal"><span class="pre">upload_form_class</span></tt>: Optional, default is <tt class="docutils literal"><span class="pre">AttachedImageForm</span></tt> (defined in 
-<tt class="docutils literal"><span class="pre">generic_images.forms</span></tt> module). ModelForm subclass to be used in 
-<tt class="xref docutils literal"><span class="pre">upload_main_image()</span></tt> view.</p>
-<p id="upload-formset-class"><tt class="docutils literal"><span class="pre">upload_formset_class</span></tt>: Optional, default is 
-<a class="reference" href="#photoformset"><em>PhotoFormSet</em></a>. ModelFormSet to be used in 
-<tt class="xref docutils literal"><span class="pre">upload_images()</span></tt> view.</p>
-<p id="upload-zip-form-class"><tt class="docutils literal"><span class="pre">upload_zip_form_class</span></tt>: Optional, default is 
-<a title="photo_albums.forms.UploadZipAlbumForm" class="reference" href="#photo_albums.forms.UploadZipAlbumForm"><tt class="xref docutils literal"><span class="pre">UploadZipAlbumForm</span></tt></a>. Form to be used in 
-<tt class="xref docutils literal"><span class="pre">upload_zip()</span></tt> view.</p>
+<p id="object-getter"><tt class="docutils literal"><span class="pre">object_getter</span></tt>: special function that returns object that PhotoAlbumSite
+is attached to. It is special because it must have
+explicitly assigned &#8216;regex&#8217; attribute. This regex will be passed to django
+URL system. Parameters from this regex will be then passed to object_getter
+function.</p>
+<p>Example:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">get_place</span><span class="p">(</span><span class="n">city_slug</span><span class="p">,</span> <span class="n">place_slug</span><span class="p">):</span>
+    <span class="k">return</span> <span class="n">Place</span><span class="o">.</span><span class="n">objects</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">city__slug</span><span class="o">=</span><span class="n">city_slug</span><span class="p">,</span> <span class="n">slug</span><span class="o">=</span><span class="n">place_slug</span><span class="p">)</span>
+<span class="n">get_place</span><span class="o">.</span><span class="n">regex</span> <span class="o">=</span> <span class="s">r&#39;(?P&lt;city_slug&gt;[\w\d-]+)/(?P&lt;place_slug&gt;[\w\d-]+)&#39;</span>
+</pre></div>
+</div>
+<p id="edit-form-class"><tt class="docutils literal"><span class="pre">edit_form_class</span></tt>: Optional, default is
+<tt class="xref docutils literal"><span class="pre">ImageEditForm</span></tt>. ModelForm subclass to be used in
+<a title="photo_albums.views.edit_image" class="reference" href="#photo_albums.views.edit_image"><tt class="xref docutils literal"><span class="pre">edit_image()</span></tt></a> view.</p>
+<p id="upload-form-class"><tt class="docutils literal"><span class="pre">upload_form_class</span></tt>: Optional, default is <tt class="docutils literal"><span class="pre">AttachedImageForm</span></tt> (defined in
+<tt class="docutils literal"><span class="pre">generic_images.forms</span></tt> module). ModelForm subclass to be used in
+<a title="photo_albums.views.upload_main_image" class="reference" href="#photo_albums.views.upload_main_image"><tt class="xref docutils literal"><span class="pre">upload_main_image()</span></tt></a> view.</p>
+<p id="upload-formset-class"><tt class="docutils literal"><span class="pre">upload_formset_class</span></tt>: Optional, default is
+<a class="reference" href="#photoformset"><em>PhotoFormSet</em></a>. ModelFormSet to be used in
+<a title="photo_albums.views.upload_images" class="reference" href="#photo_albums.views.upload_images"><tt class="xref docutils literal"><span class="pre">upload_images()</span></tt></a> view.</p>
+<p id="upload-zip-form-class"><tt class="docutils literal"><span class="pre">upload_zip_form_class</span></tt>: Optional, default is
+<a title="photo_albums.forms.UploadZipAlbumForm" class="reference" href="#photo_albums.forms.UploadZipAlbumForm"><tt class="xref docutils literal"><span class="pre">UploadZipAlbumForm</span></tt></a>. Form to be used in
+<a title="photo_albums.views.upload_zip" class="reference" href="#photo_albums.views.upload_zip"><tt class="xref docutils literal"><span class="pre">upload_zip()</span></tt></a> view.</p>
 </blockquote>
 </dd></dl>
 
 <div class="section" id="module-photo_albums.views">
 <h3>Views<a class="headerlink" href="#module-photo_albums.views" title="Permalink to this headline">¶</a></h3>
 <p>Views used by PhotoAlbumSite.</p>
+<dl class="function">
+<dt id="photo_albums.views.show_album">
+<tt class="descclassname">photo_albums.views.</tt><tt class="descname">show_album</tt><big>(</big><em>request</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#photo_albums.views.show_album" title="Permalink to this definition">¶</a></dt>
+<dd>Show album for object using show_album.html template</dd></dl>
+
+<dl class="function">
+<dt id="photo_albums.views.show_image">
+<tt class="descclassname">photo_albums.views.</tt><tt class="descname">show_image</tt><big>(</big><em>request</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#photo_albums.views.show_image" title="Permalink to this definition">¶</a></dt>
+<dd>Show one image</dd></dl>
+
+<dl class="attribute">
+<dt id="photo_albums.views.clear_main_image">
+<tt class="descclassname">photo_albums.views.</tt><tt class="descname">clear_main_image</tt><a class="headerlink" href="#photo_albums.views.clear_main_image" title="Permalink to this definition">¶</a></dt>
+<dd>Mark image as not main and redirect to <tt class="docutils literal"><span class="pre">show_image</span></tt> view</dd></dl>
+
+<dl class="attribute">
+<dt id="photo_albums.views.delete_image">
+<tt class="descclassname">photo_albums.views.</tt><tt class="descname">delete_image</tt><a class="headerlink" href="#photo_albums.views.delete_image" title="Permalink to this definition">¶</a></dt>
+<dd>Delete image if request method is POST, displays
+<tt class="docutils literal"><span class="pre">confirm_delete.html</span></tt> template otherwise</dd></dl>
+
+<dl class="attribute">
+<dt id="photo_albums.views.edit_album">
+<tt class="descclassname">photo_albums.views.</tt><tt class="descname">edit_album</tt><a class="headerlink" href="#photo_albums.views.edit_album" title="Permalink to this definition">¶</a></dt>
+<dd>Show album for object using edit_album.html template, with permission checks.</dd></dl>
+
+<dl class="attribute">
+<dt id="photo_albums.views.edit_image">
+<tt class="descclassname">photo_albums.views.</tt><tt class="descname">edit_image</tt><a class="headerlink" href="#photo_albums.views.edit_image" title="Permalink to this definition">¶</a></dt>
+<dd>Show one image. Checks permissions and provides edit form.</dd></dl>
+
+<dl class="attribute">
+<dt id="photo_albums.views.set_as_main_image">
+<tt class="descclassname">photo_albums.views.</tt><tt class="descname">set_as_main_image</tt><a class="headerlink" href="#photo_albums.views.set_as_main_image" title="Permalink to this definition">¶</a></dt>
+<dd>Mark image as main and redirect to <tt class="docutils literal"><span class="pre">show_image</span></tt> view</dd></dl>
+
+<dl class="attribute">
+<dt id="photo_albums.views.upload_images">
+<tt class="descclassname">photo_albums.views.</tt><tt class="descname">upload_images</tt><a class="headerlink" href="#photo_albums.views.upload_images" title="Permalink to this definition">¶</a></dt>
+<dd>Upload several images at once</dd></dl>
+
+<dl class="attribute">
+<dt id="photo_albums.views.upload_main_image">
+<tt class="descclassname">photo_albums.views.</tt><tt class="descname">upload_main_image</tt><a class="headerlink" href="#photo_albums.views.upload_main_image" title="Permalink to this definition">¶</a></dt>
+<dd>Upload 1 image and make it main image in gallery</dd></dl>
+
+<dl class="attribute">
+<dt id="photo_albums.views.upload_zip">
+<tt class="descclassname">photo_albums.views.</tt><tt class="descname">upload_zip</tt><a class="headerlink" href="#photo_albums.views.upload_zip" title="Permalink to this definition">¶</a></dt>
+<dd>Upload zip archive with images, extract them, check if they are correct
+and attach to object. Redirect to <tt class="docutils literal"><span class="pre">show_album</span></tt> view on success.</dd></dl>
+
 </div>
 <div class="section" id="module-photo_albums.forms">
 <h3>Forms<a class="headerlink" href="#module-photo_albums.forms" title="Permalink to this headline">¶</a></h3>
         <li class="right" >
           <a href="modindex.html" title="Global Module Index"
              >modules</a> |</li>
-        <li><a href="">django-photo-albums v0.20 documentation</a> &raquo;</li> 
+        <li><a href="">django-photo-albums v0.20.3 documentation</a> &raquo;</li> 
       </ul>
     </div>
     <div class="footer">

docs/_build/html/modindex.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Global Module Index &mdash; django-photo-albums v0.20 documentation</title>
+    <title>Global Module Index &mdash; django-photo-albums v0.20.3 documentation</title>
     <link rel="stylesheet" href="_static/default.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
-        VERSION:     '0.20',
+        VERSION:     '0.20.3',
         COLLAPSE_MODINDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
     </script>
     <script type="text/javascript" src="_static/jquery.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
-    <link rel="top" title="django-photo-albums v0.20 documentation" href="index.html" />
+    <link rel="top" title="django-photo-albums v0.20.3 documentation" href="index.html" />
  
 
 
         <li class="right" >
           <a href="" title="Global Module Index"
              accesskey="M">modules</a> |</li>
-        <li><a href="index.html">django-photo-albums v0.20 documentation</a> &raquo;</li> 
+        <li><a href="index.html">django-photo-albums v0.20.3 documentation</a> &raquo;</li> 
       </ul>
     </div>  
 
         <li class="right" >
           <a href="" title="Global Module Index"
              >modules</a> |</li>
-        <li><a href="index.html">django-photo-albums v0.20 documentation</a> &raquo;</li> 
+        <li><a href="index.html">django-photo-albums v0.20.3 documentation</a> &raquo;</li> 
       </ul>
     </div>
     <div class="footer">

docs/_build/html/objects.inv

 photo_albums.forms.UploadZipAlbumForm.process_file method index.html
 photo_albums.forms.UploadZipForm.clean_zip_file method index.html
 photo_albums.forms.UploadZipAlbumForm.needs_unpacking method index.html
+photo_albums.test_utils.AlbumTest.test_auth_views method index.html
 photo_albums.forms.UploadZipAlbumForm class index.html
 photo_albums.test_utils.AlbumTest.username attribute index.html
 photo_albums.test_utils.AlbumTest.image_in_album_id attribute index.html
+photo_albums.views.show_image function index.html
+photo_albums.views.edit_image attribute index.html
 photo_albums.test_utils.AlbumTest.album_site attribute index.html
 photo_albums.test_utils.AlbumTest.fixtures attribute index.html
 photo_albums.test_utils.AlbumTest.test_reorder method index.html
+photo_albums.views.delete_image attribute index.html
 photo_albums.test_utils.AlbumTest.test_public_views method index.html
+photo_albums.views.show_album function index.html
 photo_albums.forms.UploadZipForm.process_zip_file method index.html
 photo_albums.forms.UploadZipAlbumForm.is_valid_image method index.html
 photo_albums.test_utils.AlbumTest.album_for_id attribute index.html
 photo_albums.forms.UploadZipForm class index.html
+photo_albums.views.upload_main_image attribute index.html
+photo_albums.views.set_as_main_image attribute index.html
 photo_albums.forms.UploadZipForm.process_file method index.html
 photo_albums.test_utils.AlbumTest.password attribute index.html
 photo_albums.test_utils.AlbumTest.test_forbidden_views method index.html
 photo_albums.test_utils.AlbumTest.album_for_kwargs attribute index.html
 photo_albums.test_utils.AlbumTest.image_in_other_album_id attribute index.html
+photo_albums.views.edit_album attribute index.html
+photo_albums.views.upload_images attribute index.html
 photo_albums.forms.UploadZipForm.needs_unpacking method index.html
-photo_albums.test_utils.AlbumTest.test_auth_views method index.html
+photo_albums.views.clear_main_image attribute index.html
 photo_albums.test_utils.AlbumTest.check method index.html
 photo_albums.forms.photo_albums.forms.PhotoFormSet class index.html
+photo_albums.views.upload_zip attribute index.html

docs/_build/html/search.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
-    <title>Search &mdash; django-photo-albums v0.20 documentation</title>
+    <title>Search &mdash; django-photo-albums v0.20.3 documentation</title>
     <link rel="stylesheet" href="_static/default.css" type="text/css" />
     <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
     <script type="text/javascript">
       var DOCUMENTATION_OPTIONS = {
         URL_ROOT:    '',
-        VERSION:     '0.20',
+        VERSION:     '0.20.3',
         COLLAPSE_MODINDEX: false,
         FILE_SUFFIX: '.html',
         HAS_SOURCE:  true
     <script type="text/javascript" src="_static/jquery.js"></script>
     <script type="text/javascript" src="_static/doctools.js"></script>
     <script type="text/javascript" src="_static/searchtools.js"></script>
-    <link rel="top" title="django-photo-albums v0.20 documentation" href="index.html" /> 
+    <link rel="top" title="django-photo-albums v0.20.3 documentation" href="index.html" /> 
   </head>
   <body>
     <div class="related">
         <li class="right" >
           <a href="modindex.html" title="Global Module Index"
              accesskey="M">modules</a> |</li>
-        <li><a href="index.html">django-photo-albums v0.20 documentation</a> &raquo;</li> 
+        <li><a href="index.html">django-photo-albums v0.20.3 documentation</a> &raquo;</li> 
       </ul>
     </div>  
 
         <li class="right" >
           <a href="modindex.html" title="Global Module Index"
              >modules</a> |</li>
-        <li><a href="index.html">django-photo-albums v0.20 documentation</a> &raquo;</li> 
+        <li><a href="index.html">django-photo-albums v0.20.3 documentation</a> &raquo;</li> 
       </ul>
     </div>
   

docs/_build/html/searchindex.js

-Search.setIndex({desctypes:{"0":"attribute","1":"class","2":"method"},terms:{pluggabl:0,has_edit_permiss:0,obiwanu:0,skip:0,formset:0,all:0,month:0,prefix:[],"0x1a19b70":[],follow:0,alt:0,disk:0,photo_album:0,depend:[],readabl:0,string:0,fals:0,account:0,util:[],context_processor:0,upload_zip_form_class:0,veri:[],contenttyp:0,ref:[],list:0,upload:0,iter:0,pleas:0,unmark:0,accounts_photo_sit:0,id_:[],second:0,pass:0,index:[],appear:0,ned:0,delet:0,version:0,method:0,gener:0,here:0,errorlist:[],upload_form_class:0,path:0,becom:0,valu:0,search:[],error_class:[],vasia:0,"0x1a1bb30":[],app_util:[],chang:0,via:0,extra:0,modul:0,href:0,instal:0,should:0,regex:[],from:0,zip:0,memori:0,current_app:0,next:0,call:0,prev:0,type:0,reorder:0,more:0,src:0,peopl:0,relat:0,enhanc:0,accept:0,sorl:0,obj:0,unpack:0,must:0,none:0,edit_imag:0,alia:[],setup:0,work:0,uniqu:0,annoi:0,archiv:0,can:0,existingfil:[],purpos:0,overrid:0,edit_form_class:0,want:0,process:0,view_us:[],templat:0,tag:0,smth:0,login_requir:[],wow:0,alwai:0,multipl:0,write:0,"__init__":[],instead:0,photoformset:0,clone:0,mai:0,infolist:0,data:0,django:0,issu:0,object_regex:0,allow:0,media:[],callabl:0,fallback:0,order:0,becaus:0,clear_main_imag:0,"0x1a1caf0":[],paramet:0,process_zip_fil:0,thank:0,img:0,better:0,complex:0,main:0,edit_album:0,good:[],"return":0,thei:[],python:0,safe:0,dai:0,auth:0,mention:[],uploadzipform:0,name:0,edit:0,photoalbumssit:0,revers:0,each:0,attachedimag:0,show_imag:0,chunk:0,process_fil:0,runtest:[],meta:0,my_fixtur:0,year:0,extract:0,album:0,upload_imag:0,test_auth_view:0,content:[],modelform:0,correct:[],integr:0,namelist:0,urlpattern:0,insid:0,empty_permit:[],base:0,org:0,caption:0,place:0,temporari:0,urlconf:0,lambda:0,instance_nam:0,template_nam:[],onc:[],number:0,hook:0,alreadi:0,installed_app:0,size:0,auto_id:[],differ:0,start:0,account_imag:[],least:0,tou:0,attach:0,"0x1a1aaf0":[],test_forbidden_view:0,scheme:[],zipfil:0,store:0,modelformset_factori:0,option:0,namespac:0,setuptool:0,kind:0,instanc:0,provid:0,success_url:0,initi:[],"0x1a14af0":[],queryset:0,ani:0,corrupt:0,have:0,tabl:0,need:0,dedic:0,exclud:0,object_id:0,note:0,indic:[],necesseri:0,album_sit:0,endfor:0,usernam:0,object:0,compress:0,galleri:0,label_suffix:[],regular:0,deploi:0,lookup_field:0,"class":0,don:0,url:0,request:0,doe:0,"100x50":0,enctyp:0,"64k":0,show:[],get_template_nam:[],model_nam:0,permiss:0,anywai:0,filefield:[],redirect:[],onli:0,solut:0,temporary_file_path:[],dict:0,folder:0,extra_context:0,count:0,variou:0,delete_imag:0,express:0,set_as_main_imag:0,report:0,requir:0,useralbumtest:0,attachedimageformformset:[],is_valid_imag:0,stuff:0,common:0,contain:0,where:0,valid:0,view:0,user:0,set:0,methodnam:[],see:[],multipart:0,arg:0,testcas:0,close:[],modelformset:0,uploadzipalbumform:0,statu:0,correctli:0,pattern:0,someth:0,thumb:[],clean_zip_fil:0,won:0,"import":0,thumbnail:0,extend:[],image_id:0,entir:0,addit:0,behaviour:0,extens:0,etc:0,excluded_view:0,context:0,load:0,inspir:[],upload_formset_class:0,reorder_imag:0,non:0,assum:0,files_count:0,mark:0,basic:0,object_gett:0,imag:0,bulk:0,els:0,look:0,defin:0,fixtur:0,endblock:[],pack:0,them:0,kwarg:0,sever:0,decor:[],develop:0,welcom:0,perform:0,suggest:0,make:0,same:[],html:0,document:0,complet:0,http:0,action:0,rais:0,album_us:0,userprofile__slug:0,extern:0,test_help:0,upload_main_imag:0,exampl:0,thi:0,album_for_kwarg:0,model:0,file_num:0,usual:0,photo:0,test_public_view:0,test_util:0,thees:[],easi:0,except:0,param:0,add:0,is_valid:0,input:0,save:0,app:0,photoalbumsit:0,which:0,read:0,big:0,password:0,template_object_nam:0,like:0,success:[],resolv:0,"0x1a1baf0":[],albumtest:0,album_for_id:0,necessari:0,photologu:[],page:[],test_reord:0,creation:0,syncdb:0,librari:[],total:0,confirm:0,chunksiz:0,subclass:0,tracker:0,pluggablesit:[],imageeditform:0,httpresponseredirect:0,previou:0,run:0,uncompress:0,usag:0,step:0,post:0,viewtest:0,slug:0,plug:0,upload_zip:0,kmike:0,would:0,manag:0,user_imag:0,dialog:0,constructor:0,image_in_other_album_id:0,block:0,image2_in_album_id:0,photo_smal:[],set_image_ord:0,easy_instal:0,automat:0,your:0,per:0,submit:0,custom:0,avail:0,show_album:0,attachedimageform:0,includ:0,suit:0,"function":0,form:0,"0x1a19bb0":[],link:0,"true":0,bug:0,info:0,needs_unpack:0,possibl:0,"default":0,autoclass:[],displai:0,below:0,site:0,otherwis:0,confirm_delet:0,app_nam:0,featur:0,pil:0,creat:0,"0x1a1bb70":[],dure:0,exist:0,file:0,pip:0,check:0,"_custom_url_schem":[],field:0,other:0,lookup:0,test:0,you:0,variabl:0,image_in_album_id:0,get_profil:[],svn:0,my_object_slug:0,bitbucket:0,directori:0,rule:0,generic_imag:0,generic_util:0},titles:["django-photo-albums&#8217;s documentation"],modules:{"photo_albums.views":0,"photo_albums.urls":0,"photo_albums.forms":0,"photo_albums.test_utils":0},descrefs:{"photo_albums.test_utils.AlbumTest":{username:[0,0],album_for_id:[0,0],image_in_other_album_id:[0,0],excluded_views:[0,0],test_auth_views:[0,2],image_in_album_id:[0,0],album_site:[0,0],test_public_views:[0,2],test_reorder:[0,2],test_forbidden_views:[0,2],fixtures:[0,0],password:[0,0],album_for_kwargs:[0,0],check:[0,2],image2_in_album_id:[0,0]},"photo_albums.urls":{PhotoAlbumSite:[0,1]},"photo_albums.forms.UploadZipForm":{process_zip_file:[0,2],clean_zip_file:[0,2],process_file:[0,2],needs_unpacking:[0,2]},"photo_albums.forms":{UploadZipAlbumForm:[0,1],UploadZipForm:[0,1]},"photo_albums.test_utils":{AlbumTest:[0,1]},"photo_albums.forms.photo_albums.forms":{PhotoFormSet:[0,1],ImageEditForm:[0,1]},"photo_albums.forms.UploadZipAlbumForm":{is_valid_image:[0,2],process_file:[0,2],needs_unpacking:[0,2]}},filenames:["index"]})
+Search.setIndex({desctypes:{"0":"attribute","1":"class","2":"method","3":"function"},terms:{pluggabl:0,has_edit_permiss:0,obiwanu:0,skip:0,all:0,month:0,prefix:[],subclass:0,follow:0,alt:0,disk:0,photo_album:0,depend:[],readabl:0,string:0,place_slug:0,fals:0,account:0,util:0,context_processor:0,upload_zip_form_class:0,veri:[],contenttyp:0,ref:[],list:0,upload:0,iter:0,pleas:0,unmark:0,accounts_photo_sit:0,httpresponseredirect:0,second:0,pass:0,index:[],appear:0,ned:0,advanc:0,delet:0,version:0,account_imag:[],method:0,gener:0,here:0,errorlist:[],upload_form_class:0,path:0,becom:0,valu:0,search:[],error_class:[],vasia:0,"0x1a1bb30":[],app_util:[],chang:0,via:0,extra:0,modul:0,href:0,instal:0,should:0,regex:0,from:0,zip:0,memori:0,current_app:0,next:0,call:0,prev:0,type:0,reorder:0,more:0,upload_zip:0,peopl:0,relat:0,enhanc:0,accept:0,sorl:0,kmike:0,unpack:0,must:0,none:0,edit_imag:0,alia:[],setup:0,work:0,uniqu:0,annoi:0,archiv:0,can:0,existingfil:[],purpos:0,def:0,overrid:0,edit_form_class:0,want:0,process:0,view_us:[],templat:0,tag:0,smth:0,login_requir:[],wow:0,alwai:0,multipl:0,process_zip_fil:0,sever:0,instead:0,photoformset:0,clone:0,mai:0,infolist:0,data:0,exclud:0,issu:0,object_regex:0,allow:0,media:0,callabl:0,fallback:0,order:0,city_slug:0,becaus:0,clear_main_imag:0,"0x1a1caf0":[],paramet:0,write:0,thank:0,img:0,better:0,complex:0,media_root:0,main:0,edit_album:0,good:[],"return":0,thei:0,python:0,safe:0,dai:0,auth:0,mention:[],uploadzipform:0,name:0,get_plac:0,edit:0,photoalbumssit:0,revers:0,each:0,attachedimag:0,show_imag:0,chunk:0,process_fil:0,runtest:[],meta:0,my_fixtur:0,year:0,extract:0,special:0,album:0,upload_imag:0,test_auth_view:0,content:[],modelform:0,correct:0,common:0,namelist:0,urlpattern:0,insid:0,empty_permit:[],base:0,org:0,caption:0,place:0,temporari:0,assign:0,urlconf:0,lambda:0,info:0,instance_nam:0,template_nam:[],onc:0,number:0,hook:0,alreadi:0,installed_app:0,size:0,auto_id:[],differ:0,show_album:0,system:0,least:0,tou:0,attach:0,"0x1a1aaf0":[],test_forbidden_view:0,scheme:[],zipfil:0,store:0,modelformset_factori:0,option:0,namespac:0,copi:0,setuptool:0,kind:0,instanc:0,provid:0,project:0,success_url:0,initi:[],"0x1a14af0":[],queryset:0,ani:0,testcas:0,have:0,tabl:0,need:0,dedic:0,django:0,object_id:0,note:0,also:0,indic:[],necesseri:0,album_sit:0,endfor:0,usernam:0,object:0,compress:0,galleri:0,label_suffix:[],regular:0,deploi:0,lookup_field:0,"class":0,"_build":[],don:0,url:0,doc:0,request:0,doe:0,"100x50":0,enctyp:0,"64k":0,show:0,get_template_nam:[],model_nam:0,permiss:0,anywai:0,filefield:[],redirect:0,onli:0,explicitli:0,solut:0,temporary_file_path:[],dict:0,folder:0,extra_context:0,custom:0,variou:0,get:0,delete_imag:0,express:0,set_as_main_imag:0,report:0,requir:0,useralbumtest:0,attachedimageformformset:[],is_valid_imag:0,stuff:0,integr:0,contain:0,where:0,view:0,set:0,methodnam:[],see:0,multipart:0,arg:0,corrupt:0,close:[],modelformset:0,uploadzipalbumform:0,statu:0,correctli:0,pattern:0,someth:0,thumb:[],clean_zip_fil:0,won:0,"import":0,thumbnail:0,attribut:0,extend:[],image_id:0,entir:0,addit:0,behaviour:0,extens:0,admin:0,etc:0,excluded_view:0,context:0,com:[],load:0,inspir:[],upload_formset_class:0,reorder_imag:0,non:0,assum:0,files_count:0,city__slug:0,mark:0,basic:0,object_gett:0,imag:0,bulk:0,input:0,look:0,defin:0,fixtur:0,endblock:[],pack:0,them:0,my_object_slug:0,kwarg:0,"__init__":[],decor:[],develop:0,welcom:0,perform:0,suggest:0,make:0,same:[],html:0,document:0,complet:0,http:0,action:0,rais:0,album_us:0,user:0,extern:0,test_help:0,upload_main_imag:0,exampl:0,thi:0,album_for_kwarg:0,model:0,file_num:0,usual:0,photo:0,test_public_view:0,test_util:0,thees:[],easi:0,except:0,param:0,add:0,is_valid:0,els:0,save:0,app:0,applic:0,photoalbumsit:0,which:0,read:0,big:0,password:0,template_object_nam:0,like:0,success:0,resolv:0,"0x1a1baf0":[],albumtest:0,album_for_id:0,necessari:0,photologu:[],page:[],test_reord:0,creation:0,some:0,syncdb:0,librari:[],total:0,confirm:0,chunksiz:0,"0x1a19b70":[],tracker:0,pluggablesit:[],imageeditform:0,id_:[],previou:0,run:0,uncompress:0,usag:0,step:0,post:0,viewtest:0,slug:0,plug:0,src:0,obj:0,would:0,manag:0,user_imag:0,dialog:0,constructor:0,image_in_other_album_id:0,userprofile__slug:0,other:0,block:0,image2_in_album_id:0,photo_smal:[],set_image_ord:0,easy_instal:0,automat:0,your:0,per:0,submit:0,formset:0,avail:0,start:0,attachedimageform:0,includ:0,suit:0,"function":0,form:0,link:0,"true":0,bug:0,count:0,needs_unpack:0,possibl:0,"default":0,autoclass:[],googlecod:[],displai:0,below:0,site:0,otherwis:0,confirm_delet:0,app_nam:0,featur:0,pil:0,creat:0,"0x1a1bb70":[],dure:0,exist:0,file:0,pip:0,check:0,"_custom_url_schem":[],field:0,valid:0,lookup:0,test:0,you:0,variabl:0,image_in_album_id:0,get_profil:[],svn:0,"0x1a19bb0":[],bitbucket:0,directori:0,rule:0,generic_imag:0,generic_util:0},titles:["django-photo-albums&#8217;s documentation"],modules:{"photo_albums.views":0,"photo_albums.urls":0,"photo_albums.forms":0,"photo_albums.test_utils":0},descrefs:{"photo_albums.test_utils.AlbumTest":{username:[0,0],album_for_id:[0,0],image_in_other_album_id:[0,0],excluded_views:[0,0],test_auth_views:[0,2],image_in_album_id:[0,0],album_site:[0,0],test_public_views:[0,2],test_reorder:[0,2],test_forbidden_views:[0,2],fixtures:[0,0],password:[0,0],album_for_kwargs:[0,0],check:[0,2],image2_in_album_id:[0,0]},"photo_albums.urls":{PhotoAlbumSite:[0,1]},"photo_albums.forms.UploadZipForm":{process_zip_file:[0,2],clean_zip_file:[0,2],process_file:[0,2],needs_unpacking:[0,2]},"photo_albums.forms":{UploadZipAlbumForm:[0,1],UploadZipForm:[0,1]},"photo_albums.views":{upload_images:[0,0],edit_album:[0,0],set_as_main_image:[0,0],upload_zip:[0,0],edit_image:[0,0],upload_main_image:[0,0],delete_image:[0,0],show_album:[0,3],show_image:[0,3],clear_main_image:[0,0]},"photo_albums.test_utils":{AlbumTest:[0,1]},"photo_albums.forms.photo_albums.forms":{PhotoFormSet:[0,1],ImageEditForm:[0,1]},"photo_albums.forms.UploadZipAlbumForm":{is_valid_image:[0,2],process_file:[0,2],needs_unpacking:[0,2]}},filenames:["index"]})
 # The short X.Y version.
 version = '0.20'
 # The full version, including alpha/beta/rc tags.
-release = '0.20'
+release = '0.20.3'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
    sphinx-quickstart on Fri Sep 18 05:13:19 2009.
    You can adapt this file completely to your liking, but it should at least
    contain the root `toctree` directive.
-   
+
 .. toctree::
    :maxdepth: 2
-   
+
 ==============================================
 django-photo-albums's documentation
 ==============================================
-   
+
 django-photo-albums is a pluggable django image gallery app.
 
-Image galleries can be attached to any Django model. And thanks to 
-django 1.1 url namespaces it is possible to have multiple 'albums' app 
-instances (for example, for different models) that use different sets of 
-templates, different permission rules, have dedicated integration test suites 
+Image galleries can be attached to any Django model. And thanks to
+django 1.1 url namespaces it is possible to have multiple 'albums' app
+instances (for example, for different models) that use different sets of
+templates, different permission rules, have dedicated integration test suites
 and are available from different urls.
 
-Each image gallery provide functionality for image viewing, editing, 
-uploading, uploading entire albums in one zip file, reordering, 
+Each image gallery provide functionality for image viewing, editing,
+uploading, uploading entire albums in one zip file, reordering,
 marking/unmarking as main and deleting.
 
-django-photo-albums requires Django >= 1.1 (or svn version with 
-url namespaces), setuptools for installation, django-generic-images 
-for image management and django-annoying. django-generic-images and
-django-annoying will be installed automatically if you install 
-django-photo-albums via easy_install or pip.
+django-photo-albums is an application based on
+`django-generic-images <http://bitbucket.org/kmike/django-generic-images/>`_ .
+django-photo-albums requires Django >= 1.1 (or svn version with
+url namespaces), setuptools for installation, django-annoying for some utils and
+django-generic-images for image management and advanced admin image uploader.
+django-generic-images and django-annoying will be installed automatically if
+you install django-photo-albums via easy_install  or pip.
 
 django-photo-albums does not provide any thumbnail creation solution because
-there are external django apps (such as sorl-thumbnail) that would do this 
-better. 
+there are external django apps (such as sorl-thumbnail) that would do this
+better.
 
-Testing if app instance is integrated correctly (at least that templates 
-don't raise exceptions) is easy because base class for integration testcases 
+Testing if app instance is integrated correctly (at least that templates
+don't raise exceptions) is easy because base class for integration testcases
 is provided.
 
+
 ************
 Installation
 ************
 ::
 
-	$ pip install django-photo-albums
+    $ pip install django-photo-albums
 
 or::
 
-	$ easy_install django-photo-albums
+    $ easy_install django-photo-albums
 
 or::
 
-	$ hg clone http://bitbucket.org/kmike/django-photo-albums/ 
-	$ cd django-photo-albums
-	$ python setup.py install
+    $ hg clone http://bitbucket.org/kmike/django-photo-albums/
+    $ cd django-photo-albums
+    $ python setup.py install
 
-Then add 'photo_albums' and 'generic_images' to your ``INSTALLED_APPS`` in 
-settings.py and run ``./manage.py syncdb`` (syncdb is not needed if 
+Then add 'photo_albums' and 'generic_images' to your ``INSTALLED_APPS`` in
+settings.py and run ``./manage.py syncdb`` (syncdb is not needed if
 django-generic-images was already installed).
-   
+
+Note: django-generic-images app provides admin image uploader (see more in
+`django-generic-images docs <http://django-generic-images.googlecode.com/hg/docs/_build/html/index.html#admin>`_ ).
+For this admin uploader to work ``generic_images`` folder from
+``generic_images/media/`` should be copied to project's ``MEDIA_ROOT``.
+
+
 *********
 Basic use
 *********
 
 .. automodule:: photo_albums.urls
 
-	.. autoclass:: photo_albums.urls.PhotoAlbumSite()
-		
-	
+    .. autoclass:: photo_albums.urls.PhotoAlbumSite()
+
+
 
 Templates used by django-photo-albums
 =====================================
 
-Templates usually should be placed in ``templates/albums/<app_name>/`` folder. 
-App_name should be the name of queryset model's app as it appears in contenttypes 
+Templates usually should be placed in ``templates/albums/<app_name>/`` folder.
+App_name should be the name of queryset model's app as it appears in contenttypes
 table (e.g. 'auth' for User). It is possible to override templates per-model
-(by placing them in ``templates/albums/<app_name>/<model_name>/`` folder) or to 
-have a kind of default fallback templates for several apps (by placing them in 
+(by placing them in ``templates/albums/<app_name>/<model_name>/`` folder) or to
+have a kind of default fallback templates for several apps (by placing them in
 ``templates/albums/`` folder).
 
 Common context
 
 Each view have at least 2 variables in context:
 
-* ``<template_object_name>``: object for which gallery is attached to (the name 
-    of variable is set in PhotoAlbumsSite constructor 
-    (:ref:`here<template_object_name>`), default is ``'object'``)	
-	
+* ``<template_object_name>``: object for which gallery is attached to (the name
+    of variable is set in PhotoAlbumsSite constructor
+    (:ref:`here<template_object_name>`), default is ``'object'``)
+
 * ``current_app``: app name, ``'albums'`` by default
 
 
 
 * ``edit_album.html`` displays entire album. Used by edit_album view.
 
-* ``reorder_images.html`` displays entire album. Used by reorder_images view. 
-	These 3 templates have ``images`` variable in context with iterable of all 
-	images in gallery. 
-	
+* ``reorder_images.html`` displays entire album. Used by reorder_images view.
+    These 3 templates have ``images`` variable in context with iterable of all
+    images in gallery.
+
 Example::
-	
+
     {% for image in images %}
         <img src='{{ image.image }}' alt='{{image.caption}}'>
     {% endfor %}
-    
+
 With sorl-thumbnail::
-    
+
     {% for image in images %}
         <img src='{% thumbnail image.image 100x50 %}' alt='{{ image.caption }}'>
     {% endfor %}
-	
 
-* ``show_image.html`` - displays one image. Has ``image``, ``prev`` and ``next`` 
-	variables in context. ``prev`` and ``next`` are id's of previous and next 
-	(by image.order field) images in gallery.
 
-* ``edit_image.html`` - displays one image for editing purposes. Has ``form``, 
-    ``image``, ``prev`` and ``next`` variables in context. ``prev`` and ``next`` 
-    are id's of previous and next (by image.order field) images in gallery. 
+* ``show_image.html`` - displays one image. Has ``image``, ``prev`` and ``next``
+    variables in context. ``prev`` and ``next`` are id's of previous and next
+    (by image.order field) images in gallery.
+
+* ``edit_image.html`` - displays one image for editing purposes. Has ``form``,
+    ``image``, ``prev`` and ``next`` variables in context. ``prev`` and ``next``
+    are id's of previous and next (by image.order field) images in gallery.
     ``form`` is a form of :ref:`edit_form_class<edit_form_class>` class.
 
 Example::
-    
+
     <img src='{{ image.image }}' alt='{{image.caption}}'>
-    
+
     <a href='{% url user_images:edit_image album_user.id prev %}'>previous image</a>
     <a href='{% url user_images:edit_image album_user.id next %}'>next image</a>
-    
+
     <form action='' method='POST'>
         {{ form }}
         <input type='submit' value='Save'>
     </form>
 
 
-* ``upload_images.html`` - displays the formset for bulk image upload. 
-	Formset is of :ref:`upload_formset_class<upload_formset_class>` class and is 
-	available as ``formset`` context variable. 
-	
+* ``upload_images.html`` - displays the formset for bulk image upload.
+    Formset is of :ref:`upload_formset_class<upload_formset_class>` class and is
+    available as ``formset`` context variable.
+
 Example::
 
     <form action="" method="POST" enctype="multipart/form-data">
         {{ formset }}
         <input type="submit" value="Upload images">
-    </form>    
-    	
+    </form>
 
-* ``upload_main_image.html`` - displays form for uploading one image. Uploaded 
-	image becomes main in gallery. Has ``form`` in context, it's a form of type 
-	:ref:`upload_form_class<upload_form_class>`.
-	
+
+* ``upload_main_image.html`` - displays form for uploading one image. Uploaded
+    image becomes main in gallery. Has ``form`` in context, it's a form of type
+    :ref:`upload_form_class<upload_form_class>`.
+
 * ``upload_zip.html`` - displays form for uploading zip archive with images.
-    Has ``form`` in context, it's a form of type 
+    Has ``form`` in context, it's a form of type
     :ref:`upload_zip_form_class<upload_zip_form_class>`
 
-* ``confirm_delete.html`` - displays confirmation dialog for deleting image. 
-	Has ``image`` in context. Should have a form that do POST request to delete 
-	view on submit.
-	
-	
+* ``confirm_delete.html`` - displays confirmation dialog for deleting image.
+    Has ``image`` in context. Should have a form that do POST request to delete
+    view on submit.
+
+
 Views
 =====
 
 .. automodule:: photo_albums.views
-	:members:
-	:undoc-members:
-	
+    :members:
+    :undoc-members:
+
 Forms
 =====
 
 .. automodule:: photo_albums.forms
 
     .. class:: photo_albums.forms.ImageEditForm()
-        
-        ::    
+
+        ::
 
             class ImageEditForm(forms.ModelForm):
                 class Meta:
                     model = AttachedImage
                     fields = ['caption']
-    
-    
+
+
     .. _photoformset:
-    
+
     .. class:: photo_albums.forms.PhotoFormSet
-    
+
         ``modelformset_factory(AttachedImage, extra=3, fields = ['image', 'caption'])``
 
     .. autoclass:: photo_albums.forms.UploadZipForm()
         :members:
-        
+
     .. autoclass:: photo_albums.forms.UploadZipAlbumForm
         :members:
         :show-inheritance:
-        
+
     Example::
-    
+
         if request.method == 'POST':
             form = UploadZipAlbumForm(request.user, obj, request.POST, request.FILES)
             if form.is_valid():
                 form.process_zip_file()
                 success_url = album_site.reverse('show_album', args=[object_id])
-                return HttpResponseRedirect(success_url)        
+                return HttpResponseRedirect(success_url)
         else:
             form = UploadZipAlbumForm(request.user, obj)
-        
-            
-    
+
+
+
 
 *******
 Testing
 
 Integration testing
 ===================
-	
+
 .. automodule:: photo_albums.test_utils
     :show-inheritance:
     :members:
     :undoc-members:
-	
+
 Bugs
 ====
 

photo_albums/locale/en/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-09-24 21:49+0600\n"
+"POT-Creation-Date: 2009-10-18 05:22+0600\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"

photo_albums/locale/ru/LC_MESSAGES/django.po

 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-09-24 21:49+0600\n"
+"POT-Creation-Date: 2009-10-18 05:22+0600\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 #: forms.py:184
 msgid "Select a .zip file of images to upload."
 msgstr "Выберите zip-файл с фотографиями для загрузки."
-

photo_albums/urls.py

 #coding: utf-8
 '''
     To add image gallery for your model you should complete following steps:
-    
+
     1. Create album site instance and plug it's urls to urlconf::
-    
+
         from photo_albums.urls import PhotoAlbumSite
-        accounts_photo_site = PhotoAlbumSite(instance_name = 'user_images', 
-                                 queryset = User.objects.all(), 
+        accounts_photo_site = PhotoAlbumSite(instance_name = 'user_images',
+                                 queryset = User.objects.all(),
                                  template_object_name = 'album_user',
-                                 has_edit_permission = lambda request, obj: request.user==obj) 
+                                 has_edit_permission = lambda request, obj: request.user==obj)
         urlpatterns += patterns('', url(r'^accounts/', include(accounts_photo_site.urls)),)
-    
-    Please note that if you deploy multiple albums (ex. for different models), 
-    you must provide unique ``instance_name`` for each instance to make url 
+
+    Please note that if you deploy multiple albums (ex. for different models),
+    you must provide unique ``instance_name`` for each instance to make url
     reversing work.
-    
-    Included urls looks like ``<object_id>/<app_name>/<action>`` or 
+
+    Included urls looks like ``<object_id>/<app_name>/<action>`` or
     ``<object_id>/<app_name>/<image_id>/<action>``,
-    where object_id is the id of object which is gallery attached to, 
-    app_name is "album" by default (you can change it :ref:`here<app_name_param>`), 
-    image_id is image id :-) and action is the performed action (view, edit, etc). 
-    It is possible to use slug instead of object's id 
-    (look at ``object_regex`` and ``lookup_field`` :ref:`parameters<custom_url_scheme>`). 
-    
+    where object_id is the id of object which is gallery attached to,
+    app_name is "album" by default (you can change it :ref:`here<app_name_param>`),
+    image_id is image id :-) and action is the performed action (view, edit, etc).
+    It is possible to use slug instead of object's id
+    (look at ``object_regex`` and ``lookup_field`` :ref:`parameters<custom_url_scheme>`).
+
+    It is also possible to attach PhotoAlbumSite to any url using
+    :ref:`object_getter<object_getter>` parameter.
+
     2. Create the necessary templates.
-       
+
     3. Link people to image gallery using ``{% url .. %}`` template tags.
-    
+
     You can use these urls (assuming that ``user_images`` is an instance name,
-    ``album_user`` is the object for which gallery is attached to, ``image`` is an image 
+    ``album_user`` is the object for which gallery is attached to, ``image`` is an image
     in gallery and slugs are not used)::
-    
+
         {% url user_images:show_album album_user.id %}
-        
+
         {% url user_images:edit_album album_user.id %}
-        
+
         {% url user_images:upload_main_image album_user.id %}
-        
+
         {% url user_images:upload_images album_user.id %}
 
         {% url user_images:upload_zip album_user.id %}
-        
+
         {% url user_images:show_image album_user.id image.id %}
-        
+
         {% url user_images:edit_image album_user.id image.id %}
-        
+
         {% url user_images:delete_image album_user.id image.id %}
-        
+
         {% url user_images:set_as_main_image album_user.id image.id %}
-        
+
         {% url user_images:clear_main_image album_user.id image.id %}
-        
+
         {% url user_images:reorder_images album_user.id %}
-        
+
         {% url user_images:set_image_order album_user.id %}
-        
+
 '''
 
 from django.conf.urls.defaults import *
 from generic_images.forms import AttachedImageForm
 
 class PhotoAlbumSite(PluggableSite):
-    '''        
+    '''
     Constructor parameters:
-    
-    ``instance_name``: String. Required. App instance name for url 
+
+    ``instance_name``: String. Required. App instance name for url
     reversing. Must be unique.
-    
-    ``queryset``: QuerySet. Required. Albums will be attached to objects 
+
+    ``queryset``: QuerySet. Required. Albums will be attached to objects
     in this queryset.
-    
+
     .. _custom_url_scheme:
-    
-    ``object_regex``: String. Optional, default is ``'\d+'``. It should be a 
-    URL regular expression for object in URL. You should use smth. 
+
+    ``object_regex``: String. Optional, default is ``'\d+'``. It should be a
+    URL regular expression for object in URL. You should use smth.
     like ``'[\w\d-]+'`` for slugs.
-    
-    ``lookup_field``: String. Optional, default is ``'pk'``. It is a field 
-    name to lookup. It may contain ``__`` and follow relations 
+
+    ``lookup_field``: String. Optional, default is ``'pk'``. It is a field
+    name to lookup. It may contain ``__`` and follow relations
     (ex.: ``userprofile__slug``).
-    
+
     .. _app_name_param:
-    
-    ``app_name``: String. Optional, default value is ``'album'``. Used by url 
+
+    ``app_name``: String. Optional, default value is ``'album'``. Used by url
     namespaces stuff.
-    
-    ``extra_context``: Dict. Optional. Extra context that will be passed 
+
+    ``extra_context``: Dict. Optional. Extra context that will be passed
     to each view.
-   
+
    .. _template_object_name:
-    
-    ``template_object_name``: String. Optional. The name of template 
-    context variable with object for which album is attached. 
+
+    ``template_object_name``: String. Optional. The name of template
+    context variable with object for which album is attached.
     Default is ``'object'``.
-    
-    ``has_edit_permission``: Optional. Function that accepts request and 
-    object and returns True if user is allowed to edit album for 
-    object and False otherwise. Default behaviour is to always 
+
+    ``has_edit_permission``: Optional. Function that accepts request and
+    object and returns True if user is allowed to edit album for
+    object and False otherwise. Default behaviour is to always
     return True.
-    
-    ``context_processors``: Optional. A list of callables that will be 
-    used as additional context_processors in each view.    
+
+    ``context_processors``: Optional. A list of callables that will be
+    used as additional context_processors in each view.
+
+    .. _object_getter:
+
+    ``object_getter``: special function that returns object that PhotoAlbumSite
+    is attached to. It is special because it must have
+    explicitly assigned 'regex' attribute. This regex will be passed to django
+    URL system. Parameters from this regex will be then passed to object_getter
+    function.
+
+    Example::
+
+        def get_place(city_slug, place_slug):
+            return Place.objects.get(city__slug=city_slug, slug=place_slug)
+        get_place.regex = r'(?P<city_slug>[\w\d-]+)/(?P<place_slug>[\w\d-]+)'
+
 
     .. _edit_form_class:
-    
-    ``edit_form_class``: Optional, default is 
-    :class:`~photo_albums.forms.ImageEditForm`. ModelForm subclass to be used in 
+
+    ``edit_form_class``: Optional, default is
+    :class:`~photo_albums.forms.ImageEditForm`. ModelForm subclass to be used in
     :func:`~photo_albums.views.edit_image` view.
-    
+
     .. _upload_form_class:
-    
-    ``upload_form_class``: Optional, default is ``AttachedImageForm`` (defined in 
-    ``generic_images.forms`` module). ModelForm subclass to be used in 
+
+    ``upload_form_class``: Optional, default is ``AttachedImageForm`` (defined in
+    ``generic_images.forms`` module). ModelForm subclass to be used in
     :func:`~photo_albums.views.upload_main_image` view.
-    
+
     .. _upload_formset_class:
-    
-    ``upload_formset_class``: Optional, default is 
-    :ref:`PhotoFormSet<photoformset>`. ModelFormSet to be used in 
+
+    ``upload_formset_class``: Optional, default is
+    :ref:`PhotoFormSet<photoformset>`. ModelFormSet to be used in
     :func:`~photo_albums.views.upload_images` view.
-    
+
     .. _upload_zip_form_class:
-    
-    ``upload_zip_form_class``: Optional, default is 
-    :class:`~photo_albums.forms.UploadZipAlbumForm`. Form to be used in 
-    :func:`~photo_albums.views.upload_zip` view. 
-        
-    '''        
-    def __init__(self, 
-                 instance_name, 
+
+    ``upload_zip_form_class``: Optional, default is
+    :class:`~photo_albums.forms.UploadZipAlbumForm`. Form to be used in
+    :func:`~photo_albums.views.upload_zip` view.
+
+    '''
+    def __init__(self,
+                 instance_name,
                  app_name = 'album',
                  queryset = None,
                  object_regex = None,
                  lookup_field = None,
-                 extra_context=None, 
+                 extra_context=None,
                  template_object_name = 'object',
                  has_edit_permission = lambda request, obj: True,
-                 context_processors = None, 
+                 context_processors = None,
                  object_getter = None,
                  edit_form_class = ImageEditForm,
                  upload_form_class = AttachedImageForm,
                  upload_formset_class = PhotoFormSet,
                  upload_zip_form_class = UploadZipAlbumForm
                 ):
-                            
+
         self.edit_form_class = edit_form_class
         self.upload_form_class = upload_form_class
         self.upload_formset_class = upload_formset_class
         self.upload_zip_form_class = upload_zip_form_class
-            
+
         super(PhotoAlbumSite, self).__init__(instance_name, app_name, queryset,
                                              object_regex, lookup_field,
                                              extra_context, template_object_name,
-                                             has_edit_permission, context_processors, 
+                                             has_edit_permission, context_processors,
                                              object_getter)
-                
+
     def patterns(self):
         return patterns('photo_albums.views',
-                        
+
                         #album-level views
                         url(
                             self.make_regex(r'/'),
-                            'show_album', 
+                            'show_album',
                             {'album_site': self},
                             name = 'show_album',
                         ),
                         url(
                             self.make_regex(r'/edit/'),
-                            'edit_album', 
+                            'edit_album',
                             {'album_site': self},
                             name = 'edit_album',
                         ),
                         url(
-                            self.make_regex(r'/upload-main/'),                            
+                            self.make_regex(r'/upload-main/'),
                             'upload_main_image',
                             {'album_site': self},
                             name = 'upload_main_image',
                             {'album_site': self},
                             name = 'upload_zip',
                         ),
-                        
-                        
+
+
                         #one image views
                         url(
                             self.make_regex(r'/(?P<image_id>\d+)/'),
                             {'album_site': self},
                             name = 'clear_main_image',
                         ),
-                                                
+
                         #reorder
                         url(
                             self.make_regex(r'/reorder/'),
-                            'edit_album', 
+                            'edit_album',
                             {'album_site': self, 'template_name': 'reorder_images.html'},
                             name = 'reorder_images',
                         ),
                         url(
                             self.make_regex(r'/set-image-order'),
-                            'set_image_order', 
+                            'set_image_order',
                             {'album_site': self},
                             name = 'set_image_order',
                         ),
-                    )                    
-   
+                    )
+
 
 setup(
       name='django-photo-albums',
-      version='0.20.2',
+      version='0.20.3',
       author='Mikhail Korobov',
       author_email='kmike84@gmail.com',
-      url='http://bitbucket.org/kmike/django-photo-albums/',      
-      
+      url='http://bitbucket.org/kmike/django-photo-albums/',
+
       description = 'Pluggable Django image gallery app.',
       license = 'MIT license',
       packages=['photo_albums', 'photo_albums.lib'],
-      package_data={'photo_albums': ['locale/en/LC_MESSAGES/*','locale/ru/LC_MESSAGES/*']},      
+      package_data={'photo_albums': ['locale/en/LC_MESSAGES/*','locale/ru/LC_MESSAGES/*']},
       include_package_data = True,
-      
+
       requires = ['django (>=1.1)'],
-      install_requires=['django-generic-images >= 0.30', 'django-annoying > 0.7'],
-      
+      install_requires=['django-generic-images >= 0.35', 'django-annoying > 0.7'],
+
       classifiers=[
           'Development Status :: 3 - Alpha',
           'Environment :: Web Environment',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.