Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

newforms-admin: Merged to [6612]

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@6613 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1746760500a3232e7752626fc33deda7f6b74862 1 parent 11b6e1e
Joseph Kocherhans authored October 26, 2007

Showing 99 changed files with 12,093 additions and 9,397 deletions. Show diff stats Hide diff stats

  1. 10  AUTHORS
  2. 10  django/conf/__init__.py
  3. 3  django/conf/global_settings.py
  4. BIN  django/conf/locale/ca/LC_MESSAGES/django.mo
  5. 4,848  django/conf/locale/ca/LC_MESSAGES/django.po
  6. BIN  django/conf/locale/es/LC_MESSAGES/django.mo
  7. 4,848  django/conf/locale/es/LC_MESSAGES/django.po
  8. BIN  django/conf/locale/es_AR/LC_MESSAGES/django.mo
  9. 4,678  django/conf/locale/es_AR/LC_MESSAGES/django.po
  10. BIN  django/conf/locale/es_AR/LC_MESSAGES/djangojs.mo
  11. 14  django/conf/locale/es_AR/LC_MESSAGES/djangojs.po
  12. BIN  django/conf/locale/he/LC_MESSAGES/django.mo
  13. 5,006  django/conf/locale/he/LC_MESSAGES/django.po
  14. BIN  django/conf/locale/hr/LC_MESSAGES/django.mo
  15. 262  django/conf/locale/hr/LC_MESSAGES/django.po
  16. 10  django/contrib/admin/media/js/urlify.js
  17. 4  django/contrib/comments/feeds.py
  18. 58  django/contrib/localflavor/es/es_provinces.py
  19. 23  django/contrib/localflavor/es/es_regions.py
  20. 173  django/contrib/localflavor/es/forms.py
  21. 94  django/contrib/localflavor/pl/forms.py
  22. 1  django/contrib/sessions/backends/base.py
  23. 12  django/contrib/sessions/middleware.py
  24. 23  django/contrib/sessions/tests.py
  25. 1  django/contrib/syndication/feeds.py
  26. 8  django/core/cache/backends/base.py
  27. 8  django/core/cache/backends/db.py
  28. 3  django/core/cache/backends/dummy.py
  29. 20  django/core/cache/backends/filebased.py
  30. 7  django/core/cache/backends/locmem.py
  31. 3  django/core/cache/backends/memcached.py
  32. 9  django/core/cache/backends/simple.py
  33. 19  django/core/handlers/modpython.py
  34. 20  django/core/handlers/wsgi.py
  35. 4  django/core/mail.py
  36. 111  django/core/management/__init__.py
  37. 27  django/core/management/base.py
  38. 10  django/core/management/color.py
  39. 2  django/core/management/commands/runserver.py
  40. 2  django/core/management/validation.py
  41. 5  django/core/urlresolvers.py
  42. 21  django/db/backends/__init__.py
  43. 2  django/db/backends/postgresql/operations.py
  44. 9  django/db/backends/postgresql_psycopg2/base.py
  45. 18  django/db/backends/util.py
  46. 2  django/db/models/fields/__init__.py
  47. 75  django/dispatch/saferef.py
  48. 34  django/http/__init__.py
  49. 10  django/middleware/common.py
  50. 7  django/middleware/gzip.py
  51. 10  django/newforms/fields.py
  52. 29  django/newforms/widgets.py
  53. 10  django/template/defaulttags.py
  54. 8  django/templatetags/i18n.py
  55. 5  django/test/utils.py
  56. 73  django/utils/datastructures.py
  57. 2  django/utils/encoding.py
  58. 10  django/utils/feedgenerator.py
  59. 16  django/utils/functional.py
  60. 3  django/utils/http.py
  61. 5  django/utils/translation/__init__.py
  62. 2  django/utils/translation/trans_null.py
  63. 133  django/utils/translation/trans_real.py
  64. 9  django/views/debug.py
  65. 12  django/views/static.py
  66. 22  docs/apache_auth.txt
  67. 54  docs/cache.txt
  68. 5  docs/contributing.txt
  69. 8  docs/databases.txt
  70. 17  docs/django-admin.txt
  71. 2  docs/flatpages.txt
  72. 9  docs/i18n.txt
  73. 5  docs/install.txt
  74. 13  docs/middleware.txt
  75. 10  docs/model-api.txt
  76. 16  docs/modpython.txt
  77. 52  docs/newforms.txt
  78. 4  docs/request_response.txt
  79. 37  docs/settings.txt
  80. 16  docs/syndication_feeds.txt
  81. 56  docs/templates.txt
  82. 2  docs/templates_python.txt
  83. 2  docs/tutorial01.txt
  84. 30  docs/unicode.txt
  85. 0  localflavor/es/__init__.py b/django/contrib/localflavor/es/__init__.py
  86. 6  tests/modeltests/invalid_models/models.py
  87. 30  tests/regressiontests/auth_backends/tests.py
  88. 6  tests/regressiontests/cache/tests.py
  89. 19  tests/regressiontests/datastructures/tests.py
  90. 30  tests/regressiontests/forms/localflavor/pl.py
  91. 50  tests/regressiontests/forms/models.py
  92. 2  tests/regressiontests/forms/tests.py
  93. 23  tests/regressiontests/forms/widgets.py
  94. 57  tests/regressiontests/i18n/misc.py
  95. 8  tests/regressiontests/i18n/tests.py
  96. 23  tests/regressiontests/templates/tests.py
  97. 4  tests/regressiontests/text/tests.py
  98. 28  tests/regressiontests/utils/tests.py
  99. 3  tests/runtests.py
10  AUTHORS
@@ -49,7 +49,8 @@ answer newbie questions, and generally made Django that much better:
49 49
     andy@jadedplanet.net
50 50
     Fabrice Aneche <akh@nobugware.com>
51 51
     ant9000@netwise.it
52  
-    Florian Apolloner 
  52
+    Florian Apolloner
  53
+    arien <regexbot@gmail.com>
53 54
     David Ascher <http://ascher.ca/>
54 55
     david@kazserve.org
55 56
     Arthur <avandorp@gmail.com>
@@ -171,6 +172,7 @@ answer newbie questions, and generally made Django that much better:
171 172
     Nagy Károly <charlie@rendszergazda.com>
172 173
     Ben Dean Kawamura <ben.dean.kawamura@gmail.com>
173 174
     Ian G. Kelly <ian.g.kelly@gmail.com>
  175
+    Thomas Kerpe <thomas@kerpe.net>
174 176
     Ben Khoo <khoobks@westnet.com.au>
175 177
     Garth Kidd <http://www.deadlybloodyserious.com/>
176 178
     kilian <kilian.cavalotti@lip6.fr>
@@ -218,6 +220,7 @@ answer newbie questions, and generally made Django that much better:
218 220
     mccutchen@gmail.com
219 221
     Christian Metts
220 222
     michael.mcewan@gmail.com
  223
+    michal@plovarna.cz
221 224
     mikko@sorl.net
222 225
     Slawek Mikula <slawek dot mikula at gmail dot com>
223 226
     mitakummaa@gmail.com
@@ -262,13 +265,14 @@ answer newbie questions, and generally made Django that much better:
262 265
     Brian Ray <http://brianray.chipy.org/>
263 266
     remco@diji.biz
264 267
     rhettg@gmail.com
  268
+    ricardojbarrios@gmail.com
265 269
     Matt Riggott
266 270
     Henrique Romano <onaiort@gmail.com>
267 271
     Armin Ronacher
268 272
     Brian Rosner <brosner@gmail.com>
269 273
     Oliver Rutherfurd <http://rutherfurd.net/>
270 274
     ryankanno
271  
-    Manuel Saelices <msaelices@yaco.es> 
  275
+    Manuel Saelices <msaelices@yaco.es>
272 276
     Ivan Sagalaev (Maniac) <http://www.softwaremaniacs.org/>
273 277
     Vinay Sajip <vinay_sajip@yahoo.co.uk>
274 278
     David Schein
@@ -276,6 +280,7 @@ answer newbie questions, and generally made Django that much better:
276 280
     serbaut@gmail.com
277 281
     John Shaffer <jshaffer2112@gmail.com>
278 282
     Pete Shinners <pete@shinners.org>
  283
+    jason.sidabras@gmail.com
279 284
     Jozko Skrablin <jozko.skrablin@gmail.com>
280 285
     SmileyChris <smileychris@gmail.com>
281 286
     smurf@smurf.noris.de
@@ -330,6 +335,7 @@ answer newbie questions, and generally made Django that much better:
330 335
     Jakub Wiśniowski <restless.being@gmail.com>
331 336
     Maciej Wiśniowski <pigletto@gmail.com>
332 337
     wojtek
  338
+    Jason Yan <tailofthesun@gmail.com>
333 339
     ye7cakf02@sneakemail.com
334 340
     ymasuda@ethercube.com
335 341
     Jarek Zgoda <jarek.zgoda@gmail.com>
10  django/conf/__init__.py
@@ -140,13 +140,3 @@ def get_all_members(self):
140 140
 
141 141
 settings = LazySettings()
142 142
 
143  
-# This function replaces itself with django.utils.translation.gettext() the
144  
-# first time it's run. This is necessary because the import of
145  
-# django.utils.translation requires a working settings module, and loading it
146  
-# from within this file would cause a circular import.
147  
-def first_time_gettext(*args):
148  
-    from django.utils.translation import gettext
149  
-    __builtins__['_'] = gettext
150  
-    return gettext(*args)
151  
-
152  
-__builtins__['_'] = first_time_gettext
3  django/conf/global_settings.py
@@ -30,7 +30,7 @@
30 30
 TIME_ZONE = 'America/Chicago'
31 31
 
32 32
 # Language code for this installation. All choices can be found here:
33  
-# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
  33
+# http://www.i18nguy.com/unicode/language-identifiers.html
34 34
 LANGUAGE_CODE = 'en-us'
35 35
 
36 36
 # Languages we provide translations for, out of the box. The language name
@@ -275,6 +275,7 @@
275 275
 SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2               # Age of cookie, in seconds (default: 2 weeks).
276 276
 SESSION_COOKIE_DOMAIN = None                            # A string like ".lawrence.com", or None for standard domain cookie.
277 277
 SESSION_COOKIE_SECURE = False                           # Whether the session cookie should be secure (https:// only).
  278
+SESSION_COOKIE_PATH = '/'                               # The path of the session cookie.
278 279
 SESSION_SAVE_EVERY_REQUEST = False                      # Whether to save the session data on every request.
279 280
 SESSION_EXPIRE_AT_BROWSER_CLOSE = False                 # Whether sessions expire when a user closes his browser.
280 281
 SESSION_ENGINE = 'django.contrib.sessions.backends.db'  # The module to store session data
BIN  django/conf/locale/ca/LC_MESSAGES/django.mo
Binary file not shown
4,848  django/conf/locale/ca/LC_MESSAGES/django.po
2573 additions, 2275 deletions not shown
BIN  django/conf/locale/es/LC_MESSAGES/django.mo
Binary file not shown
4,848  django/conf/locale/es/LC_MESSAGES/django.po
2573 additions, 2275 deletions not shown
BIN  django/conf/locale/es_AR/LC_MESSAGES/django.mo
Binary file not shown
4,678  django/conf/locale/es_AR/LC_MESSAGES/django.po
2612 additions, 2066 deletions not shown
BIN  django/conf/locale/es_AR/LC_MESSAGES/djangojs.mo
Binary file not shown
14  django/conf/locale/es_AR/LC_MESSAGES/djangojs.po
@@ -6,12 +6,12 @@ msgid ""
6 6
 msgstr ""
7 7
 "Project-Id-Version: Django Javascript 1.0\n"
8 8
 "Report-Msgid-Bugs-To: \n"
9  
-"POT-Creation-Date: 2007-07-14 13:45-0300\n"
  9
+"POT-Creation-Date: 2007-10-06 14:18-0300\n"
10 10
 "PO-Revision-Date: 2007-07-14 14:36-0300\n"
11 11
 "Last-Translator: Ramiro Morales <rm0@gmx.net>\n"
12 12
 "Language-Team: Django-I18N <django-i18n@googlegroups.com>\n"
13 13
 "MIME-Version: 1.0\n"
14  
-"Content-Type: text/plain; charset=utf-8\n"
  14
+"Content-Type: text/plain; charset=UTF-8\n"
15 15
 "Content-Transfer-Encoding: 8bit\n"
16 16
 
17 17
 #: contrib/admin/media/js/SelectFilter2.js:33
@@ -44,8 +44,8 @@ msgstr "Seleccione los items a agregar y haga click en "
44 44
 msgid "Clear all"
45 45
 msgstr "Eliminar todos"
46 46
 
47  
-#: contrib/admin/media/js/dateparse.js:32
48 47
 #: contrib/admin/media/js/calendar.js:24
  48
+#: contrib/admin/media/js/dateparse.js:32
49 49
 msgid ""
50 50
 "January February March April May June July August September October November "
51 51
 "December"
@@ -53,14 +53,14 @@ msgstr ""
53 53
 "Enero Febrero Marzo Abril Mayo Junio Julio Agosto Setiembre Octubre "
54 54
 "Noviembre Diciembre"
55 55
 
56  
-#: contrib/admin/media/js/dateparse.js:33
57  
-msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
58  
-msgstr "Domingo Lunes Martes Miércoles Jueves Viernes Sábado"
59  
-
60 56
 #: contrib/admin/media/js/calendar.js:25
61 57
 msgid "S M T W T F S"
62 58
 msgstr "D L M M J V S"
63 59
 
  60
+#: contrib/admin/media/js/dateparse.js:33
  61
+msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
  62
+msgstr "Domingo Lunes Martes Miércoles Jueves Viernes Sábado"
  63
+
64 64
 #: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
65 65
 #: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
66 66
 msgid "Show"
BIN  django/conf/locale/he/LC_MESSAGES/django.mo
Binary file not shown
5,006  django/conf/locale/he/LC_MESSAGES/django.po
2769 additions, 2237 deletions not shown
BIN  django/conf/locale/hr/LC_MESSAGES/django.mo
Binary file not shown
262  django/conf/locale/hr/LC_MESSAGES/django.po
@@ -7,7 +7,7 @@ msgstr ""
7 7
 "Project-Id-Version: django\n"
8 8
 "Report-Msgid-Bugs-To: \n"
9 9
 "POT-Creation-Date: 2007-08-06 23:19+0200\n"
10  
-"PO-Revision-Date: 2007-08-12 23:05+0200\n"
  10
+"PO-Revision-Date: 2007-10-12 21:22+0200\n"
11 11
 "Last-Translator: Aljosa Mohorovic <aljosa.mohorovic@gmail.com>\n"
12 12
 "Language-Team: Hrvatski jezik\n"
13 13
 "MIME-Version: 1.0\n"
@@ -28,7 +28,7 @@ msgstr "Unos za ovo polje je obavezan."
28 28
 #, python-format
29 29
 msgid "Ensure your text is less than %s character."
30 30
 msgid_plural "Ensure your text is less than %s characters."
31  
-msgstr[0] "Uneseni tekst mora sadržavati manje od %s znaka."
  31
+msgstr[0] ""
32 32
 msgstr[1] "Uneseni tekst mora sadržavati manje od %s znakova."
33 33
 
34 34
 #: oldforms/__init__.py:413
@@ -398,62 +398,62 @@ msgstr "URL %s ne prikazuje ispravnu sliku."
398 398
 #: core/validators.py:196
399 399
 #, python-format
400 400
 msgid "Phone numbers must be in XXX-XXX-XXXX format. \"%s\" is invalid."
401  
-msgstr ""
  401
+msgstr "Telefonski brojevi moraju biti u formatu XXX-XXX-XXXX. \"%s\" nije ispravan format."
402 402
 
403 403
 #: core/validators.py:204
404 404
 #, python-format
405 405
 msgid "The URL %s does not point to a valid QuickTime video."
406  
-msgstr ""
  406
+msgstr "URL %s ne vodi na ispravan QuickTime video."
407 407
 
408 408
 #: core/validators.py:208
409 409
 msgid "A valid URL is required."
410  
-msgstr ""
  410
+msgstr "Ispravan URL je obavezan."
411 411
 
412 412
 #: core/validators.py:222
413 413
 #, python-format
414 414
 msgid ""
415 415
 "Valid HTML is required. Specific errors are:\n"
416 416
 "%s"
417  
-msgstr ""
  417
+msgstr "Ispravan HTML je obavezan. Pogreške:<br> %s"
418 418
 
419 419
 #: core/validators.py:229
420 420
 #, python-format
421 421
 msgid "Badly formed XML: %s"
422  
-msgstr ""
  422
+msgstr "Loše formatiran XML: %s"
423 423
 
424 424
 #: core/validators.py:246
425 425
 #, python-format
426 426
 msgid "Invalid URL: %s"
427  
-msgstr ""
  427
+msgstr "Neispravan URL: %s"
428 428
 
429 429
 #: core/validators.py:251 core/validators.py:253
430 430
 #, python-format
431 431
 msgid "The URL %s is a broken link."
432  
-msgstr ""
  432
+msgstr "URL %s je neispravan (broken) link."
433 433
 
434 434
 #: core/validators.py:259
435 435
 msgid "Enter a valid U.S. state abbreviation."
436  
-msgstr ""
  436
+msgstr "Enter a valid U.S. state abbreviation."
437 437
 
438 438
 #: core/validators.py:273
439 439
 #, python-format
440 440
 msgid "Watch your mouth! The word %s is not allowed here."
441 441
 msgid_plural "Watch your mouth! The words %s are not allowed here."
442  
-msgstr[0] ""
443  
-msgstr[1] ""
  442
+msgstr[0] "Pazite na izražavanje! Riječ %s nije dopuštena."
  443
+msgstr[1] "Pazite na izražavanje! Riječi %s nisu dopuštene."
444 444
 
445 445
 #: core/validators.py:280
446 446
 #, python-format
447 447
 msgid "This field must match the '%s' field."
448  
-msgstr ""
  448
+msgstr "Ovo polje mora biti jednako %s polju."
449 449
 
450 450
 #: core/validators.py:299
451 451
 msgid "Please enter something for at least one field."
452  
-msgstr ""
  452
+msgstr "Molim unesite nešto bar za jedno polje."
453 453
 
454 454
 #: core/validators.py:308 core/validators.py:319
455 455
 msgid "Please enter both fields or leave them both empty."
456  
-msgstr ""
  456
+msgstr "Molim unesite vrijednosti za oba polja ili ostavite oba polja prazna."
457 457
 
458 458
 #: core/validators.py:327
459 459
 #, python-format
@@ -463,7 +463,7 @@ msgstr ""
463 463
 #: core/validators.py:340
464 464
 #, python-format
465 465
 msgid "This field must be given if %(field)s is not %(value)s"
466  
-msgstr ""
  466
+msgstr "Ovo polje je obavezno ako je %(field)s različito od %(value)s"
467 467
 
468 468
 #: core/validators.py:359
469 469
 msgid "Duplicate values are not allowed."
@@ -471,28 +471,27 @@ msgstr ""
471 471
 
472 472
 #: core/validators.py:374
473 473
 #, python-format
474  
-#, fuzzy
475 474
 msgid "This value must be between %(lower)s and %(upper)s."
476  
-msgstr "i."
  475
+msgstr "Vrijednost mora biti između %(lower)s i %(upper)s."
477 476
 
478 477
 #: core/validators.py:376
479 478
 #, python-format
480 479
 msgid "This value must be at least %s."
481  
-msgstr ""
  480
+msgstr "Vrijednost mora biti bar %s."
482 481
 
483 482
 #: core/validators.py:378
484 483
 #, python-format
485 484
 msgid "This value must be no more than %s."
486  
-msgstr ""
  485
+msgstr "Vrijednost ne može biti veća od %s."
487 486
 
488 487
 #: core/validators.py:414
489 488
 #, python-format
490 489
 msgid "This value must be a power of %s."
491  
-msgstr ""
  490
+msgstr "Ova vrijednost na kvadrat mora biti %s."
492 491
 
493 492
 #: core/validators.py:424
494 493
 msgid "Please enter a valid decimal number."
495  
-msgstr ""
  494
+msgstr "Molim unesite ispravan decimalni broj."
496 495
 
497 496
 #: core/validators.py:431
498 497
 #, python-format
@@ -1879,7 +1878,6 @@ msgid "Documentation bookmarklets"
1879 1878
 msgstr ""
1880 1879
 
1881 1880
 #: contrib/admin/templates/admin_doc/bookmarklets.html:9
1882  
-#, fuzzy
1883 1881
 msgid ""
1884 1882
 "\n"
1885 1883
 "<p class=\"help\">To install bookmarklets, drag the link to your bookmarks\n"
@@ -1890,107 +1888,110 @@ msgid ""
1890 1888
 "your computer is \"internal\").</p>\n"
1891 1889
 msgstr ""
1892 1890
 "\n"
1893  
-"<p class=\"help\"> i</p>"
  1891
+"<p class=\"help\">To install bookmarklets, drag the link to your bookmarks\n"
  1892
+"toolbar, or right-click the link and add it to your bookmarks. Now you can\n"
  1893
+"select the bookmarklet from any page in the site.  Note that some of these\n"
  1894
+"bookmarklets require you to be viewing the site from a computer designated\n"
  1895
+"as \"internal\" (talk to your system administrator if you aren't sure if\n"
  1896
+"your computer is \"internal\").</p>\n"
1894 1897
 
1895 1898
 #: contrib/admin/templates/admin_doc/bookmarklets.html:19
1896 1899
 msgid "Documentation for this page"
1897  
-msgstr ""
  1900
+msgstr "Dokumentacija za ovu stranicu"
1898 1901
 
1899 1902
 #: contrib/admin/templates/admin_doc/bookmarklets.html:20
1900 1903
 msgid ""
1901 1904
 "Jumps you from any page to the documentation for the view that generates "
1902 1905
 "that page."
1903  
-msgstr ""
  1906
+msgstr "Preusmjeri te sa bilo koje stranice na dokumentaciju za taj prikaz (view) koji generira stranicu."
1904 1907
 
1905 1908
 #: contrib/admin/templates/admin_doc/bookmarklets.html:22
1906 1909
 msgid "Show object ID"
1907  
-msgstr ""
  1910
+msgstr "Prikaži ID objekta"
1908 1911
 
1909 1912
 #: contrib/admin/templates/admin_doc/bookmarklets.html:23
1910  
-#, fuzzy
1911 1913
 msgid ""
1912 1914
 "Shows the content-type and unique ID for pages that represent a single "
1913 1915
 "object."
1914  
-msgstr "i."
  1916
+msgstr "Prikazuje tip sadržaja i jedinstveni ID za stranice koje predstavljaju pojedinačan objekt."
1915 1917
 
1916 1918
 #: contrib/admin/templates/admin_doc/bookmarklets.html:25
1917 1919
 msgid "Edit this object (current window)"
1918  
-msgstr ""
  1920
+msgstr "Uredi objekt (u trenutno prozoru)"
1919 1921
 
1920 1922
 #: contrib/admin/templates/admin_doc/bookmarklets.html:26
1921 1923
 msgid "Jumps to the admin page for pages that represent a single object."
1922  
-msgstr ""
  1924
+msgstr "Preusmjeri na admin stranicu za stranice koje predstavljaju pojedinačan objekt."
1923 1925
 
1924 1926
 #: contrib/admin/templates/admin_doc/bookmarklets.html:28
1925 1927
 msgid "Edit this object (new window)"
1926  
-msgstr ""
  1928
+msgstr "Uredi objekt (novi prozor)"
1927 1929
 
1928 1930
 #: contrib/admin/templates/admin_doc/bookmarklets.html:29
1929 1931
 msgid "As above, but opens the admin page in a new window."
1930  
-msgstr ""
  1932
+msgstr "Isto kao prethodno, ali otvara admin stranicu u novom prozoru."
1931 1933
 
1932 1934
 #: contrib/contenttypes/models.py:37
1933 1935
 msgid "python model class name"
1934  
-msgstr ""
  1936
+msgstr "ime klase (class) python modela"
1935 1937
 
1936 1938
 #: contrib/contenttypes/models.py:40
1937 1939
 msgid "content type"
1938  
-msgstr ""
  1940
+msgstr "tip sadržaja"
1939 1941
 
1940 1942
 #: contrib/contenttypes/models.py:41
1941 1943
 msgid "content types"
1942  
-msgstr ""
  1944
+msgstr "tipovi sadržaja"
1943 1945
 
1944 1946
 #: contrib/auth/views.py:41
1945 1947
 msgid "Logged out"
1946  
-msgstr ""
  1948
+msgstr "Niste logirani"
1947 1949
 
1948 1950
 #: contrib/auth/models.py:53 contrib/auth/models.py:73
1949 1951
 msgid "name"
1950  
-msgstr ""
  1952
+msgstr "ime"
1951 1953
 
1952 1954
 #: contrib/auth/models.py:55
1953 1955
 msgid "codename"
1954  
-msgstr ""
  1956
+msgstr "kodno ime"
1955 1957
 
1956 1958
 #: contrib/auth/models.py:58
1957 1959
 msgid "permission"
1958  
-msgstr ""
  1960
+msgstr "privilegija"
1959 1961
 
1960 1962
 #: contrib/auth/models.py:59 contrib/auth/models.py:74
1961 1963
 msgid "permissions"
1962  
-msgstr ""
  1964
+msgstr "privilegije"
1963 1965
 
1964 1966
 #: contrib/auth/models.py:77
1965 1967
 msgid "group"
1966  
-msgstr ""
  1968
+msgstr "grupa"
1967 1969
 
1968 1970
 #: contrib/auth/models.py:78 contrib/auth/models.py:121
1969 1971
 msgid "groups"
1970  
-msgstr ""
  1972
+msgstr "grupe"
1971 1973
 
1972 1974
 #: contrib/auth/models.py:111
1973 1975
 msgid "username"
1974  
-msgstr ""
  1976
+msgstr "korisničko ime"
1975 1977
 
1976 1978
 #: contrib/auth/models.py:111
1977  
-#, fuzzy
1978 1979
 msgid ""
1979 1980
 "Required. 30 characters or fewer. Alphanumeric characters only (letters, "
1980 1981
 "digits and underscores)."
1981  
-msgstr "i."
  1982
+msgstr "Obavezno 30 alfanumeričkih znakova ili manje (slova, brojevi i povlaka)."
1982 1983
 
1983 1984
 #: contrib/auth/models.py:112
1984 1985
 msgid "first name"
1985  
-msgstr ""
  1986
+msgstr "ime"
1986 1987
 
1987 1988
 #: contrib/auth/models.py:113
1988 1989
 msgid "last name"
1989  
-msgstr ""
  1990
+msgstr "prezime"
1990 1991
 
1991 1992
 #: contrib/auth/models.py:114
1992 1993
 msgid "e-mail address"
1993  
-msgstr ""
  1994
+msgstr "e-mail adresa"
1994 1995
 
1995 1996
 #: contrib/auth/models.py:115
1996 1997
 msgid "password"
@@ -2207,7 +2208,7 @@ msgstr ""
2207 2208
 
2208 2209
 #: contrib/localflavor/de/de_states.py:17
2209 2210
 msgid "Saxony"
2210  
-msgstr ""
  2211
+msgstr "Saxony"
2211 2212
 
2212 2213
 #: contrib/localflavor/de/de_states.py:18
2213 2214
 msgid "Saxony-Anhalt"
@@ -2899,306 +2900,305 @@ msgstr ""
2899 2900
 
2900 2901
 #: contrib/localflavor/sk/sk_districts.py:85
2901 2902
 msgid "Ziar nad Hronom"
2902  
-msgstr ""
  2903
+msgstr "Ziar nad Hronom"
2903 2904
 
2904 2905
 #: contrib/localflavor/sk/sk_districts.py:86
2905 2906
 msgid "Zilina"
2906  
-msgstr ""
  2907
+msgstr "Zilina"
2907 2908
 
2908 2909
 #: contrib/localflavor/sk/forms.py:32
2909 2910
 msgid "Enter a postal code in the format XXXXX or XXX XX."
2910  
-msgstr ""
  2911
+msgstr "Unesi ispravan poštanski broj formata XXXXX or XXX XX."
2911 2912
 
2912 2913
 #: contrib/localflavor/cl/forms.py:32
2913 2914
 msgid "Enter valid a Chilean RUT. The format is XX.XXX.XXX-X."
2914  
-msgstr ""
  2915
+msgstr "Unesi ispravan čileanski RUT formata XX.XXX.XXX-X."
2915 2916
 
2916 2917
 #: contrib/localflavor/cl/forms.py:37
2917 2918
 msgid "Enter valid a Chilean RUT"
2918  
-msgstr ""
  2919
+msgstr "Unesi ispravan čileanski RUT"
2919 2920
 
2920 2921
 #: contrib/localflavor/fi/forms.py:40 contrib/localflavor/fi/forms.py:45
2921 2922
 msgid "Enter a valid Finnish social security number."
2922  
-msgstr ""
  2923
+msgstr "Unesi ispravan finski broj socijalnog osiguranja."
2923 2924
 
2924 2925
 #: contrib/sessions/models.py:68
2925 2926
 msgid "session key"
2926  
-msgstr ""
  2927
+msgstr "session ključ (key)"
2927 2928
 
2928 2929
 #: contrib/sessions/models.py:69
2929 2930
 msgid "session data"
2930  
-msgstr ""
  2931
+msgstr "session podaci"
2931 2932
 
2932 2933
 #: contrib/sessions/models.py:70
2933 2934
 msgid "expire date"
2934  
-msgstr ""
  2935
+msgstr "ističe datuma"
2935 2936
 
2936 2937
 #: contrib/sessions/models.py:74
2937 2938
 msgid "session"
2938  
-msgstr ""
  2939
+msgstr "session"
2939 2940
 
2940 2941
 #: contrib/sessions/models.py:75
2941 2942
 msgid "sessions"
2942  
-msgstr ""
  2943
+msgstr "sessions"
2943 2944
 
2944 2945
 #: contrib/flatpages/models.py:8
2945  
-#, fuzzy
2946 2946
 msgid "Example: '/about/contact/'. Make sure to have leading and trailing slashes."
2947  
-msgstr "i."
  2947
+msgstr "Primjer: '/about/contact/'. Provjerite ako imate prvi i preostale slash-eve (/)."
2948 2948
 
2949 2949
 #: contrib/flatpages/models.py:9
2950 2950
 msgid "title"
2951  
-msgstr ""
  2951
+msgstr "naslov"
2952 2952
 
2953 2953
 #: contrib/flatpages/models.py:10
2954 2954
 msgid "content"
2955  
-msgstr ""
  2955
+msgstr "sadržaj"
2956 2956
 
2957 2957
 #: contrib/flatpages/models.py:11
2958 2958
 msgid "enable comments"
2959  
-msgstr ""
  2959
+msgstr "uključi komentare"
2960 2960
 
2961 2961
 #: contrib/flatpages/models.py:12
2962 2962
 msgid "template name"
2963  
-msgstr ""
  2963
+msgstr "ime template-a"
2964 2964
 
2965 2965
 #: contrib/flatpages/models.py:13
2966 2966
 msgid ""
2967 2967
 "Example: 'flatpages/contact_page.html'. If this isn't provided, the system "
2968 2968
 "will use 'flatpages/default.html'."
2969  
-msgstr ""
  2969
+msgstr "Primjer: 'flatpages/contact_page.html'. Ako navedeno nije definirano sistem će koristiti 'flatpages/default.html'."
2970 2970
 
2971 2971
 #: contrib/flatpages/models.py:14
2972 2972
 msgid "registration required"
2973  
-msgstr ""
  2973
+msgstr "registracija obavezna"
2974 2974
 
2975 2975
 #: contrib/flatpages/models.py:14
2976 2976
 msgid "If this is checked, only logged-in users will be able to view the page."
2977  
-msgstr ""
  2977
+msgstr "Ako je ovo selektirano samo logirani korisnici moći će vidjeti ovu stranicu."
2978 2978
 
2979 2979
 #: contrib/flatpages/models.py:18
2980 2980
 msgid "flat page"
2981  
-msgstr ""
  2981
+msgstr "statična stranica"
2982 2982
 
2983 2983
 #: contrib/flatpages/models.py:19
2984 2984
 msgid "flat pages"
2985  
-msgstr ""
  2985
+msgstr "statične stranice"
2986 2986
 
2987 2987
 #: utils/dates.py:6
2988 2988
 msgid "Monday"
2989  
-msgstr ""
  2989
+msgstr "Ponedjeljak"
2990 2990
 
2991 2991
 #: utils/dates.py:6
2992 2992
 msgid "Tuesday"
2993  
-msgstr ""
  2993
+msgstr "Utorak"
2994 2994
 
2995 2995
 #: utils/dates.py:6
2996 2996
 msgid "Wednesday"
2997  
-msgstr ""
  2997
+msgstr "Srijeda"
2998 2998
 
2999 2999
 #: utils/dates.py:6
3000 3000
 msgid "Thursday"
3001  
-msgstr ""
  3001
+msgstr "Četvrtak"
3002 3002
 
3003 3003
 #: utils/dates.py:6
3004 3004
 msgid "Friday"
3005  
-msgstr ""
  3005
+msgstr "Petak"
3006 3006
 
3007 3007
 #: utils/dates.py:7
3008 3008
 msgid "Saturday"
3009  
-msgstr ""
  3009
+msgstr "Subota"
3010 3010
 
3011 3011
 #: utils/dates.py:7
3012 3012
 msgid "Sunday"
3013  
-msgstr ""
  3013
+msgstr "Nedjelja"
3014 3014
 
3015 3015
 #: utils/dates.py:10
3016 3016
 msgid "Mon"
3017  
-msgstr ""
  3017
+msgstr "Pon"
3018 3018
 
3019 3019
 #: utils/dates.py:10
3020 3020
 msgid "Tue"
3021  
-msgstr ""
  3021
+msgstr "Uto"
3022 3022
 
3023 3023
 #: utils/dates.py:10
3024 3024
 msgid "Wed"
3025  
-msgstr ""
  3025
+msgstr "Sri"
3026 3026
 
3027 3027
 #: utils/dates.py:10
3028 3028
 msgid "Thu"
3029  
-msgstr ""
  3029
+msgstr "Čet"
3030 3030
 
3031 3031
 #: utils/dates.py:10
3032 3032
 msgid "Fri"
3033  
-msgstr ""
  3033
+msgstr "Pet"
3034 3034
 
3035 3035
 #: utils/dates.py:11
3036 3036
 msgid "Sat"
3037  
-msgstr ""
  3037
+msgstr "Sub"
3038 3038
 
3039 3039
 #: utils/dates.py:11
3040 3040
 msgid "Sun"
3041  
-msgstr ""
  3041
+msgstr "Ned"
3042 3042
 
3043 3043
 #: utils/dates.py:18
3044 3044
 msgid "January"
3045  
-msgstr ""
  3045
+msgstr "Siječanj"
3046 3046
 
3047 3047
 #: utils/dates.py:18
3048 3048
 msgid "February"
3049  
-msgstr ""
  3049
+msgstr "Veljača"
3050 3050
 
3051 3051
 #: utils/dates.py:18 utils/dates.py:31
3052 3052
 msgid "March"
3053  
-msgstr ""
  3053
+msgstr "Ožujak"
3054 3054
 
3055 3055
 #: utils/dates.py:18 utils/dates.py:31
3056 3056
 msgid "April"
3057  
-msgstr ""
  3057
+msgstr "Travanj"
3058 3058
 
3059 3059
 #: utils/dates.py:18 utils/dates.py:31
3060 3060
 msgid "May"
3061  
-msgstr ""
  3061
+msgstr "Svibanj"
3062 3062
 
3063 3063
 #: utils/dates.py:18 utils/dates.py:31
3064 3064
 msgid "June"
3065  
-msgstr ""
  3065
+msgstr "Lipanj"
3066 3066
 
3067 3067
 #: utils/dates.py:19 utils/dates.py:31
3068 3068
 msgid "July"
3069  
-msgstr ""
  3069
+msgstr "Srpanj"
3070 3070
 
3071 3071
 #: utils/dates.py:19
3072 3072
 msgid "August"
3073  
-msgstr ""
  3073
+msgstr "Kolovoz"
3074 3074
 
3075 3075
 #: utils/dates.py:19
3076 3076
 msgid "September"
3077  
-msgstr ""
  3077
+msgstr "Rujan"
3078 3078
 
3079 3079
 #: utils/dates.py:19
3080 3080
 msgid "October"
3081  
-msgstr ""
  3081
+msgstr "Listopad"
3082 3082
 
3083 3083
 #: utils/dates.py:19
3084 3084
 msgid "November"
3085  
-msgstr ""
  3085
+msgstr "Studeni"
3086 3086
 
3087 3087
 #: utils/dates.py:20
3088 3088
 msgid "December"
3089  
-msgstr ""
  3089
+msgstr "Prosinac"
3090 3090
 
3091 3091
 #: utils/dates.py:23
3092 3092
 msgid "jan"
3093  
-msgstr ""
  3093
+msgstr "sij."
3094 3094
 
3095 3095
 #: utils/dates.py:23
3096 3096
 msgid "feb"
3097  
-msgstr ""
  3097
+msgstr "velj."
3098 3098
 
3099 3099
 #: utils/dates.py:23
3100 3100
 msgid "mar"
3101  
-msgstr ""
  3101
+msgstr "ožu."
3102 3102
 
3103 3103
 #: utils/dates.py:23
3104 3104
 msgid "apr"
3105  
-msgstr ""
  3105
+msgstr "tra."
3106 3106
 
3107 3107
 #: utils/dates.py:23
3108 3108
 msgid "may"
3109  
-msgstr ""
  3109
+msgstr "svi."
3110 3110
 
3111 3111
 #: utils/dates.py:23
3112 3112
 msgid "jun"
3113  
-msgstr ""
  3113
+msgstr "lip."
3114 3114
 
3115 3115
 #: utils/dates.py:24
3116 3116
 msgid "jul"
3117  
-msgstr ""
  3117
+msgstr "srp."
3118 3118
 
3119 3119
 #: utils/dates.py:24
3120 3120
 msgid "aug"
3121  
-msgstr ""
  3121
+msgstr "kol."
3122 3122
 
3123 3123
 #: utils/dates.py:24
3124 3124
 msgid "sep"
3125  
-msgstr ""
  3125
+msgstr "ruj."
3126 3126
 
3127 3127
 #: utils/dates.py:24
3128 3128
 msgid "oct"
3129  
-msgstr ""
  3129
+msgstr "lis."
3130 3130
 
3131 3131
 #: utils/dates.py:24
3132 3132
 msgid "nov"
3133  
-msgstr ""
  3133
+msgstr "stu."
3134 3134
 
3135 3135
 #: utils/dates.py:24
3136 3136
 msgid "dec"
3137  
-msgstr ""
  3137
+msgstr "pro."
3138 3138
 
3139 3139
 #: utils/dates.py:31
3140 3140
 msgid "Jan."
3141  
-msgstr ""
  3141
+msgstr "Sij."
3142 3142
 
3143 3143
 #: utils/dates.py:31
3144 3144
 msgid "Feb."
3145  
-msgstr ""
  3145
+msgstr "Velj."
3146 3146
 
3147 3147
 #: utils/dates.py:32
3148 3148
 msgid "Aug."
3149  
-msgstr ""
  3149
+msgstr "Kol."
3150 3150
 
3151 3151
 #: utils/dates.py:32
3152 3152
 msgid "Sept."
3153  
-msgstr ""
  3153
+msgstr "Ruj."
3154 3154
 
3155 3155
 #: utils/dates.py:32
3156 3156
 msgid "Oct."
3157  
-msgstr ""
  3157
+msgstr "Lis."
3158 3158
 
3159 3159
 #: utils/dates.py:32
3160 3160
 msgid "Nov."
3161  
-msgstr ""
  3161
+msgstr "Stu."
3162 3162
 
3163 3163
 #: utils/dates.py:32
3164 3164
 msgid "Dec."
3165  
-msgstr ""
  3165
+msgstr "Pro."
3166 3166
 
3167 3167
 #: utils/timesince.py:12
3168 3168
 msgid "year"
3169 3169
 msgid_plural "years"
3170  
-msgstr[0] ""
3171  
-msgstr[1] ""
  3170
+msgstr[0] "godina"
  3171
+msgstr[1] "godina"
3172 3172
 
3173 3173
 #: utils/timesince.py:13
3174 3174
 msgid "month"
3175 3175
 msgid_plural "months"
3176  
-msgstr[0] ""
3177  
-msgstr[1] ""
  3176
+msgstr[0] "mjesec"
  3177
+msgstr[1] "mjesec"
3178 3178
 
3179 3179
 #: utils/timesince.py:14
3180 3180
 msgid "week"
3181 3181
 msgid_plural "weeks"
3182  
-msgstr[0] ""
3183  
-msgstr[1] ""
  3182
+msgstr[0] "tjedan"
  3183
+msgstr[1] "tjedan"
3184 3184
 
3185 3185
 #: utils/timesince.py:15
3186 3186
 msgid "day"
3187 3187
 msgid_plural "days"
3188  
-msgstr[0] ""
3189  
-msgstr[1] ""
  3188
+msgstr[0] "dan"
  3189
+msgstr[1] "dan"
3190 3190
 
3191 3191
 #: utils/timesince.py:16
3192 3192
 msgid "hour"
3193 3193
 msgid_plural "hours"
3194  
-msgstr[0] ""
3195  
-msgstr[1] ""
  3194
+msgstr[0] "sati"
  3195
+msgstr[1] "sati"
3196 3196
 
3197 3197
 #: utils/timesince.py:17
3198 3198
 msgid "minute"
3199 3199
 msgid_plural "minutes"
3200  
-msgstr[0] ""
3201  
-msgstr[1] ""
  3200
+msgstr[0] "minute"
  3201
+msgstr[1] "minuta"
3202 3202
 
3203 3203
 #: utils/timesince.py:39
3204 3204
 #, python-format
@@ -3228,7 +3228,7 @@ msgstr ""
3228 3228
 
3229 3229
 #: utils/dateformat.py:97
3230 3230
 msgid "midnight"
3231  
-msgstr ""
  3231
+msgstr "ponoć"
3232 3232
 
3233 3233
 #: utils/dateformat.py:99
3234 3234
 msgid "noon"
@@ -3256,7 +3256,7 @@ msgstr ""
3256 3256
 
3257 3257
 #: template/defaultfilters.py:485
3258 3258
 msgid "yes,no,maybe"
3259  
-msgstr ""
  3259
+msgstr "da,ne,možda"
3260 3260
 
3261 3261
 #: template/defaultfilters.py:514
3262 3262
 #, python-format
10  django/contrib/admin/media/js/urlify.js
@@ -45,7 +45,14 @@ var UKRAINIAN_MAP = {
45 45
 }
46 46
 var CZECH_MAP = {
47 47
     'č':'c', 'ď':'d', 'ě':'e', 'ň': 'n', 'ř':'r', 'š':'s', 'ť':'t', 'ů':'u',
48  
-    'ž':'z'
  48
+    'ž':'z', 'Č':'C', 'Ď':'D', 'Ě':'E', 'Ň': 'N', 'Ř':'R', 'Š':'S', 'Ť':'T',
  49
+    'Ů':'U', 'Ž':'Z'
  50
+}
  51
+
  52
+var POLISH_MAP = {
  53
+    'ą':'a', 'ć':'c', 'ę':'e', 'ł':'l', 'ń':'n', 'ó':'o', 'ś':'s', 'ź':'z',
  54
+    'ż':'z', 'Ą':'A', 'Ć':'C', 'Ę':'e', 'Ł':'L', 'Ń':'N', 'Ó':'o', 'Ś':'S',
  55
+    'Ź':'Z', 'Ż':'Z'
49 56
 }
50 57
 
51 58
 var ALL_DOWNCODE_MAPS=new Array()
@@ -56,6 +63,7 @@ ALL_DOWNCODE_MAPS[3]=TURKISH_MAP
56 63
 ALL_DOWNCODE_MAPS[4]=RUSSIAN_MAP
57 64
 ALL_DOWNCODE_MAPS[5]=UKRAINIAN_MAP
58 65
 ALL_DOWNCODE_MAPS[6]=CZECH_MAP
  66
+ALL_DOWNCODE_MAPS[7]=POLISH_MAP
59 67
 
60 68
 var Downcoder = new Object();
61 69
 Downcoder.Initialize = function()
4  django/contrib/comments/feeds.py
@@ -4,7 +4,7 @@
4 4
 from django.contrib.sites.models import Site
5 5
 
6 6
 class LatestFreeCommentsFeed(Feed):
7  
-    "Feed of latest comments on the current site."
  7
+    """Feed of latest free comments on the current site."""
8 8
 
9 9
     comments_class = FreeComment
10 10
 
@@ -30,7 +30,7 @@ def items(self):
30 30
         return self.get_query_set()[:40]
31 31
 
32 32
 class LatestCommentsFeed(LatestFreeCommentsFeed):
33  
-    """Feed of latest free comments on the current site"""
  33
+    """Feed of latest comments on the current site."""
34 34
 
35 35
     comments_class = Comment
36 36
 
58  django/contrib/localflavor/es/es_provinces.py
... ...
@@ -0,0 +1,58 @@
  1
+# -*- coding: utf-8 -*-
  2
+from django.utils.translation import ugettext_lazy as _
  3
+
  4
+PROVINCE_CHOICES = (
  5
+    ('01', _('Arava')),
  6
+    ('02', _('Albacete')),
  7
+    ('03', _('Alacant')),
  8
+    ('04', _('Almeria')),
  9
+    ('05', _('Avila')),
  10
+    ('06', _('Badajoz')),
  11
+    ('07', _('Illes Balears')),
  12
+    ('08', _('Barcelona')),
  13
+    ('09', _('Burgos')),
  14
+    ('10', _('Caceres')),
  15
+    ('11', _('Cadiz')),
  16
+    ('12', _('Castello')),
  17
+    ('13', _('Ciudad Real')),
  18
+    ('14', _('Cordoba')),
  19
+    ('15', _('A Coruna')),
  20
+    ('16', _('Cuenca')),
  21
+    ('17', _('Girona')),
  22
+    ('18', _('Granada')),
  23
+    ('19', _('Guadalajara')),
  24
+    ('20', _('Guipuzkoa')),
  25
+    ('21', _('Huelva')),
  26
+    ('22', _('Huesca')),
  27
+    ('23', _('Jaen')),
  28
+    ('24', _('Leon')),
  29
+    ('25', _('Lleida')),
  30
+    ('26', _('La Rioja')),
  31
+    ('27', _('Lugo')),
  32
+    ('28', _('Madrid')),
  33
+    ('29', _('Malaga')),
  34
+    ('30', _('Murcia')),
  35
+    ('31', _('Navarre')),
  36
+    ('32', _('Ourense')),
  37
+    ('33', _('Asturias')),
  38
+    ('34', _('Palencia')),
  39
+    ('35', _('Las Palmas')),
  40
+    ('36', _('Pontevedra')),
  41
+    ('37', _('Salamanca')),
  42
+    ('38', _('Santa Cruz de Tenerife')),
  43
+    ('39', _('Cantabria')),
  44
+    ('40', _('Segovia')),
  45
+    ('41', _('Seville')),
  46
+    ('42', _('Soria')),
  47
+    ('43', _('Tarragona')),
  48
+    ('44', _('Teruel')),
  49
+    ('45', _('Toledo')),
  50
+    ('46', _('Valencia')),
  51
+    ('47', _('Valladolid')),
  52
+    ('48', _('Bizkaia')),
  53
+    ('49', _('Zamora')),
  54
+    ('50', _('Zaragoza')),
  55
+    ('51', _('Ceuta')),
  56
+    ('52', _('Melilla')),
  57
+)
  58
+
23  django/contrib/localflavor/es/es_regions.py
... ...
@@ -0,0 +1,23 @@
  1
+# -*- coding: utf-8 -*-
  2
+from django.utils.translation import ugettext_lazy as _
  3
+
  4
+REGION_CHOICES = (
  5
+    ('AN', _('Andalusia')),
  6
+    ('AR', _('Aragon')),
  7
+    ('O', _('Principality of Asturias')),
  8
+    ('IB', _('Balearic Islands')),
  9
+    ('PV', _('Basque Country')),
  10
+    ('CN', _('Canary Islands')),
  11
+    ('S', _('Cantabria')),
  12
+    ('CM', _('Castile-La Mancha')),
  13
+    ('CL', _('Castile and Leon')),
  14
+    ('CT', _('Catalonia')),
  15
+    ('EX', _('Extremadura')),
  16
+    ('GA', _('Galicia')),
  17
+    ('LO', _('La Rioja')),
  18
+    ('M', _('Madrid')),
  19
+    ('MU', _('Region of Murcia')),
  20
+    ('NA', _('Foral Community of Navarre')),
  21
+    ('VC', _('Valencian Community')),
  22
+)
  23
+
173  django/contrib/localflavor/es/forms.py
... ...
@@ -0,0 +1,173 @@
  1
+# -*- coding: utf-8 -*-
  2
+"""
  3
+Spanish-specific Form helpers
  4
+"""
  5
+
  6
+from django.newforms import ValidationError
  7
+from django.newforms.fields import RegexField, Select, EMPTY_VALUES
  8
+from django.utils.translation import ugettext as _
  9
+import re
  10
+
  11
+class ESPostalCodeField(RegexField):
  12
+    """
  13
+    A form field that validates its input as a spanish postal code.
  14
+
  15
+    Spanish postal code is a five digits string, with two first digits
  16
+    between 01 and 52, assigned to provinces code.
  17
+    """
  18
+    def __init__(self, *args, **kwargs):
  19
+        super(ESPostalCodeField, self).__init__(
  20
+                r'^(0[1-9]|[1-4][0-9]|5[0-2])\d{3}$',
  21
+                max_length=None, min_length=None,
  22
+                error_message=_('Enter a valid postal code in the range and format 01XXX - 52XXX.'),
  23
+                *args, **kwargs)
  24
+
  25
+class ESPhoneNumberField(RegexField):
  26
+    """
  27
+    A form field that validates its input as a Spanish phone number.
  28
+    Information numbers are ommited.
  29
+
  30
+    Spanish phone numbers are nine digit numbers, where first digit is 6 (for
  31
+    cell phones), 8 (for special phones), or 9 (for landlines and special
  32
+    phones)
  33
+
  34
+    TODO: accept and strip characters like dot, hyphen... in phone number
  35
+    """
  36
+    def __init__(self, *args, **kwargs):
  37
+        super(ESPhoneNumberField, self).__init__(r'^(6|8|9)\d{8}$',
  38
+                max_length=None, min_length=None,
  39
+                error_message=_('Enter a valid phone number in one of the formats 6XXXXXXXX, 8XXXXXXXX or 9XXXXXXXX.'),
  40
+                *args, **kwargs)
  41
+
  42
+class ESIdentityCardNumberField(RegexField):
  43
+    """
  44
+    Spanish NIF/NIE/CIF (Fiscal Identification Number) code.
  45
+
  46
+    Validates three diferent formats:
  47
+
  48
+        NIF (individuals): 12345678A
  49
+        CIF (companies): A12345678
  50
+        NIE (foreigners): X12345678A