Commits

Franck Bret committed 180a712

change models settings for photo teaser

Comments (0)

Files changed (7)

cmsplugin_photologue.egg-info/PKG-INFO

+Metadata-Version: 1.1
+Name: cmsplugin-photologue
+Version: 0.2.7.beta
+Summary: plugin bridge between django-cms & django-photologue
+Home-page: http://bitbucket.org/tehfink/cmsplugin-photologue/
+Author: tehfink
+Author-email: UNKNOWN
+License: BSD License
+Description: BETA
+        
+        
+        Name: cmsplugin-photologue
+        Description: for django-cms. provides a plugin bridge between django-cms & django-photologue, for cms plugins, page apphook attachment, and navigation extension
+        Download: http://bitbucket.org/tehfink/cmsplugin-photologue/
+        
+        
+        Requirements:
+        - django-photologue: trunk
+        - django-cms-2: 2.0.2
+        - django: 1.1.1
+        
+        
+        Setup:
+        - this release is only compatible with django-cms 2.0.2
+        - make sure requirements are installed and properly working
+        - add cmsplugin_photologue to python path
+        - add 'cmsplugin_photologue' to settings.INSTALLED_APPS
+        - add ('cmsplugin_photologue.urls', 'Photologue app') to settings.CMS_APPLICATIONS_URLS
+        - add ('cmsplugin_photologue.navigation', 'Photologue app Navigation') to settings.CMS_NAVIGATION_EXTENDERS
+        - run `python manage.py syncdb` and, if you haven't already, photologue's `python manage.py plinit`
+        - add plugins to pages, or attach 'Photologue plugin app' and 'Photologue plugin navigation' to a page (you may have to restart server process for urls to an attached page to work, something with how django-cms caches urls)
+        
+        
+        Upgrading:
+        - new fields were added to the plugin models. here's how to upgrade your models:
+        $ python manage.py dbshell
+        > alter table cmsplugin_photologuegalleryplugin add column template varchar(255) DEFAULT 'default';
+        > alter table cmsplugin_photologuephotoplugin add column template varchar(255) DEFAULT 'default';
+        > alter table cmsplugin_photologuegalleryplugin add column sample_size smallint DEFAULT 3;
+        - we've since added migrations from south, so this won't be necessary in the future
+        
+        
+        Versioning:
+        i'm going to _try_ and track the most recent django-cms release and the current trunk, starting with 2.0.2.
+        - branches are named based on django-cms; eg: cms-2.X
+        - releases are tagged based on django-cms; eg: cms-2.0.2
+        
+        
+        Optional:
+        - the photologue default templates extend a 'base.html', while django-cms uses a default 'index.html'. quick solution: create a 'base.html' placeholder template which extends 'index.html'. see 'cmsplugin_photologue/templates/base.html' for an example.
+        - recommended: install cms-context_processors (or your own), so {{ site }} will work in photologue pages attached to cms pages. NB: this should be fixed in latest django-cms trunk. does it work for anyone?
+        - define in settings.py:
+            CMS_APPLICATIONS_URLS - django cms apphook
+            CMS_NAVIGATION_EXTENDERS - django cms navigation extenders
+            CMSPLUGIN_PHOTOLOGUE_ROOT_URL - defines base url for apphook
+            CMSPLUGIN_PHOTOLOGUE_GALLERY_TEMPLATES & CMSPLUGIN_PHOTOLOGUE_PHOTO_TEMPLATES - define custom templates for gallery & photo plugins
+            CMSPLUGIN_PHOTOLOGUE_SAMPLE_SIZE - number of random photos to show in gallery template, overrides photologue's setting
+            CMSPLUGIN_PHOTOLOGUE_CSS_CHOICES - define multiple css classes to apply to plugins
+            CMSPLUGIN_PHOTOLOGUE_GALLERY_TEMPLATES_CHOICES - define multiple custom templates for gallery plugins
+            CMSPLUGIN_PHOTOLOGUE_PHOTO_TEMPLATES_CHOICES - define multiple custom templates for photo plugins
+        - copy cmsplugin_photologue/templates/plugins/ to your project's template directory
+        
+        
+        Example Projects:
+        - are stripped down, slightly modified versions of django-cms' example project for each relevant version
+        - require a virtualenv with the requirements above installed
+        - should work out of the box
+        - username/password: admin/password
+        
+        
+        Examples:
+        
+        in settings.py:
+        
+        CMS_APPLICATIONS_URLS = (
+            ('cmsplugin_photologue.urls', 'Photologue plugin app'),
+        )
+        #allows apphook in 'Advanced Settings' of django-cms page
+        
+        CMS_NAVIGATION_EXTENDERS = (
+            ('cmsplugin_photologue.navigation.get_nodes', 'Photologue plugin navigation'),
+        )
+        #extends django-cms menu navigation with photologue navigation tree
+        
+        CMSPLUGIN_PHOTOLOGUE_ROOT_URL = {
+            'name': 'pl-gallery-archive-day',
+            'template': '',
+            'extra_args': { 'year': '2010', 'month': 'jan', 'day': '3' }
+        }
+        #define a photologue urlpatterns as the root apphook url (defaults to 'pl-gallery-archive'):
+        ##name: urlpattern from photologue.urls
+        ##template: your custom template, leave blank to use photologue's default
+        ##extra_args: extra arguments required by the photologue urls
+        
+        CMSPLUGIN_PHOTOLOGUE_GALLERY_TEMPLATES = (
+            ('default', 'photologue_gallery.html'),
+            ('Galleriffic simple', 'galleriffic_simple.html'),
+            ('Galleriffic black', 'galleriffic_black.html'),
+        )
+        CMSPLUGIN_PHOTOLOGUE_PHOTO_TEMPLATES = (
+            ('default', 'photologue_photo.html'),
+            ('Lightbox blue', 'lightbox_blue1.html'),
+        )
+        #define custom templates for gallery & photo plugins
+        
+        CMSPLUGIN_PHOTOLOGUE_CSS_CHOICES = (('0', ''),('1', 'left'),('2', 'right'),('3', 'center'),) )
+        #adds an optional css class to the gallery or photo enclosing div in the plugin templates
+        
+        CMSPLUGIN_PHOTOLOGUE_SAMPLE_SIZE = 3
+        #overrides photologue.urls.SAMPLE_SIZE : 'Number of random images from the gallery to display.'
+        
+        
+        in a template:
+        
+        {% get_latest_galleries All as latest_galleries %}
+        {% for latest in latest_galleries %}
+        ...
+        {% endfor %}
+        
+        {% get_latest_photos 5 as latest_photos %}
+        {% for latest in latest_photos %}
+        ...
+        {% endfor %}
+        
+Platform: OS Independent
+Classifier: Development Status :: 4 - Beta
+Classifier: Environment :: Web Environment
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Framework :: Django
+Requires: django (>=1.1.0)
+Requires: cms (==2.0.2)

cmsplugin_photologue.egg-info/SOURCES.txt

+AUTHORS
+MANIFEST.in
+README.txt
+cmsplugin_photologue/__init__.py
+cmsplugin_photologue/cms_plugins.py
+cmsplugin_photologue/models.py
+cmsplugin_photologue/navigation.py
+cmsplugin_photologue/urls.py
+cmsplugin_photologue.egg-info/PKG-INFO
+cmsplugin_photologue.egg-info/SOURCES.txt
+cmsplugin_photologue.egg-info/dependency_links.txt
+cmsplugin_photologue.egg-info/not-zip-safe
+cmsplugin_photologue.egg-info/requires.txt
+cmsplugin_photologue.egg-info/top_level.txt
+cmsplugin_photologue/migrations/0001_initial.py
+cmsplugin_photologue/migrations/0002_display_mode.py
+cmsplugin_photologue/migrations/__init__.py
+cmsplugin_photologue/templates/base.html
+cmsplugin_photologue/templates/plugins/cmsplugin_photologue/photologue_gallery.html
+cmsplugin_photologue/templates/plugins/cmsplugin_photologue/photologue_photo.html
+cmsplugin_photologue/templatetags/__init__.py
+cmsplugin_photologue/templatetags/cmsplugin_photologue_templatetags.py

cmsplugin_photologue.egg-info/dependency_links.txt

+

cmsplugin_photologue.egg-info/not-zip-safe

+

cmsplugin_photologue.egg-info/requires.txt

+setuptools

cmsplugin_photologue.egg-info/top_level.txt

+cmsplugin_photologue

cmsplugin_photologue/models.py

 #get custom templates from settings or use default
 CMSPLUGIN_PHOTOLOGUE_GALLERY_TEMPLATES_CHOICES = getattr(settings,"CMSPLUGIN_PHOTOLOGUE_GALLERY_TEMPLATES", (('default', 'photologue_gallery.html'),) )
 CMSPLUGIN_PHOTOLOGUE_PHOTO_TEMPLATES_CHOICES = getattr(settings,"CMSPLUGIN_PHOTOLOGUE_PHOTO_TEMPLATES", (('default', 'photologue_photo.html'),) )
-CMSPLUGIN_PHOTOLOGUE_TEASER_PHOTO_TEMPLATES_CHOICES = getattr(settings,"CMSPLUGIN_PHOTOLOGUE_TEASER_PHOTO_TEMPLATES_CHOICES", (('default', 'photologue_teaser_photo.html'),) )
+CMSPLUGIN_PHOTOLOGUE_TEASER_PHOTO_TEMPLATES_CHOICES = getattr(settings,"CMSPLUGIN_PHOTOLOGUE_TEASER_PHOTO_TEMPLATES", (('default', 'photologue_teaser_photo.html'),) )
 #get custom gallery sample size from settings or use default (overrides photologue.urls.SAMPLE_SIZE)
 SAMPLE_SIZE = getattr(settings, 'CMSPLUGIN_PHOTOLOGUE_SAMPLE_SIZE', 3)