Changeset 910
- Timestamp:
- 10/17/05 10:44:09 (3 years ago)
- Files:
-
- django/branches/i18n/django/views/defaults.py (modified) (2 diffs)
- django/branches/i18n/docs/django-admin.txt (modified) (1 diff)
- django/branches/i18n/docs/settings.txt (modified) (1 diff)
- django/branches/i18n/docs/templates.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/i18n/django/views/defaults.py
r869 r910 11 11 except ObjectDoesNotExist: 12 12 raise Http404, "Content type %s object %s doesn't exist" % (content_type_id, object_id) 13 if not hasattr(obj, 'get_absolute_url'): 13 try: 14 absurl = obj.get_absolute_url() 15 except AttributeError: 14 16 raise Http404, "%s objects don't have get_absolute_url() methods" % content_type.name 17 if absurl.startswith('http://'): 18 return httpwrappers.HttpResponseRedirect(absurl) 15 19 object_domain = None 16 20 if hasattr(obj, 'get_site_list'): … … 28 32 pass 29 33 if not object_domain: 30 return httpwrappers.HttpResponseRedirect( obj.get_absolute_url())31 return httpwrappers.HttpResponseRedirect('http://%s%s' % (object_domain, obj.get_absolute_url()))34 return httpwrappers.HttpResponseRedirect(absurl) 35 return httpwrappers.HttpResponseRedirect('http://%s%s' % (object_domain, absurl)) 32 36 33 37 def page_not_found(request): django/branches/i18n/docs/django-admin.txt
r815 r910 113 113 Just execute ``django-admin.py runserver`` more than once. 114 114 115 Note that the default IP address, 127.0.0.1, is not accessible from other 116 machines on your network. To make your development server viewable to other 117 machines on the network, use its own IP address (e.g. ``192.168.2.1``) or 118 ``0.0.0.0``. 119 115 120 Examples: 116 121 ~~~~~~~~~ django/branches/i18n/docs/settings.txt
r899 r910 401 401 Whether to prepend the "www." subdomain to URLs that don't have it. This is 402 402 only used if ``CommonMiddleware`` is installed (see the `middleware docs`_). 403 See also `` PREPEND_WWW``.403 See also ``APPEND_SLASH``. 404 404 405 405 SECRET_KEY django/branches/i18n/docs/templates.txt
r869 r910 224 224 if you want to add to the contents of a parent block instead of 225 225 completely overriding it. 226 227 Finally, note that you can't define multiple ``{% block %}`` tags with the same 228 name in the same template. This limitation exists because a block tag works in 229 "both" directions. That is, a block tag doesn't just provide a hole to fill -- 230 it also defines the content that fills the hole in the *parent*. If there were 231 two similarly-named ``{% block %}`` tags in a template, that template's parent 232 wouldn't know which one of the blocks' content to use. 226 233 227 234 Using the built-in reference
