Changeset 5601
- Timestamp:
- 07/04/07 01:02:00 (1 year ago)
- Files:
-
- django/branches/unicode (modified) (1 prop)
- django/branches/unicode/AUTHORS (modified) (1 diff)
- django/branches/unicode/django/contrib/sessions/middleware.py (modified) (1 diff)
- django/branches/unicode/django/contrib/sessions/tests.py (modified) (1 diff)
- django/branches/unicode/django/core/management.py (modified) (1 diff)
- django/branches/unicode/django/views/defaults.py (modified) (2 diffs)
- django/branches/unicode/docs/contributing.txt (modified) (3 diffs)
- django/branches/unicode/docs/templates_python.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/unicode
- Property svnmerge-integrated changed from /django/trunk:1-5579 to /django/trunk:1-5600
django/branches/unicode/AUTHORS
r5580 r5601 238 238 torne-django@wolfpuppy.org.uk 239 239 Karen Tracey <graybark@bellsouth.net> 240 tstromberg@google.com 240 241 Makoto Tsuyuki <mtsuyuki@gmail.com> 241 242 tt@gurgle.no django/branches/unicode/django/contrib/sessions/middleware.py
r5310 r5601 38 38 39 39 def pop(self, key, *args): 40 self.modified = self.modified or key in self._session 40 41 return self._session.pop(key, *args) 41 42 django/branches/unicode/django/contrib/sessions/tests.py
r5310 r5601 6 6 >>> s._session_cache['some key'] = 'exists' 7 7 8 >>> s.accessed 9 False 10 >>> s.modified 11 False 12 13 >>> s.pop('non existant key', 'does not exist') 14 'does not exist' 15 >>> s.accessed 16 True 17 >>> s.modified 18 False 19 8 20 >>> s.pop('some key') 9 21 'exists' 22 >>> s.accessed 23 True 24 >>> s.modified 25 True 10 26 11 27 >>> s.pop('some key', 'does not exist') django/branches/unicode/django/core/management.py
r5531 r5601 833 833 sys.exit(1) 834 834 _start_helper('project', project_name, directory) 835 835 836 # Create a random SECRET_KEY hash, and put it in the main settings. 836 837 main_settings_file = os.path.join(directory, project_name, 'settings.py') 837 838 settings_contents = open(main_settings_file, 'r').read() 839 840 # If settings.py was copied from a read-only source, make it writeable. 841 if not os.access(main_settings_file, os.W_OK): 842 os.chmod(main_settings_file, 0600) 843 838 844 fp = open(main_settings_file, 'w') 839 845 secret_key = ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)]) django/branches/unicode/django/views/defaults.py
r4612 r5601 22 22 23 23 # If the object actually defines a domain, we're done. 24 if absurl.startswith('http://') :24 if absurl.startswith('http://') or absurl.startswith('https://'): 25 25 return http.HttpResponseRedirect(absurl) 26 26 … … 62 62 # to whatever get_absolute_url() returned. 63 63 if object_domain is not None: 64 return http.HttpResponseRedirect('http://%s%s' % (object_domain, absurl)) 64 protocol = request.is_secure() and 'https' or 'http' 65 return http.HttpResponseRedirect('%s://%s%s' % (protocol, object_domain, absurl)) 65 66 else: 66 67 return http.HttpResponseRedirect(absurl) django/branches/unicode/docs/contributing.txt
r5580 r5601 395 395 These guidelines regulate the format of our ReST documentation: 396 396 397 * In section titles, capitalize only initial words and proper nouns.398 399 * Wrap the documentation at 80 characters wide, unless a code example400 is significantly less readable when split over two lines, or for another401 good reason.397 * In section titles, capitalize only initial words and proper nouns. 398 399 * Wrap the documentation at 80 characters wide, unless a code example 400 is significantly less readable when split over two lines, or for another 401 good reason. 402 402 403 403 Commonly used terms … … 407 407 documentation: 408 408 409 * **Django** -- when referring to the framework, capitalize Django. It is410 lowercase only in Python code and in the djangoproject.com logo.411 412 * **e-mail** -- it has a hyphen.413 414 * **MySQL**415 416 * **PostgreSQL**417 418 * **Python** -- when referring to the language, capitalize Python.419 420 * **realize**, **customize**, **initialize**, etc. -- use the American421 "ize" suffix, not "ise."422 423 * **SQLite**424 425 * **subclass** -- it's a single word without a hyphen, both as a verb426 ("subclass that model") and as a noun ("create a subclass").427 428 * **Web**, **World Wide Web**, **the Web** -- note Web is always429 capitalized when referring to the World Wide Web.409 * **Django** -- when referring to the framework, capitalize Django. It is 410 lowercase only in Python code and in the djangoproject.com logo. 411 412 * **e-mail** -- it has a hyphen. 413 414 * **MySQL** 415 416 * **PostgreSQL** 417 418 * **Python** -- when referring to the language, capitalize Python. 419 420 * **realize**, **customize**, **initialize**, etc. -- use the American 421 "ize" suffix, not "ise." 422 423 * **SQLite** 424 425 * **subclass** -- it's a single word without a hyphen, both as a verb 426 ("subclass that model") and as a noun ("create a subclass"). 427 428 * **Web**, **World Wide Web**, **the Web** -- note Web is always 429 capitalized when referring to the World Wide Web. 430 430 431 431 * **Web site** -- use two words, with Web capitalized. … … 434 434 --------------------------- 435 435 436 * **model** -- it's not capitalized.437 438 * **template** -- it's not capitalized.439 440 * **URLconf** -- use three capitalized letters, with no space before441 "conf."442 443 * **view** -- it's not capitalized.436 * **model** -- it's not capitalized. 437 438 * **template** -- it's not capitalized. 439 440 * **URLconf** -- use three capitalized letters, with no space before 441 "conf." 442 443 * **view** -- it's not capitalized. 444 444 445 445 Committing code django/branches/unicode/docs/templates_python.txt
r5580 r5601 312 312 def some_view(request): 313 313 # ... 314 returnRequestContext(request, {314 c = RequestContext(request, { 315 315 'foo': 'bar', 316 316 }, [ip_address_processor]) 317 return t.render(c) 317 318 318 319 Note:: … … 678 679 @template.stringfilter 679 680 def lower(value): 680 return value.lower()681 return value.lower() 681 682 682 683 Writing custom template tags
