Source

django-photo-albums / docs / _build / html / index.html

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <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.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.3 documentation" href="" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li><a href="">django-photo-albums v0.20.3 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <ul class="simple">
</ul>
<div class="section" id="django-photo-albums-s-documentation">
<h1>django-photo-albums&#8217;s documentation<a class="headerlink" href="#django-photo-albums-s-documentation" title="Permalink to this headline"></a></h1>
<p>django-photo-albums is a pluggable django image gallery app.</p>
<p>Image galleries can be attached to any Django model. And thanks to
django 1.1 url namespaces it is possible to have multiple &#8216;albums&#8217; 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.</p>
<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 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>Testing if app instance is integrated correctly (at least that templates
don&#8217;t raise exceptions) is easy because base class for integration testcases
is provided.</p>
<div class="section" id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h2>
<div class="highlight-python"><pre>$ pip install django-photo-albums</pre>
</div>
<p>or:</p>
<div class="highlight-python"><pre>$ easy_install django-photo-albums</pre>
</div>
<p>or:</p>
<div class="highlight-python"><pre>$ hg clone http://bitbucket.org/kmike/django-photo-albums/
$ cd django-photo-albums
$ python setup.py install</pre>
</div>
<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>
<div class="section" id="module-photo_albums.urls">
<h3>PhotoAlbumSite<a class="headerlink" href="#module-photo_albums.urls" title="Permalink to this headline"></a></h3>
<p>To add image gallery for your model you should complete following steps:</p>
<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">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">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
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
<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
(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
in gallery and slugs are not used):</p>
<div class="highlight-python"><pre>{% 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 %}</pre>
</div>
<dl class="class">
<dt id="photo_albums.urls.PhotoAlbumSite">
<em class="property">
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
reversing. Must be unique.</p>
<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.
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
(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
namespaces stuff.</p>
<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.
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
return True.</p>
<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="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>
<div class="section" id="templates-used-by-django-photo-albums">
<h3>Templates used by django-photo-albums<a class="headerlink" href="#templates-used-by-django-photo-albums" title="Permalink to this headline"></a></h3>
<p>Templates usually should be placed in <tt class="docutils literal"><span class="pre">templates/albums/&lt;app_name&gt;/</span></tt> folder.
App_name should be the name of queryset model&#8217;s app as it appears in contenttypes
table (e.g. &#8216;auth&#8217; for User). It is possible to override templates per-model
(by placing them in <tt class="docutils literal"><span class="pre">templates/albums/&lt;app_name&gt;/&lt;model_name&gt;/</span></tt> folder) or to
have a kind of default fallback templates for several apps (by placing them in
<tt class="docutils literal"><span class="pre">templates/albums/</span></tt> folder).</p>
<div class="section" id="common-context">
<h4>Common context<a class="headerlink" href="#common-context" title="Permalink to this headline"></a></h4>
<p>Each view have at least 2 variables in context:</p>
<ul>
<li><dl class="first docutils">
<dt><tt class="docutils literal"><span class="pre">&lt;template_object_name&gt;</span></tt>: object for which gallery is attached to (the name</dt>
<dd><p class="first last">of variable is set in PhotoAlbumsSite constructor
(<a class="reference" href="#template-object-name"><em>here</em></a>), default is <tt class="docutils literal"><span class="pre">'object'</span></tt>)</p>
</dd>
</dl>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">current_app</span></tt>: app name, <tt class="docutils literal"><span class="pre">'albums'</span></tt> by default</p>
</li>
</ul>
</div>
<div class="section" id="templates">
<h4>Templates<a class="headerlink" href="#templates" title="Permalink to this headline"></a></h4>
<p>The views included in django-photo-albums make use of these 9 templates:</p>
<ul>
<li><p class="first"><tt class="docutils literal"><span class="pre">show_album.html</span></tt> displays entire album</p>
</li>
<li><p class="first"><tt class="docutils literal"><span class="pre">edit_album.html</span></tt> displays entire album. Used by edit_album view.</p>
</li>
<li><dl class="first docutils">
<dt><tt class="docutils literal"><span class="pre">reorder_images.html</span></tt> displays entire album. Used by reorder_images view.</dt>
<dd><p class="first last">These 3 templates have <tt class="docutils literal"><span class="pre">images</span></tt> variable in context with iterable of all
images in gallery.</p>
</dd>
</dl>
</li>
</ul>
<p>Example:</p>
<div class="highlight-python"><pre>{% for image in images %}
    &lt;img src='{{ image.image }}' alt='{{image.caption}}'&gt;
{% endfor %}</pre>
</div>
<p>With sorl-thumbnail:</p>
<div class="highlight-python"><pre>{% for image in images %}
    &lt;img src='{% thumbnail image.image 100x50 %}' alt='{{ image.caption }}'&gt;
{% endfor %}</pre>
</div>
<ul>
<li><dl class="first docutils">
<dt><tt class="docutils literal"><span class="pre">show_image.html</span></tt> - displays one image. Has <tt class="docutils literal"><span class="pre">image</span></tt>, <tt class="docutils literal"><span class="pre">prev</span></tt> and <tt class="docutils literal"><span class="pre">next</span></tt></dt>
<dd><p class="first last">variables in context. <tt class="docutils literal"><span class="pre">prev</span></tt> and <tt class="docutils literal"><span class="pre">next</span></tt> are id&#8217;s of previous and next
(by image.order field) images in gallery.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><tt class="docutils literal"><span class="pre">edit_image.html</span></tt> - displays one image for editing purposes. Has <tt class="docutils literal"><span class="pre">form</span></tt>,</dt>
<dd><p class="first last"><tt class="docutils literal"><span class="pre">image</span></tt>, <tt class="docutils literal"><span class="pre">prev</span></tt> and <tt class="docutils literal"><span class="pre">next</span></tt> variables in context. <tt class="docutils literal"><span class="pre">prev</span></tt> and <tt class="docutils literal"><span class="pre">next</span></tt>
are id&#8217;s of previous and next (by image.order field) images in gallery.
<tt class="docutils literal"><span class="pre">form</span></tt> is a form of <a class="reference" href="#edit-form-class"><em>edit_form_class</em></a> class.</p>
</dd>
</dl>
</li>
</ul>
<p>Example:</p>
<div class="highlight-python"><pre>&lt;img src='{{ image.image }}' alt='{{image.caption}}'&gt;

&lt;a href='{% url user_images:edit_image album_user.id prev %}'&gt;previous image&lt;/a&gt;
&lt;a href='{% url user_images:edit_image album_user.id next %}'&gt;next image&lt;/a&gt;

&lt;form action='' method='POST'&gt;
    {{ form }}
    &lt;input type='submit' value='Save'&gt;
&lt;/form&gt;</pre>
</div>
<ul>
<li><dl class="first docutils">
<dt><tt class="docutils literal"><span class="pre">upload_images.html</span></tt> - displays the formset for bulk image upload.</dt>
<dd><p class="first last">Formset is of <a class="reference" href="#upload-formset-class"><em>upload_formset_class</em></a> class and is
available as <tt class="docutils literal"><span class="pre">formset</span></tt> context variable.</p>
</dd>
</dl>
</li>
</ul>
<p>Example:</p>
<div class="highlight-python"><pre>&lt;form action="" method="POST" enctype="multipart/form-data"&gt;
    {{ formset }}
    &lt;input type="submit" value="Upload images"&gt;
&lt;/form&gt;</pre>
</div>
<ul>
<li><dl class="first docutils">
<dt><tt class="docutils literal"><span class="pre">upload_main_image.html</span></tt> - displays form for uploading one image. Uploaded</dt>
<dd><p class="first last">image becomes main in gallery. Has <tt class="docutils literal"><span class="pre">form</span></tt> in context, it&#8217;s a form of type
<a class="reference" href="#upload-form-class"><em>upload_form_class</em></a>.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><tt class="docutils literal"><span class="pre">upload_zip.html</span></tt> - displays form for uploading zip archive with images.</dt>
<dd><p class="first last">Has <tt class="docutils literal"><span class="pre">form</span></tt> in context, it&#8217;s a form of type
<a class="reference" href="#upload-zip-form-class"><em>upload_zip_form_class</em></a></p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><tt class="docutils literal"><span class="pre">confirm_delete.html</span></tt> - displays confirmation dialog for deleting image.</dt>
<dd><p class="first last">Has <tt class="docutils literal"><span class="pre">image</span></tt> in context. Should have a form that do POST request to delete
view on submit.</p>
</dd>
</dl>
</li>
</ul>
</div>
</div>
<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>
<dl class="class">
<dt id="photo_albums.forms.photo_albums.forms.ImageEditForm">
<em class="property">
class </em><tt class="descclassname">photo_albums.forms.</tt><tt class="descname">ImageEditForm</tt><a class="headerlink" href="#photo_albums.forms.photo_albums.forms.ImageEditForm" title="Permalink to this definition"></a></dt>
<dd><div class="highlight-python"><div class="highlight"><pre><span class="k">class</span> <span class="nc">ImageEditForm</span><span class="p">(</span><span class="n">forms</span><span class="o">.</span><span class="n">ModelForm</span><span class="p">):</span>
    <span class="k">class</span> <span class="nc">Meta</span><span class="p">:</span>
        <span class="n">model</span> <span class="o">=</span> <span class="n">AttachedImage</span>
        <span class="n">fields</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;caption&#39;</span><span class="p">]</span>
</pre></div>
</div>
</dd></dl>

<span class="target" id="photoformset"></span><dl class="class">
<dt id="photo_albums.forms.photo_albums.forms.PhotoFormSet">
<em class="property">
class </em><tt class="descclassname">photo_albums.forms.</tt><tt class="descname">PhotoFormSet</tt><a class="headerlink" href="#photo_albums.forms.photo_albums.forms.PhotoFormSet" title="Permalink to this definition"></a></dt>
<dd><tt class="docutils literal"><span class="pre">modelformset_factory(AttachedImage,</span> <span class="pre">extra=3,</span> <span class="pre">fields</span> <span class="pre">=</span> <span class="pre">['image',</span> <span class="pre">'caption'])</span></tt></dd></dl>

<dl class="class">
<dt id="photo_albums.forms.UploadZipForm">
<em class="property">
class </em><tt class="descclassname">photo_albums.forms.</tt><tt class="descname">UploadZipForm</tt><a class="headerlink" href="#photo_albums.forms.UploadZipForm" title="Permalink to this definition"></a></dt>
<dd><p>A base form class for uploading several files packed as one .zip file.
Extract files and provides hook for processing extracted files.
During extraction it loads uncompressed files to memory by chunks so it
is safe to process zip archives with big files inside.</p>
<dl class="method">
<dt id="photo_albums.forms.UploadZipForm.clean_zip_file">
<tt class="descname">clean_zip_file</tt><big>(</big><big>)</big><a class="headerlink" href="#photo_albums.forms.UploadZipForm.clean_zip_file" title="Permalink to this definition"></a></dt>
<dd>Checks if zip file is not corrupted, stores in-memory uploaded file
to disk and returns path to stored file.</dd></dl>

<dl class="method">
<dt id="photo_albums.forms.UploadZipForm.needs_unpacking">
<tt class="descname">needs_unpacking</tt><big>(</big><em>name</em>, <em>info</em><big>)</big><a class="headerlink" href="#photo_albums.forms.UploadZipForm.needs_unpacking" title="Permalink to this definition"></a></dt>
<dd>Returns True is file should be extracted from zip and
False otherwise. Override in subclass to customize behaviour.
Default is to unpack all files except directories and meta files
(names starts with &#8216;__&#8217;) .</dd></dl>

<dl class="method">
<dt id="photo_albums.forms.UploadZipForm.process_file">
<tt class="descname">process_file</tt><big>(</big><em>path</em>, <em>name</em>, <em>info</em>, <em>file_num</em>, <em>files_count</em><big>)</big><a class="headerlink" href="#photo_albums.forms.UploadZipForm.process_file" title="Permalink to this definition"></a></dt>
<dd><p>Override this in subclass to do something useful with files extracted
from uploaded zip archive.</p>
<p>Params:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">path</span></tt>: path to temporary file. It&#8217;s on developer to delete this file.</li>
<li><tt class="docutils literal"><span class="pre">name</span></tt>: name of file in zip archive, returned by ZipFile.namelist()</li>
<li><tt class="docutils literal"><span class="pre">info</span></tt>: file info, returned by ZipFile.infolist()</li>
<li><tt class="docutils literal"><span class="pre">file_num</span></tt>: file&#8217;s order number</li>
<li><tt class="docutils literal"><span class="pre">files_count</span></tt>: total files count</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="photo_albums.forms.UploadZipForm.process_zip_file">
<tt class="descname">process_zip_file</tt><big>(</big><em>chunksize=65536</em><big>)</big><a class="headerlink" href="#photo_albums.forms.UploadZipForm.process_zip_file" title="Permalink to this definition"></a></dt>
<dd><p>Extract all files to temporary place and call process_file method
for each.</p>
<p><tt class="docutils literal"><span class="pre">chunksize</span></tt> is the size of block in which compressed files are
read. Default is 64k. Do not set it below 64k because data from
compressed files will be read in blocks &gt;= 64k anyway.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="photo_albums.forms.UploadZipAlbumForm">
<em class="property">
class </em><tt class="descclassname">photo_albums.forms.</tt><tt class="descname">UploadZipAlbumForm</tt><big>(</big><em>user</em>, <em>obj</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#photo_albums.forms.UploadZipAlbumForm" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a title="photo_albums.forms.UploadZipForm" class="reference" href="#photo_albums.forms.UploadZipForm"><tt class="xref docutils literal"><span class="pre">photo_albums.forms.UploadZipForm</span></tt></a></p>
<p>Form for uploading several images packed as one .zip file.
Only valid images are stored. Uploaded images are marked as uploaded
by <tt class="docutils literal"><span class="pre">user</span></tt> and are attached to <tt class="docutils literal"><span class="pre">obj</span></tt> model.</p>
<dl class="method">
<dt id="photo_albums.forms.UploadZipAlbumForm.is_valid_image">
<tt class="descname">is_valid_image</tt><big>(</big><em>path</em><big>)</big><a class="headerlink" href="#photo_albums.forms.UploadZipAlbumForm.is_valid_image" title="Permalink to this definition"></a></dt>
<dd>Check if file is readable by PIL.</dd></dl>

<dl class="method">
<dt id="photo_albums.forms.UploadZipAlbumForm.needs_unpacking">
<tt class="descname">needs_unpacking</tt><big>(</big><em>name</em>, <em>info</em><big>)</big><a class="headerlink" href="#photo_albums.forms.UploadZipAlbumForm.needs_unpacking" title="Permalink to this definition"></a></dt>
<dd>Returns True is file should be extracted from zip and
False otherwise. Override in subclass to customize behaviour.
Default is to skip directories, meta files
(names starts with <tt class="docutils literal"><span class="pre">'__'</span></tt>) and files with non-image extensions.</dd></dl>

<dl class="method">
<dt id="photo_albums.forms.UploadZipAlbumForm.process_file">
<tt class="descname">process_file</tt><big>(</big><em>path</em>, <em>name</em>, <em>info</em>, <em>file_num</em>, <em>files_count</em><big>)</big><a class="headerlink" href="#photo_albums.forms.UploadZipAlbumForm.process_file" title="Permalink to this definition"></a></dt>
<dd>Create AttachedImage instance if file is a valid image.</dd></dl>

</dd></dl>

<p>Example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">if</span> <span class="n">request</span><span class="o">.</span><span class="n">method</span> <span class="o">==</span> <span class="s">&#39;POST&#39;</span><span class="p">:</span>
    <span class="n">form</span> <span class="o">=</span> <span class="n">UploadZipAlbumForm</span><span class="p">(</span><span class="n">request</span><span class="o">.</span><span class="n">user</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">POST</span><span class="p">,</span> <span class="n">request</span><span class="o">.</span><span class="n">FILES</span><span class="p">)</span>
    <span class="k">if</span> <span class="n">form</span><span class="o">.</span><span class="n">is_valid</span><span class="p">():</span>
        <span class="n">form</span><span class="o">.</span><span class="n">process_zip_file</span><span class="p">()</span>
        <span class="n">success_url</span> <span class="o">=</span> <span class="n">album_site</span><span class="o">.</span><span class="n">reverse</span><span class="p">(</span><span class="s">&#39;show_album&#39;</span><span class="p">,</span> <span class="n">args</span><span class="o">=</span><span class="p">[</span><span class="n">object_id</span><span class="p">])</span>
        <span class="k">return</span> <span class="n">HttpResponseRedirect</span><span class="p">(</span><span class="n">success_url</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
    <span class="n">form</span> <span class="o">=</span> <span class="n">UploadZipAlbumForm</span><span class="p">(</span><span class="n">request</span><span class="o">.</span><span class="n">user</span><span class="p">,</span> <span class="n">obj</span><span class="p">)</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="testing">
<h2>Testing<a class="headerlink" href="#testing" title="Permalink to this headline"></a></h2>
<div class="section" id="module-photo_albums.test_utils">
<h3>Integration testing<a class="headerlink" href="#module-photo_albums.test_utils" title="Permalink to this headline"></a></h3>
<p>django-photo-albums provides base class (photo_albums.test_utils.AlbumTest) 
for writing integration tests for app instances.</p>
<p>The example usage:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">accounts.urls</span> <span class="kn">import</span> <span class="n">accounts_photo_site</span>
<span class="kn">from</span> <span class="nn">photo_albums</span> <span class="kn">import</span> <span class="n">test_utils</span>

<span class="k">class</span> <span class="nc">UserAlbumTest</span><span class="p">(</span><span class="n">test_utils</span><span class="o">.</span><span class="n">AlbumTest</span><span class="p">):</span>
    <span class="c"># existing user&#39;s data</span>
    <span class="n">username</span> <span class="o">=</span> <span class="s">&#39;obiwanus&#39;</span> 
    <span class="n">password</span> <span class="o">=</span> <span class="s">&#39;vasia&#39;</span>
    
    <span class="c"># fixtures to be loaded (at least with users, images and </span>
    <span class="c"># objects with galleries)</span>
    <span class="n">fixtures</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;my_fixtures&#39;</span><span class="p">]</span>
    
    <span class="c"># app instance which is to be tested</span>
    <span class="n">album_site</span> <span class="o">=</span> <span class="n">accounts_photo_site</span>
    
    <span class="c"># we don&#39;t need edit_image view and don&#39;t create template for it</span>
    <span class="c"># so it should be excluded from testing</span>
    <span class="n">excluded_views</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;edit_image&#39;</span><span class="p">]</span>
    
    <span class="c"># id of object for which album is attached</span>
    <span class="n">album_for_id</span> <span class="o">=</span> <span class="mf">4</span>
                
    <span class="c"># if slugs are in use:</span>
    <span class="c"># album_for_id = &#39;my_object_slug&#39;</span>
    
    <span class="c"># if object_getter is in use:</span>
    <span class="c"># album_for_kwargs = {&#39;year&#39;: 2009, &#39;month&#39;: 12, &#39;day&#39;: 5, &#39;slug&#39;: &#39;wow&#39;}                        </span>
    
    <span class="c"># id&#39;s of various images: 2 images in album (second is nedded if you</span>
    <span class="c"># want to test reordering) and one image in other album to test</span>
    <span class="c"># permission checks</span>
    <span class="n">image_in_album_id</span> <span class="o">=</span> <span class="mf">48</span>
    <span class="n">image2_in_album_id</span> <span class="o">=</span> <span class="mf">66</span>
    <span class="n">image_in_other_album_id</span> <span class="o">=</span> <span class="mf">42</span>    
</pre></div>
</div>
<p>If you don&#8217;t use fixtures you can override setUp method and create necessery 
objects there.</p>
<dl class="class">
<dt id="photo_albums.test_utils.AlbumTest">
<em class="property">
class </em><tt class="descclassname">photo_albums.test_utils.</tt><tt class="descname">AlbumTest</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#photo_albums.test_utils.AlbumTest" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref docutils literal"><span class="pre">generic_utils.test_helpers.ViewTest</span></tt></p>
<dl class="method">
<dt id="photo_albums.test_utils.AlbumTest.check">
<tt class="descname">check</tt><big>(</big><em>view</em>, <em>status</em>, <em>kwargs=None</em><big>)</big><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.check" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="photo_albums.test_utils.AlbumTest.test_auth_views">
<tt class="descname">test_auth_views</tt><big>(</big><big>)</big><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.test_auth_views" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="photo_albums.test_utils.AlbumTest.test_forbidden_views">
<tt class="descname">test_forbidden_views</tt><big>(</big><big>)</big><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.test_forbidden_views" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="photo_albums.test_utils.AlbumTest.test_public_views">
<tt class="descname">test_public_views</tt><big>(</big><big>)</big><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.test_public_views" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="photo_albums.test_utils.AlbumTest.test_reorder">
<tt class="descname">test_reorder</tt><big>(</big><big>)</big><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.test_reorder" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="photo_albums.test_utils.AlbumTest.album_for_id">
<tt class="descname">album_for_id</tt><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.album_for_id" title="Permalink to this definition"></a></dt>
<dd>object id (or slug) for which album is attached to</dd></dl>

<dl class="attribute">
<dt id="photo_albums.test_utils.AlbumTest.album_for_kwargs">
<tt class="descname">album_for_kwargs</tt><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.album_for_kwargs" title="Permalink to this definition"></a></dt>
<dd>object url resolver kwargs (for more complex object urls)</dd></dl>

<dl class="attribute">
<dt id="photo_albums.test_utils.AlbumTest.album_site">
<tt class="descname">album_site</tt><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.album_site" title="Permalink to this definition"></a></dt>
<dd><tt class="docutils literal"><span class="pre">PhotoAlbumSite</span></tt> instance to be tested</dd></dl>

<dl class="attribute">
<dt id="photo_albums.test_utils.AlbumTest.excluded_views">
<tt class="descname">excluded_views</tt><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.excluded_views" title="Permalink to this definition"></a></dt>
<dd>a list of names of excluded views. Excluded views won&#8217;t be tested.</dd></dl>

<dl class="attribute">
<dt id="photo_albums.test_utils.AlbumTest.fixtures">
<tt class="descname">fixtures</tt><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.fixtures" title="Permalink to this definition"></a></dt>
<dd>fixtures to be loaded (at least with users, images and
objects with galleries)</dd></dl>

<dl class="attribute">
<dt id="photo_albums.test_utils.AlbumTest.image2_in_album_id">
<tt class="descname">image2_in_album_id</tt><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.image2_in_album_id" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="photo_albums.test_utils.AlbumTest.image_in_album_id">
<tt class="descname">image_in_album_id</tt><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.image_in_album_id" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="photo_albums.test_utils.AlbumTest.image_in_other_album_id">
<tt class="descname">image_in_other_album_id</tt><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.image_in_other_album_id" title="Permalink to this definition"></a></dt>
<dd>id&#8217;s of various images: 2 images in album (second is nedded if tou
want to test reordering) and one image in other album to test
permission checks</dd></dl>

<dl class="attribute">
<dt id="photo_albums.test_utils.AlbumTest.password">
<tt class="descname">password</tt><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.password" title="Permalink to this definition"></a></dt>
<dd>existing user&#8217;s password</dd></dl>

<dl class="attribute">
<dt id="photo_albums.test_utils.AlbumTest.username">
<tt class="descname">username</tt><a class="headerlink" href="#photo_albums.test_utils.AlbumTest.username" title="Permalink to this definition"></a></dt>
<dd>existing user&#8217;s username</dd></dl>

</dd></dl>

</div>
<div class="section" id="bugs">
<h3>Bugs<a class="headerlink" href="#bugs" title="Permalink to this headline"></a></h3>
<p>Issue tracker is here: <a class="reference" href="http://bitbucket.org/kmike/django-photo-albums/issues/">http://bitbucket.org/kmike/django-photo-albums/issues/</a></p>
<p>Bug reports, feature requests, enhancement suggestions are always welcome.</p>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h3><a href="">Table Of Contents</a></h3>
            <ul>
<li><a class="reference" href="">django-photo-albums&#8217;s documentation</a><ul>
<li><a class="reference" href="#installation">Installation</a></li>
<li><a class="reference" href="#basic-use">Basic use</a><ul>
<li><a class="reference" href="#module-photo_albums.urls">PhotoAlbumSite</a></li>
<li><a class="reference" href="#templates-used-by-django-photo-albums">Templates used by django-photo-albums</a><ul>
<li><a class="reference" href="#common-context">Common context</a></li>
<li><a class="reference" href="#templates">Templates</a></li>
</ul>
</li>
<li><a class="reference" href="#module-photo_albums.views">Views</a></li>
<li><a class="reference" href="#module-photo_albums.forms">Forms</a></li>
</ul>
</li>
<li><a class="reference" href="#testing">Testing</a><ul>
<li><a class="reference" href="#module-photo_albums.test_utils">Integration testing</a></li>
<li><a class="reference" href="#bugs">Bugs</a></li>
</ul>
</li>
</ul>
</li>
</ul>

            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="_sources/index.txt"
                     rel="nofollow">Show Source</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="modindex.html" title="Global Module Index"
             >modules</a> |</li>
        <li><a href="">django-photo-albums v0.20.3 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright 2009, Mikhail Korobov.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.2.
    </div>
  </body>
</html>