1. Sergey Generalov
  2. cmsplugin-googlesearch


cmsplugin-googlesearch / README.txt


Name: cmsplugin-googlesearch
Description: for django-cms. provides a plugin interface for google's ajax search api & custom site search, for cms plugins and page apphook attachment
Download: http://bitbucket.org/tehfink/cmsplugin-googlesearch/

- django-photologue: trunk
- django-cms-2: 2.0.2
- django: 1.1.1
- modified django-pipes: http://github.com/tehfink/django-pipes
- django.contrib.sites

- make sure requirements are installed and properly working
- add cmsplugin_googlesearch to python path
- add 'cmsplugin_googlesearch' to settings.INSTALLED_APPS
- add ('cmsplugin_googlesearch.urls', 'Google Search plugin app') to settings.CMS_APPLICATIONS_URLS
- run `python manage.py syncdb`
- add plugins to pages, AND attach 'Google Search plugin app' 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). this is important, as the search plugin redirects to the apphooked page
- edit settings for the plugin in django administration interface. these settings are cached as well

we're only tracking django-cms releases at this time.
- branches are named based on django-cms; eg: cms-2.X
- releases are tagged based on django-cms; eg: cms-2.0.2

- define in settings.py:
    CMSPLUGIN_GOOGLESEARCH_CSS_CHOICES - define multiple css classes to apply to plugins
    CMSPLUGIN_GOOGLESEARCH_TEMPLATES_CHOICES - define multiple custom templates for plugins
- copy cmsplugin_googlesearch/templates/plugins/ to your project's template directory
- make sure you are in accord with google's requirements for using their services:
 - http://www.google.com/cse/
 - http://code.google.com/apis/ajaxsearch/web.html

- implement paging and result counting

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