Changes between Version 14 and Version 15 of ContributedMiddleware

07/03/06 09:00:40 (9 years ago)
Stefano J. Attardi <django@…>



  • ContributedMiddleware

    v14 v15  
    2727For example /fr/article/... shows you the article in French, and /en/article/... shows it in English.
    2828This 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.
     30=== [ URL Middleware] by Stefano J. Attardi ===
     32Cleans up urls by adding/removing trailing slashes, adding/removing the www. prefix, and allowing the language to be set from the url.
     33If APPEND_SLASH is set to False, trailing slashes are removed from the urls, except for urls which have an explicit trailing slash in
     34If REMOVE_WWW is set to True, the www. prefix is removed.
     35Finally, ?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.
Back to Top