[ZCM] [ZC] 1740/ 1 Request "Human Readable URL's"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Sat Mar 26 20:37:00 EST 2005


Issue #1740 Update (Request) "Human Readable URL's"
 Status Pending, Zope/feature medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1740

==============================================================
= Request - Entry #1 by Anonymous User on Mar 26, 2005 8:37 pm

Try to make URL human readable and try to eliminate "?" in URLs. 
Instead of having a URL "/courses/listing?year=2003&sem=win", how about a URL like 
"/courses/listing/year/2003/sem/win" or 
"/courses/listing/2003/win". 

They can be implemented easily as follows: 
* translate handler
  - There is nothing inside "listing" 
  - So call courses.listing("year/2003/sem/win") 
    or courses.listing("2003/win") as the case may be.
* Inside courses.listing code
  - params = ["year","sem"]
  - The constructor parses the input string and 
    checks if it is of the form
    NAME/VALUE/NAME/VALUE... or not. 
  - If so, it interprets it as keyword arguments
  - If not interpret as positional argument (order given in params) 
  - If interpreted as keyword arguments, then order does not matter.
* Our website (based on mod_python/apache) does this and 
  it makes all URLs human readable, and more importantly all URLs
  can be bookmarked for future use.
* For example, if you have a simple search form the result 
  of the search will lead you to the URL
  "/courses/search/year/2003/dept/cs". The user can bookmark this
  URL and everytime he/she visits this URL, you get the 
  latest result of the search.

* Since this is easy to implement, Zope should probably add this feature as well. 
==============================================================



More information about the Zope-Collector-Monitor mailing list