Commits

Mikhail Korobov  committed 6594210

Rebuild docs.

  • Participants
  • Parent commits 3547b1b

Comments (0)

Files changed (5)

File docs/_build/doctrees/environment.pickle

Binary file modified.

File docs/_build/doctrees/index.doctree

Binary file modified.

File docs/_build/html/_sources/index.txt

 or :class:`~generic_images.fields.UserImageCountField`. Run
 ``pip install django-composition`` to install django-composition.
 
+****************************************************************
+Why another photo albums app? Сomparison with pinax's photologue
+****************************************************************
+
+There is the one conceptual difference between django-photo-albums and
+photologue: the data model.
+
+Photologue data model
+=====================
+
+    ``Image <- (Many To Many) <- Gallery [ <- (ManyToMany, FK) <- Object ]``
+
+or
+
+    ``Image <- (Many to Many) <- Object``
+
+
+django-photo-albums' data model (provided by django-generic-images)
+===================================================================
+
+    ``Image -> (GFK) -> Object``
+
+Several galleries for one object can also be implemented by introducing custom
+MyGallery model:
+
+    ``Image -> (GFK) -> MyGallery -> (FK, GFK) -> Object``
+
+This way images and galleries can be attached to any model and there is no need
+to change model to attach images or albums to it.
+
+Please note that there is small performance penalty for extra flexibility
+provided by using generic foreign keys (1 extra query while selecting all
+images for an object + 1 extra join with contenttypes table).
+
+
 *********
 Basic use
 *********

File docs/_build/html/index.html

 or <tt class="xref docutils literal"><span class="pre">UserImageCountField</span></tt>. Run
 <tt class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">django-composition</span></tt> to install django-composition.</p>
 </div>
+<div class="section" id="why-another-photo-albums-app-omparison-with-pinax-s-photologue">
+<h2>Why another photo albums app? Сomparison with pinax&#8217;s photologue<a class="headerlink" href="#why-another-photo-albums-app-omparison-with-pinax-s-photologue" title="Permalink to this headline">¶</a></h2>
+<p>There is the one conceptual difference between django-photo-albums and
+photologue: the data model.</p>
+<div class="section" id="photologue-data-model">
+<h3>Photologue data model<a class="headerlink" href="#photologue-data-model" title="Permalink to this headline">¶</a></h3>
+<blockquote>
+<tt class="docutils literal"><span class="pre">Image</span> <span class="pre">&lt;-</span> <span class="pre">(Many</span> <span class="pre">To</span> <span class="pre">Many)</span> <span class="pre">&lt;-</span> <span class="pre">Gallery</span> <span class="pre">[</span> <span class="pre">&lt;-</span> <span class="pre">(ManyToMany,</span> <span class="pre">FK)</span> <span class="pre">&lt;-</span> <span class="pre">Object</span> <span class="pre">]</span></tt></blockquote>
+<p>or</p>
+<blockquote>
+<tt class="docutils literal"><span class="pre">Image</span> <span class="pre">&lt;-</span> <span class="pre">(Many</span> <span class="pre">to</span> <span class="pre">Many)</span> <span class="pre">&lt;-</span> <span class="pre">Object</span></tt></blockquote>
+</div>
+<div class="section" id="django-photo-albums-data-model-provided-by-django-generic-images">
+<h3>django-photo-albums&#8217; data model (provided by django-generic-images)<a class="headerlink" href="#django-photo-albums-data-model-provided-by-django-generic-images" title="Permalink to this headline">¶</a></h3>
+<blockquote>
+<tt class="docutils literal"><span class="pre">Image</span> <span class="pre">-&gt;</span> <span class="pre">(GFK)</span> <span class="pre">-&gt;</span> <span class="pre">Object</span></tt></blockquote>
+<p>Several galleries for one object can also be implemented by introducing custom
+MyGallery model:</p>
+<blockquote>
+<tt class="docutils literal"><span class="pre">Image</span> <span class="pre">-&gt;</span> <span class="pre">(GFK)</span> <span class="pre">-&gt;</span> <span class="pre">MyGallery</span> <span class="pre">-&gt;</span> <span class="pre">(FK,</span> <span class="pre">GFK)</span> <span class="pre">-&gt;</span> <span class="pre">Object</span></tt></blockquote>
+<p>This way images and galleries can be attached to any model and there is no need
+to change model to attach images or albums to it.</p>
+<p>Please note that there is small performance penalty for extra flexibility
+provided by using generic foreign keys (1 extra query while selecting all
+images for an object + 1 extra join with contenttypes table).</p>
+</div>
+</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">
             <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="#why-another-photo-albums-app-omparison-with-pinax-s-photologue">Why another photo albums app? Сomparison with pinax&#8217;s photologue</a><ul>
+<li><a class="reference" href="#photologue-data-model">Photologue data model</a></li>
+<li><a class="reference" href="#django-photo-albums-data-model-provided-by-django-generic-images">django-photo-albums&#8217; data model (provided by django-generic-images)</a></li>
+</ul>
+</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>

File docs/_build/html/searchindex.js

-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,imagecountfield:0,search:[],error_class:[],vasia:0,"0x1a1bb30":[],action:0,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,get_prepared_error: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,composit: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:[],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:[],common:0,namelist:0,urlpattern:0,insid:0,empty_permit:[],base:0,org:0,caption:0,place:0,album_us:0,assign:0,urlconf:0,lambda:0,info:0,instance_nam:0,template_nam:[],onc:[],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,"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,userimagecountfield: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,user: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,app_util:[],rais:0,temporari:0,initi:[],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:[],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":{edit_album:[0,0],get_prepared_errors:[0,3],set_as_main_image:[0,0],edit_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"]})
+Search.setIndex({desctypes:{"0":"attribute","1":"class","2":"method","3":"function"},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,queri:0,introduc:0,string:0,place_slug:0,fals:0,account:0,util:0,context_processor:0,upload_zip_form_class:0,veri:[],join:0,contenttyp:0,ref:[],list:0,upload:0,iter:0,small:0,pleas:0,unmark:0,accounts_photo_sit:0,id_:[],second:0,pass:0,index:[],appear:0,ned:0,advanc:0,delet:0,version:0,account_imag:[],method:0,redirect:0,gener:0,here:0,errorlist:[],upload_form_class:0,path:0,becom:0,valu:0,imagecountfield:0,search:[],error_class:[],vasia:0,"0x1a1bb30":[],app_util:[],chang:0,via:0,extra:0,modul:0,href:0,instal:0,should:0,select:0,regex:0,from:0,zip:0,memori:0,current_app:0,next:0,call:0,prev:0,type:0,manytomani: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,conceptu:0,kwarg: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,get_prepared_error:0,alwai:0,multipl:0,anoth: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,suggest:0,callabl:0,fallback:0,order:0,city_slug:0,composit:0,becaus:0,clear_main_imag:0,flexibl:0,"0x1a1caf0":[],paramet:0,process_zip_fil:0,thank:0,img:0,"\u0441omparison":0,better:0,complex:0,onc:[],main:0,them:0,good:[],"return":0,thei:[],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:[],gfk:0,meta:0,my_fixtur:0,year:0,extract:0,special:0,album:0,installed_app: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,rais:0,place:0,temporari:0,assign:0,urlconf:0,lambda:0,instance_nam:0,template_nam:[],media_root:0,number:0,hook:0,alreadi:0,upload_imag:0,size:0,auto_id:[],differ:0,start: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,mygalleri:0,provid:0,project: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,also:0,indic:[],necesseri:0,album_sit:0,userimagecountfield:0,thi: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:[],penalti:0,onli:0,explicitli:0,solut:0,temporary_file_path:[],dict:0,folder:0,extra_context:0,count: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,common:0,contain:0,where:0,valid:0,view:0,set:0,methodnam:[],see:0,multipart:0,arg:0,testcas:0,close:[],modelformset:0,uploadzipalbumform:0,statu:0,kei:0,correctli:0,pattern:0,someth:0,thumb:[],clean_zip_fil:0,won:0,between:0,"import":0,thumbnail:0,attribut:0,extend:[],image_id:0,entir:0,addit:0,behaviour:0,extens:0,admin:0,foreign:0,etc:0,excluded_view:0,context:0,pinax:0,mani:0,com:[],load:0,inspir:[],upload_formset_class:0,reorder_imag:0,assum:0,files_count:0,city__slug:0,mark:0,basic:0,object_gett:0,imag:0,bulk:0,els:0,look:0,defin:0,"while":0,fixtur:0,endblock:[],pack:0,non:0,archiv:0,upload_main_imag:0,sever:0,decor:[],develop:0,welcom:0,perform:0,media:0,make:0,same:[],instanc:0,document:0,complet:0,http:0,action:0,edit_album:0,album_us:0,user:0,extern:0,test_help:0,implement:0,exampl:0,endfor: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,applic:0,photoalbumsit:0,which:0,read:0,big:0,password:0,template_object_nam:0,like:0,success:[],html:0,"0x1a1baf0":[],albumtest:0,album_for_id:0,necessari:0,photologu:0,page:[],test_reord:0,creation:0,some:0,resolv: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,userprofile__slug:0,block:0,image2_in_album_id:0,photo_smal:[],set_image_ord:0,easy_instal:0,automat:0,your:0,per:0,wai: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:[],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,other:0,lookup:0,test:0,you:0,variabl:0,why: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.views":{edit_album:[0,0],get_prepared_errors:[0,3],set_as_main_image:[0,0],edit_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"]})