Mikhail Korobov avatar Mikhail Korobov committed 3547b1b

The main difference between photologue and django-photo-albums is described.

Comments (0)

Files changed (1)

 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
 *********
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.