Changes between Version 19 and Version 20 of ContributedMiddleware


Ignore:
Timestamp:
08/06/06 10:30:14 (9 years ago)
Author:
Stefano J. Attardi <django@…>
Comment:

Updated URL Middleware

Legend:

Unmodified
Added
Removed
Modified
  • ContributedMiddleware

    v19 v20  
    3333This version of the Locale from URL Middleware also sets a cookie and a request var whenever you go to a webpage that has a language set in it's url, so that it serves you the correct version when you go to a page that doesn't have any language code in it's url.
    3434
    35 === [http://code.nailchiodo.com/nailchiodo/trunk/nailchiodo/urlmiddleware.py URL Middleware] by Stefano J. Attardi ===
     35=== [http://code.attardi.org/trunk/attardi/urlmiddleware.py URL Middleware] by Stefano J. Attardi ===
    3636
    3737Cleans up urls by adding/removing trailing slashes, adding/removing the www. prefix, and allowing the language to be set from the url.
    38 If APPEND_SLASH is set to False, trailing slashes are removed from the urls, except for urls which have an explicit trailing slash in urls.py.
     38
     39If APPEND_SLASH is set to False, trailing slashes are removed from the urls, except for urls which have an explicit trailing slash in urls.py, in which case a trailing slash is added.
     40
    3941If REMOVE_WWW is set to True, the www. prefix is removed.
     42
    4043Finally, ?lang=xx can be appended to any url to override the default language setting. This override is remembered for the following requests. For example, /article?lang=it would show the article in Italian regardless of brower settings or cookies, and any following request to the site would be shown in Italian by default.
    4144
Back to Top