#8723: Search facility for the new documentation site
------------------------------------+---------------------------------------
Reporter: frasern | Owner: jacob
Status: new | Milestone:
Component: Documentation | Version: SVN
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
------------------------------------+---------------------------------------
Changes (by frasern):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Attached is a patch that adds an embedded Google Custom Search Engine
(CSE). Unfortunately Trac doesn't seem to be showing the patch correctly
-- please let me know if I need to generate the patch differently to get
this to work.
The patch also includes fixes for a couple of issues I noticed in the
`djangodocs` app, specifically:
1. The regex for the `document` view was preventing the `images` and
`source` patterns from ever matching, so I reorderd these. This means the
images now show up in the docs (though eventually these should probably be
served statically outside Django).
2. The unpickling of files in `views.py` was failing in Windows. I had
to add `'rb'` to the `open` calls to force the files to be read as binary.
Note that the patch is currently using a CSE key
(014182425414053223532:sfhzyefydv8) which I generated on my Google
Account. This will work and can be used for testing, but unfortunately it
doesn't seem to be possible for me to transfer ownership of this key to
someone else. I suspect a core dev will want to generate their own key so
that they retain full control over the CSE settings.
I have exported and attached the settings of the CSE I created and the
following instructions should allow a core dev to create a new CSE based
upon my one:
1. Go to http://www.google.com/coop/cse/ and click on Create
2. In the name and description fields, just enter "Temp" for now
3. In sites to search, just enter "example.com" for now
4. Ensure the "Do not show ads" checkbox is ticked (as Django is non-
profit)
5. Accept the Ts&Cs and Finish
6. Go into the new CSE's control panel
7. Go into the Advanced screen
8. It will display the unique labels for the new CSE
('''_cse_XXXXXXXXXXX''' and '''_cse_exclude_XXXXXXXXXXX''')
9. Edit the attached [attachment:context.xml context.xml] file,
replacing my CSE's labels with the new CSE's labels (and also the
`CustomSearchEngine` element's `id` attribute appropriately) and then
upload it.
10. Edit the attached [attachment:annotations.xml annotations.xml] file,
replacing my CSE's labels with the new CSE's labels and then upload it.
11. Go into the Sites screen and remove "example.com"
12. Go into the Preview screen
13. The link to "homepage" contains the unique key for the new CSE. Edit
the patch's `search_form.html` to put in this key.
There is a [http://groups.google.com/group/django-
developers/browse_thread/thread/8375d99c2216470f thread on django-
developers] discussing this.
--
Ticket URL: <http://code.djangoproject.com/ticket/8723#comment:1>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---