Skip to content

Commit f911df1

Browse files
committed
[soc2009/model-validation] Merget to trunk at r12009
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12014 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 695de8c commit f911df1

File tree

556 files changed

+22583
-9522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

556 files changed

+22583
-9522
lines changed

AUTHORS

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ answer newbie questions, and generally made Django that much better:
5555
Niran Babalola <niran@niran.org>
5656
Morten Bagai <m@bagai.com>
5757
Mikaël Barbero <mikael.barbero nospam at nospam free.fr>
58+
Randy Barlow <randy@electronsweatshop.com>
5859
Scott Barr <scott@divisionbyzero.com.au>
5960
Jiri Barton
6061
Ned Batchelder <http://www.nedbatchelder.com/>
6162
batiste@dosimple.ch
6263
Batman
64+
Chris Beaven <http://smileychris.tactful.co.nz/>
6365
Brian Beck <http://blog.brianbeck.com/>
6466
Shannon -jj Behrens <http://jjinux.blogspot.com/>
6567
Esdras Beleza <linux@esdrasbeleza.com>
@@ -135,7 +137,7 @@ answer newbie questions, and generally made Django that much better:
135137
Andrew Durdin <adurdin@gmail.com>
136138
dusk@woofle.net
137139
Andy Dustman <farcepest@gmail.com>
138-
J. Clifford Dyer <jcd@unc.edu>
140+
J. Clifford Dyer <jcd@sdf.lonestar.org>
139141
Clint Ecker
140142
Nick Efford <nick@efford.org>
141143
eibaan@gmail.com
@@ -171,6 +173,7 @@ answer newbie questions, and generally made Django that much better:
171173
Alex Gaynor <alex.gaynor@gmail.com>
172174
Andy Gayton <andy-django@thecablelounge.com>
173175
Idan Gazit
176+
geber@datacollect.com
174177
Baishampayan Ghose
175178
Dimitris Glezos <dimitris@glezos.com>
176179
glin@seznam.cz
@@ -243,6 +246,7 @@ answer newbie questions, and generally made Django that much better:
243246
Cameron Knight (ckknight)
244247
Nena Kojadin <nena@kiberpipa.org>
245248
Igor Kolar <ike@email.si>
249+
Tomáš Kopeček <permonik@m6.cz>
246250
Gasper Koren
247251
Martin Kosír <martin@martinkosir.net>
248252
Arthur Koziel <http://arthurkoziel.com>
@@ -267,6 +271,7 @@ answer newbie questions, and generally made Django that much better:
267271
Finn Gruwier Larsen <finn@gruwier.dk>
268272
Lau Bech Lauritzen
269273
Rune Rønde Laursen <runerl@skjoldhoej.dk>
274+
Mark Lavin <markdlavin@gmail.com>
270275
Eugene Lazutkin <http://lazutkin.com/blog/>
271276
lcordier@point45.com
272277
Jeong-Min Lee <falsetru@gmail.com>
@@ -285,6 +290,7 @@ answer newbie questions, and generally made Django that much better:
285290
Martin Mahner <http://www.mahner.org/>
286291
Matt McClanahan <http://mmcc.cx/>
287292
Frantisek Malina <vizualbod@vizualbod.com>
293+
Mike Malone <mjmalone@gmail.com>
288294
Martin Maney <http://www.chipy.org/Martin_Maney>
289295
masonsimon+django@gmail.com
290296
Manuzhai
@@ -300,6 +306,8 @@ answer newbie questions, and generally made Django that much better:
300306
Jason McBrayer <http://www.carcosa.net/jason/>
301307
Kevin McConnell <kevin.mcconnell@gmail.com>
302308
mccutchen@gmail.com
309+
Paul McLanahan <paul@mclanahan.net>
310+
Tobias McNulty <http://www.caktusgroup.com/blog>
303311
Christian Metts
304312
michael.mcewan@gmail.com
305313
michal@plovarna.cz
@@ -321,6 +329,7 @@ answer newbie questions, and generally made Django that much better:
321329
Gopal Narayanan <gopastro@gmail.com>
322330
Fraser Nevett <mail@nevett.org>
323331
Sam Newman <http://www.magpiebrain.com/>
332+
Filip Noetzel <http://filip.noetzel.co.uk/>
324333
Afonso Fernández Nogueira <fonzzo.django@gmail.com>
325334
Neal Norwitz <nnorwitz@google.com>
326335
Todd O'Bryan <toddobryan@mac.com>
@@ -331,6 +340,7 @@ answer newbie questions, and generally made Django that much better:
331340
Carlos Eduardo de Paula <carlosedp@gmail.com>
332341
pavithran s <pavithran.s@gmail.com>
333342
Barry Pederson <bp@barryp.org>
343+
Andreas Pelme <andreas@pelme.se>
334344
permonik@mesias.brnonet.cz
335345
peter@mymart.com
336346
pgross@thoughtworks.com
@@ -379,8 +389,10 @@ answer newbie questions, and generally made Django that much better:
379389
Vinay Sajip <vinay_sajip@yahoo.co.uk>
380390
Kadesarin Sanjek
381391
Massimo Scamarcia <massimo.scamarcia@gmail.com>
392+
Paulo Scardine <paulo@scardine.com.br>
382393
David Schein
383394
Bernd Schlapsi
395+
schwank@gmail.com
384396
scott@staplefish.com
385397
Ilya Semenov <semenov@inetss.com>
386398
serbaut@gmail.com
@@ -392,7 +404,7 @@ answer newbie questions, and generally made Django that much better:
392404
Jozko Skrablin <jozko.skrablin@gmail.com>
393405
Ben Slavin <benjamin.slavin@gmail.com>
394406
sloonz <simon.lipp@insa-lyon.fr>
395-
SmileyChris <smileychris@gmail.com>
407+
Paul Smith <blinkylights23@gmail.com>
396408
Warren Smith <warren@wandrsmith.net>
397409
smurf@smurf.noris.de
398410
Vsevolod Solovyov

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ http://code.djangoproject.com/newticket
2727
To get more help:
2828

2929
* Join the #django channel on irc.freenode.net. Lots of helpful people
30-
hang out there. Read the archives at http://oebfare.com/logger/django/.
30+
hang out there. Read the archives at http://botland.oebfare.com/logger/django/.
3131

3232
* Join the django-users mailing list, or read the archives, at
3333
http://groups.google.com/group/django-users.

django/conf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def __getattr__(self, name):
127127
return getattr(self.default_settings, name)
128128

129129
def __dir__(self):
130-
return dir(self) + dir(self.default_settings)
130+
return self.__dict__.keys() + dir(self.default_settings)
131131

132132
# For Python < 2.6:
133133
__members__ = property(lambda self: self.__dir__())

django/conf/global_settings.py

Lines changed: 92 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@
103103
LOCALE_PATHS = ()
104104
LANGUAGE_COOKIE_NAME = 'django_language'
105105

106+
# If you set this to True, Django will format dates, numbers and calendars
107+
# according to user current locale
108+
USE_L10N = False
109+
106110
# Not-necessarily-technical managers of the site. They get broken link
107111
# notifications and other various e-mails.
108112
MANAGERS = ADMINS
@@ -131,6 +135,9 @@
131135
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
132136
DATABASE_OPTIONS = {} # Set to empty dictionary for default.
133137

138+
DATABASES = {
139+
}
140+
134141
# The email backend to use. For possible shortcuts see django.core.mail.
135142
# The default is to use the SMTP backend.
136143
# Third-party backends can be specified by providing a Python path
@@ -158,9 +165,9 @@
158165
# See the comments in django/core/template/loader.py for interface
159166
# documentation.
160167
TEMPLATE_LOADERS = (
161-
'django.template.loaders.filesystem.load_template_source',
162-
'django.template.loaders.app_directories.load_template_source',
163-
# 'django.template.loaders.eggs.load_template_source',
168+
'django.template.loaders.filesystem.Loader',
169+
'django.template.loaders.app_directories.Loader',
170+
# 'django.template.loaders.eggs.Loader',
164171
)
165172

166173
# List of processors used by RequestContext to populate the context.
@@ -172,6 +179,7 @@
172179
'django.core.context_processors.i18n',
173180
'django.core.context_processors.media',
174181
# 'django.core.context_processors.request',
182+
'django.contrib.messages.context_processors.messages',
175183
)
176184

177185
# Output to use in template system for invalid (e.g. misspelled) variables.
@@ -261,6 +269,12 @@
261269
# you'd pass directly to os.chmod; see http://docs.python.org/lib/os-file-dir.html.
262270
FILE_UPLOAD_PERMISSIONS = None
263271

272+
# Python module path where user will place custom format definition.
273+
# The directory where this setting is pointing should contain subdirectories
274+
# named as the locales, containing a formats.py file
275+
# (i.e. "myproject.locale" for myproject/locale/en/formats.py etc. use)
276+
FORMAT_MODULE_PATH = None
277+
264278
# Default formatting for date objects. See all available format strings here:
265279
# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
266280
DATE_FORMAT = 'N j, Y'
@@ -283,6 +297,70 @@
283297
# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
284298
MONTH_DAY_FORMAT = 'F j'
285299

300+
# Default shortformatting for date objects. See all available format strings here:
301+
# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
302+
SHORT_DATE_FORMAT = 'm/d/Y'
303+
304+
# Default short formatting for datetime objects.
305+
# See all available format strings here:
306+
# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
307+
SHORT_DATETIME_FORMAT = 'm/d/Y P'
308+
309+
# Default formats to be used when parsing dates from input boxes, in order
310+
# See all available format string here:
311+
# http://docs.python.org/library/datetime.html#strftime-behavior
312+
# * Note that these format strings are different from the ones to display dates
313+
DATE_INPUT_FORMATS = (
314+
'%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06'
315+
'%b %d %Y', '%b %d, %Y', # 'Oct 25 2006', 'Oct 25, 2006'
316+
'%d %b %Y', '%d %b, %Y', # '25 Oct 2006', '25 Oct, 2006'
317+
'%B %d %Y', '%B %d, %Y', # 'October 25 2006', 'October 25, 2006'
318+
'%d %B %Y', '%d %B, %Y', # '25 October 2006', '25 October, 2006'
319+
)
320+
321+
# Default formats to be used when parsing times from input boxes, in order
322+
# See all available format string here:
323+
# http://docs.python.org/library/datetime.html#strftime-behavior
324+
# * Note that these format strings are different from the ones to display dates
325+
TIME_INPUT_FORMATS = (
326+
'%H:%M:%S', # '14:30:59'
327+
'%H:%M', # '14:30'
328+
)
329+
330+
# Default formats to be used when parsing dates and times from input boxes,
331+
# in order
332+
# See all available format string here:
333+
# http://docs.python.org/library/datetime.html#strftime-behavior
334+
# * Note that these format strings are different from the ones to display dates
335+
DATETIME_INPUT_FORMATS = (
336+
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
337+
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
338+
'%Y-%m-%d', # '2006-10-25'
339+
'%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59'
340+
'%m/%d/%Y %H:%M', # '10/25/2006 14:30'
341+
'%m/%d/%Y', # '10/25/2006'
342+
'%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59'
343+
'%m/%d/%y %H:%M', # '10/25/06 14:30'
344+
'%m/%d/%y', # '10/25/06'
345+
)
346+
347+
# First day of week, to be used on calendars
348+
# 0 means Sunday, 1 means Monday...
349+
FIRST_DAY_OF_WEEK = 0
350+
351+
# Decimal separator symbol
352+
DECIMAL_SEPARATOR = '.'
353+
354+
# Boolean that sets whether to add thousand separator when formatting numbers
355+
USE_THOUSAND_SEPARATOR = False
356+
357+
# Number of digits that will be togheter, when spliting them by THOUSAND_SEPARATOR
358+
# 0 means no grouping, 3 means splitting by thousands...
359+
NUMBER_GROUPING = 0
360+
361+
# Thousand separator symbol
362+
THOUSAND_SEPARATOR = ','
363+
286364
# Do you want to manage transactions manually?
287365
# Hint: you really don't!
288366
TRANSACTIONS_MANAGED = False
@@ -308,6 +386,7 @@
308386
'django.contrib.sessions.middleware.SessionMiddleware',
309387
'django.middleware.csrf.CsrfViewMiddleware',
310388
'django.contrib.auth.middleware.AuthenticationMiddleware',
389+
'django.contrib.messages.middleware.MessageMiddleware',
311390
# 'django.middleware.http.ConditionalGetMiddleware',
312391
# 'django.middleware.gzip.GZipMiddleware',
313392
)
@@ -393,6 +472,16 @@
393472
CSRF_COOKIE_NAME = 'csrftoken'
394473
CSRF_COOKIE_DOMAIN = None
395474

475+
############
476+
# MESSAGES #
477+
############
478+
479+
# Class to use as messges backend
480+
MESSAGE_STORAGE = 'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'
481+
482+
# Default values of MESSAGE_LEVEL and MESSAGE_TAGS are defined within
483+
# django.contrib.messages to avoid imports in this settings file.
484+
396485
###########
397486
# TESTING #
398487
###########

django/conf/locale/ar/formats.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# -*- encoding: utf-8 -*-
2+
# This file is distributed under the same license as the Django package.
3+
#
4+
5+
DATE_FORMAT = 'j F، Y'
6+
TIME_FORMAT = 'g:i:s A'
7+
# DATETIME_FORMAT =
8+
YEAR_MONTH_FORMAT = 'F Y'
9+
MONTH_DAY_FORMAT = 'j F'
10+
SHORT_DATE_FORMAT = 'd‏/m‏/Y'
11+
# SHORT_DATETIME_FORMAT =
12+
# FIRST_DAY_OF_WEEK =
13+
# DATE_INPUT_FORMATS =
14+
# TIME_INPUT_FORMATS =
15+
# DATETIME_INPUT_FORMATS =
16+
DECIMAL_SEPARATOR = ','
17+
THOUSAND_SEPARATOR = '.'
18+
# NUMBER_GROUPING =

django/conf/locale/bg/__init__.py

Whitespace-only changes.

django/conf/locale/bg/formats.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# -*- encoding: utf-8 -*-
2+
# This file is distributed under the same license as the Django package.
3+
#
4+
5+
DATE_FORMAT = 'd F Y'
6+
TIME_FORMAT = 'H:i:s'
7+
# DATETIME_FORMAT =
8+
# YEAR_MONTH_FORMAT =
9+
MONTH_DAY_FORMAT = 'j F'
10+
SHORT_DATE_FORMAT = 'd.m.Y'
11+
# SHORT_DATETIME_FORMAT =
12+
# FIRST_DAY_OF_WEEK =
13+
# DATE_INPUT_FORMATS =
14+
# TIME_INPUT_FORMATS =
15+
# DATETIME_INPUT_FORMATS =
16+
DECIMAL_SEPARATOR = ','
17+
THOUSAND_SEPARATOR = ' '
18+
# NUMBER_GROUPING =

django/conf/locale/bn/__init__.py

Whitespace-only changes.

django/conf/locale/bn/formats.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# -*- encoding: utf-8 -*-
2+
# This file is distributed under the same license as the Django package.
3+
#
4+
5+
DATE_FORMAT = 'j F, Y'
6+
TIME_FORMAT = 'g:i:s A'
7+
# DATETIME_FORMAT =
8+
YEAR_MONTH_FORMAT = 'F Y'
9+
MONTH_DAY_FORMAT = 'j F'
10+
SHORT_DATE_FORMAT = 'j M, Y'
11+
# SHORT_DATETIME_FORMAT =
12+
# FIRST_DAY_OF_WEEK =
13+
# DATE_INPUT_FORMATS =
14+
# TIME_INPUT_FORMATS =
15+
# DATETIME_INPUT_FORMATS =
16+
DECIMAL_SEPARATOR = '.'
17+
THOUSAND_SEPARATOR = ','
18+
# NUMBER_GROUPING =

django/conf/locale/ca/__init__.py

Whitespace-only changes.

django/conf/locale/ca/formats.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# -*- encoding: utf-8 -*-
2+
# This file is distributed under the same license as the Django package.
3+
#
4+
5+
DATE_FORMAT = 'j \de F \de Y'
6+
TIME_FORMAT = 'G:i:s'
7+
DATETIME_FORMAT = 'j \de F \de Y \\a \le\s G:i'
8+
YEAR_MONTH_FORMAT = 'F \de\l Y'
9+
MONTH_DAY_FORMAT = 'j \de F'
10+
SHORT_DATE_FORMAT = 'd/m/Y'
11+
SHORT_DATETIME_FORMAT = 'd/m/Y G:i'
12+
FIRST_DAY_OF_WEEK = 1 # Monday
13+
DATE_INPUT_FORMATS = (
14+
# '31/12/2009', '31/12/09'
15+
'%d/%m/%Y', '%d/%m/%y'
16+
)
17+
TIME_INPUT_FORMATS = (
18+
# '14:30:59', '14:30'
19+
'%H:%M:%S', '%H:%M'
20+
)
21+
DATETIME_INPUT_FORMATS = (
22+
'%d/%m/%Y %H:%M:%S',
23+
'%d/%m/%Y %H:%M',
24+
'%d/%m/%y %H:%M:%S',
25+
'%d/%m/%y %H:%M',
26+
)
27+
DECIMAL_SEPARATOR = ','
28+
THOUSAND_SEPARATOR = '.'
29+
NUMBER_GROUPING = 3
30+

django/conf/locale/cs/__init__.py

Whitespace-only changes.

django/conf/locale/cs/formats.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# -*- encoding: utf-8 -*-
2+
# This file is distributed under the same license as the Django package.
3+
#
4+
5+
DATE_FORMAT = 'j. F Y'
6+
TIME_FORMAT = 'G:i:s'
7+
DATETIME_FORMAT = 'j. F Y G:i:s'
8+
YEAR_MONTH_FORMAT = 'F Y'
9+
MONTH_DAY_FORMAT = 'j. F'
10+
SHORT_DATE_FORMAT = 'd.m.Y'
11+
SHORT_DATETIME_FORMAT = 'd.m.Y G:i:s'
12+
FIRST_DAY_OF_WEEK = 1 # Monday
13+
DATE_INPUT_FORMATS = (
14+
'%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
15+
'%Y-%m-%d', '%y-%m-%d', # '2006-10-25', '06-10-25'
16+
'%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006'
17+
)
18+
TIME_INPUT_FORMATS = (
19+
'%H:%M:%S', # '14:30:59'
20+
'%H:%M', # '14:30'
21+
)
22+
DATETIME_INPUT_FORMATS = (
23+
'%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
24+
'%d.%m.%Y %H:%M', # '25.10.2006 14:30'
25+
'%d.%m.%Y', # '25.10.2006'
26+
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
27+
'%Y-%m-%d %H:%M', # '2006-10-25 14:30'
28+
'%Y-%m-%d', # '2006-10-25'
29+
)
30+
DECIMAL_SEPARATOR = ','
31+
THOUSAND_SEPARATOR = ' '
32+
NUMBER_GROUPING = 3

django/conf/locale/cy/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)