mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
gis: Merged revisions 5540-5582 via svnmerge from
http://code.djangoproject.com/svn/django/trunk git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@5583 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
bea0a500da
commit
7d915d5589
1
AUTHORS
1
AUTHORS
@ -230,6 +230,7 @@ answer newbie questions, and generally made Django that much better:
|
||||
Frank Tegtmeyer <fte@fte.to>
|
||||
thebjorn <bp@datakortet.no>
|
||||
Zach Thompson <zthompson47@gmail.com>
|
||||
tibimicu@gmax.net
|
||||
Tom Tobin
|
||||
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
|
||||
torne-django@wolfpuppy.org.uk
|
||||
|
BIN
django/conf/locale/bn/LC_MESSAGES/djangojs.mo
Normal file
BIN
django/conf/locale/bn/LC_MESSAGES/djangojs.mo
Normal file
Binary file not shown.
118
django/conf/locale/bn/LC_MESSAGES/djangojs.po
Normal file
118
django/conf/locale/bn/LC_MESSAGES/djangojs.po
Normal file
@ -0,0 +1,118 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-06-28 17:36+1000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:33
|
||||
#, perl-format
|
||||
msgid "Available %s"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:41
|
||||
msgid "Choose all"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:46
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:48
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:53
|
||||
#, perl-format
|
||||
msgid "Chosen %s"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:54
|
||||
msgid "Select your choice(s) and click "
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:59
|
||||
msgid "Clear all"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/dateparse.js:32
|
||||
#: contrib/admin/media/js/calendar.js:24
|
||||
msgid ""
|
||||
"January February March April May June July August September October November "
|
||||
"December"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/dateparse.js:33
|
||||
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/calendar.js:25
|
||||
msgid "S M T W T F S"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:47
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
|
||||
msgid "Now"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:51
|
||||
msgid "Clock"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:78
|
||||
msgid "Choose a time"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
|
||||
msgid "Midnight"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
|
||||
msgid "6 a.m."
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:84
|
||||
msgid "Noon"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:88
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:183
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:128
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:177
|
||||
msgid "Today"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:132
|
||||
msgid "Calendar"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:175
|
||||
msgid "Yesterday"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:179
|
||||
msgid "Tomorrow"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
|
||||
msgid "Show"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
|
||||
msgid "Hide"
|
||||
msgstr ""
|
BIN
django/conf/locale/da/LC_MESSAGES/djangojs.mo
Normal file
BIN
django/conf/locale/da/LC_MESSAGES/djangojs.mo
Normal file
Binary file not shown.
118
django/conf/locale/da/LC_MESSAGES/djangojs.po
Normal file
118
django/conf/locale/da/LC_MESSAGES/djangojs.po
Normal file
@ -0,0 +1,118 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-06-28 17:36+1000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:33
|
||||
#, perl-format
|
||||
msgid "Available %s"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:41
|
||||
msgid "Choose all"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:46
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:48
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:53
|
||||
#, perl-format
|
||||
msgid "Chosen %s"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:54
|
||||
msgid "Select your choice(s) and click "
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:59
|
||||
msgid "Clear all"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/dateparse.js:32
|
||||
#: contrib/admin/media/js/calendar.js:24
|
||||
msgid ""
|
||||
"January February March April May June July August September October November "
|
||||
"December"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/dateparse.js:33
|
||||
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/calendar.js:25
|
||||
msgid "S M T W T F S"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:47
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
|
||||
msgid "Now"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:51
|
||||
msgid "Clock"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:78
|
||||
msgid "Choose a time"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
|
||||
msgid "Midnight"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
|
||||
msgid "6 a.m."
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:84
|
||||
msgid "Noon"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:88
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:183
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:128
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:177
|
||||
msgid "Today"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:132
|
||||
msgid "Calendar"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:175
|
||||
msgid "Yesterday"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:179
|
||||
msgid "Tomorrow"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
|
||||
msgid "Show"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
|
||||
msgid "Hide"
|
||||
msgstr ""
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -23,13 +23,13 @@ msgstr "id obiect"
|
||||
|
||||
#: contrib/comments/models.py:68
|
||||
msgid "headline"
|
||||
msgstr ""
|
||||
msgstr "titlu"
|
||||
|
||||
#: contrib/comments/models.py:69 contrib/comments/models.py:90
|
||||
#: contrib/comments/models.py:167
|
||||
#, fuzzy
|
||||
msgid "comment"
|
||||
msgstr "conţinut"
|
||||
msgstr "comentariu"
|
||||
|
||||
#: contrib/comments/models.py:70
|
||||
msgid "rating #1"
|
||||
@ -69,20 +69,19 @@ msgstr ""
|
||||
|
||||
#: contrib/comments/models.py:83 contrib/comments/models.py:169
|
||||
msgid "date/time submitted"
|
||||
msgstr ""
|
||||
msgstr "data/ora crearii"
|
||||
|
||||
#: contrib/comments/models.py:84 contrib/comments/models.py:170
|
||||
msgid "is public"
|
||||
msgstr ""
|
||||
msgstr "public"
|
||||
|
||||
#: contrib/comments/models.py:85 contrib/admin/views/doc.py:289
|
||||
#, fuzzy
|
||||
msgid "IP address"
|
||||
msgstr "adresa email"
|
||||
msgstr "adresa ip"
|
||||
|
||||
#: contrib/comments/models.py:86
|
||||
msgid "is removed"
|
||||
msgstr ""
|
||||
msgstr "sters"
|
||||
|
||||
#: contrib/comments/models.py:86
|
||||
msgid ""
|
||||
@ -122,7 +121,7 @@ msgstr "adresa email"
|
||||
|
||||
#: contrib/comments/models.py:173
|
||||
msgid "approved by staff"
|
||||
msgstr ""
|
||||
msgstr "aprobat de echipa"
|
||||
|
||||
#: contrib/comments/models.py:176
|
||||
#, fuzzy
|
||||
@ -282,9 +281,8 @@ msgid "Password:"
|
||||
msgstr "Parola:"
|
||||
|
||||
#: contrib/comments/templates/comments/form.html:6
|
||||
#, fuzzy
|
||||
msgid "Forgotten your password?"
|
||||
msgstr "Schimbă-mi parola"
|
||||
msgstr "Ai uitat parola?"
|
||||
|
||||
#: contrib/comments/templates/comments/form.html:8
|
||||
#: contrib/admin/templates/admin/object_history.html:3
|
||||
@ -338,9 +336,8 @@ msgid "Preview comment"
|
||||
msgstr "permite comentarii"
|
||||
|
||||
#: contrib/comments/templates/comments/freeform.html:4
|
||||
#, fuzzy
|
||||
msgid "Your name:"
|
||||
msgstr "nume utilizator"
|
||||
msgstr "numele dumneavoastra"
|
||||
|
||||
#: contrib/admin/filterspecs.py:40
|
||||
#, python-format
|
||||
@ -352,41 +349,39 @@ msgstr ""
|
||||
#: contrib/admin/filterspecs.py:70 contrib/admin/filterspecs.py:88
|
||||
#: contrib/admin/filterspecs.py:143
|
||||
msgid "All"
|
||||
msgstr ""
|
||||
msgstr "tot"
|
||||
|
||||
#: contrib/admin/filterspecs.py:109
|
||||
msgid "Any date"
|
||||
msgstr ""
|
||||
msgstr "orice data"
|
||||
|
||||
#: contrib/admin/filterspecs.py:110
|
||||
#, fuzzy
|
||||
msgid "Today"
|
||||
msgstr "Luni"
|
||||
msgstr "Astazi"
|
||||
|
||||
#: contrib/admin/filterspecs.py:113
|
||||
msgid "Past 7 days"
|
||||
msgstr ""
|
||||
msgstr "Ultimele 7 zile"
|
||||
|
||||
#: contrib/admin/filterspecs.py:115
|
||||
msgid "This month"
|
||||
msgstr ""
|
||||
msgstr "Luna aceasta"
|
||||
|
||||
#: contrib/admin/filterspecs.py:117
|
||||
msgid "This year"
|
||||
msgstr ""
|
||||
msgstr "Anul acesta"
|
||||
|
||||
#: contrib/admin/filterspecs.py:143
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
msgstr "Da"
|
||||
|
||||
#: contrib/admin/filterspecs.py:143
|
||||
#, fuzzy
|
||||
msgid "No"
|
||||
msgstr "Noi."
|
||||
msgstr "Nu"
|
||||
|
||||
#: contrib/admin/filterspecs.py:150
|
||||
msgid "Unknown"
|
||||
msgstr ""
|
||||
msgstr "Necunoscut"
|
||||
|
||||
#: contrib/admin/models.py:16
|
||||
msgid "action time"
|
||||
@ -418,7 +413,7 @@ msgstr "intrări log"
|
||||
|
||||
#: contrib/admin/templatetags/admin_list.py:228
|
||||
msgid "All dates"
|
||||
msgstr ""
|
||||
msgstr "Toate datele"
|
||||
|
||||
#: contrib/admin/views/decorators.py:9 contrib/auth/forms.py:36
|
||||
#: contrib/auth/forms.py:41
|
||||
@ -426,6 +421,8 @@ msgid ""
|
||||
"Please enter a correct username and password. Note that both fields are case-"
|
||||
"sensitive."
|
||||
msgstr ""
|
||||
"Va rugam sa introduceti username-ul si parola corecta. Aveti grija deoarece"
|
||||
"casutele sunt case sensitive."
|
||||
|
||||
#: contrib/admin/views/decorators.py:23
|
||||
#: contrib/admin/templates/admin/login.html:25
|
||||
@ -437,16 +434,21 @@ msgid ""
|
||||
"Please log in again, because your session has expired. Don't worry: Your "
|
||||
"submission has been saved."
|
||||
msgstr ""
|
||||
"Va rugam sa va inregistrati din nou, deoarece sesiunea a expirat. Nu va "
|
||||
"faceti griji datele au fost salvate."
|
||||
|
||||
#: contrib/admin/views/decorators.py:68
|
||||
msgid ""
|
||||
"Looks like your browser isn't configured to accept cookies. Please enable "
|
||||
"cookies, reload this page, and try again."
|
||||
msgstr ""
|
||||
"Se pare ca browserul dumneavostra nu este configurat sa accepte cookies. Va "
|
||||
"rugam sa va setati browserul sa accepte cookies, dati un reload la pagina si "
|
||||
"incercati din nou."
|
||||
|
||||
#: contrib/admin/views/decorators.py:82
|
||||
msgid "Usernames cannot contain the '@' character."
|
||||
msgstr ""
|
||||
msgstr "Username-ul nu are voie sa contina caracterul '@'."
|
||||
|
||||
#: contrib/admin/views/decorators.py:84
|
||||
#, python-format
|
||||
@ -461,61 +463,62 @@ msgstr "Administrare Django"
|
||||
#: contrib/admin/views/main.py:260
|
||||
#, python-format
|
||||
msgid "The %(name)s \"%(obj)s\" was added successfully."
|
||||
msgstr ""
|
||||
msgstr "%(name)s \"%(obj)s\" a fost inserat cu succes."
|
||||
|
||||
#: contrib/admin/views/main.py:264 contrib/admin/views/main.py:348
|
||||
msgid "You may edit it again below."
|
||||
msgstr ""
|
||||
msgstr "Va puteti edita datele din nou mai jos."
|
||||
|
||||
#: contrib/admin/views/main.py:272 contrib/admin/views/main.py:357
|
||||
#, python-format
|
||||
msgid "You may add another %s below."
|
||||
msgstr ""
|
||||
msgstr "Mai puteti adauga un alt %s mai jos."
|
||||
|
||||
#: contrib/admin/views/main.py:290
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Add %s"
|
||||
msgstr "Adaugă"
|
||||
msgstr "Adaugă %s"
|
||||
|
||||
#: contrib/admin/views/main.py:336
|
||||
#, python-format
|
||||
msgid "Added %s."
|
||||
msgstr ""
|
||||
msgstr "Adaugat %s."
|
||||
|
||||
#: contrib/admin/views/main.py:336 contrib/admin/views/main.py:338
|
||||
#: contrib/admin/views/main.py:340
|
||||
msgid "and"
|
||||
msgstr ""
|
||||
msgstr "si"
|
||||
|
||||
#: contrib/admin/views/main.py:338
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Changed %s."
|
||||
msgstr "Schimbă"
|
||||
msgstr "Schimbă %s."
|
||||
|
||||
#: contrib/admin/views/main.py:340
|
||||
#, python-format
|
||||
msgid "Deleted %s."
|
||||
msgstr ""
|
||||
msgstr "Am sters %s."
|
||||
|
||||
#: contrib/admin/views/main.py:343
|
||||
msgid "No fields changed."
|
||||
msgstr ""
|
||||
msgstr "Nu s-a facut nicio schimbare."
|
||||
|
||||
#: contrib/admin/views/main.py:346
|
||||
#, python-format
|
||||
msgid "The %(name)s \"%(obj)s\" was changed successfully."
|
||||
msgstr ""
|
||||
msgstr "%(name)s \"%(obj)s\" au fost modificate cu succes."
|
||||
|
||||
#: contrib/admin/views/main.py:354
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The %(name)s \"%(obj)s\" was added successfully. You may edit it again below."
|
||||
msgstr ""
|
||||
"%(name)s \"%(obj)s\" au fost adaugate cu succes. Le puteti edita mai jos."
|
||||
|
||||
#: contrib/admin/views/main.py:392
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Change %s"
|
||||
msgstr "Schimbă"
|
||||
msgstr "Schimbă %s"
|
||||
|
||||
#: contrib/admin/views/main.py:470
|
||||
#, python-format
|
||||
@ -530,16 +533,16 @@ msgstr ""
|
||||
#: contrib/admin/views/main.py:508
|
||||
#, python-format
|
||||
msgid "The %(name)s \"%(obj)s\" was deleted successfully."
|
||||
msgstr ""
|
||||
msgstr "%(name)s \"%(obj)s\" au fost sterse cu succes."
|
||||
|
||||
#: contrib/admin/views/main.py:511
|
||||
msgid "Are you sure?"
|
||||
msgstr ""
|
||||
msgstr "Sunteti sigur?"
|
||||
|
||||
#: contrib/admin/views/main.py:533
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Change history: %s"
|
||||
msgstr "Schimbă parola"
|
||||
msgstr "Schimbari facute: %s"
|
||||
|
||||
#: contrib/admin/views/main.py:565
|
||||
#, python-format
|
||||
@ -549,13 +552,13 @@ msgstr ""
|
||||
#: contrib/admin/views/main.py:565
|
||||
#, python-format
|
||||
msgid "Select %s to change"
|
||||
msgstr ""
|
||||
msgstr "Selecteaza %s pentru schimbare"
|
||||
|
||||
#: contrib/admin/views/doc.py:277 contrib/admin/views/doc.py:286
|
||||
#: contrib/admin/views/doc.py:288 contrib/admin/views/doc.py:294
|
||||
#: contrib/admin/views/doc.py:295 contrib/admin/views/doc.py:297
|
||||
msgid "Integer"
|
||||
msgstr ""
|
||||
msgstr "Intreg"
|
||||
|
||||
#: contrib/admin/views/doc.py:278
|
||||
msgid "Boolean (Either True or False)"
|
||||
@ -564,26 +567,23 @@ msgstr ""
|
||||
#: contrib/admin/views/doc.py:279 contrib/admin/views/doc.py:296
|
||||
#, python-format
|
||||
msgid "String (up to %(maxlength)s)"
|
||||
msgstr ""
|
||||
msgstr "String (pana la %(maxlength)s caractere)"
|
||||
|
||||
#: contrib/admin/views/doc.py:280
|
||||
msgid "Comma-separated integers"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/views/doc.py:281
|
||||
#, fuzzy
|
||||
msgid "Date (without time)"
|
||||
msgstr "timp acţiune"
|
||||
msgstr "Data (fara ora)"
|
||||
|
||||
#: contrib/admin/views/doc.py:282
|
||||
#, fuzzy
|
||||
msgid "Date (with time)"
|
||||
msgstr "Dată/oră"
|
||||
msgstr "Data (cu ora)"
|
||||
|
||||
#: contrib/admin/views/doc.py:283
|
||||
#, fuzzy
|
||||
msgid "E-mail address"
|
||||
msgstr "Adresa email:"
|
||||
msgstr "Adresa email"
|
||||
|
||||
#: contrib/admin/views/doc.py:284 contrib/admin/views/doc.py:287
|
||||
msgid "File path"
|
||||
@ -603,9 +603,8 @@ msgid "Relation to parent model"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/views/doc.py:293
|
||||
#, fuzzy
|
||||
msgid "Phone number"
|
||||
msgstr "Introduceţi un număr întreg."
|
||||
msgstr "Numar de telefon"
|
||||
|
||||
#: contrib/admin/views/doc.py:298
|
||||
msgid "Text"
|
||||
@ -613,7 +612,7 @@ msgstr ""
|
||||
|
||||
#: contrib/admin/views/doc.py:299
|
||||
msgid "Time"
|
||||
msgstr ""
|
||||
msgstr "Timp"
|
||||
|
||||
#: contrib/admin/views/doc.py:300 contrib/flatpages/models.py:7
|
||||
msgid "URL"
|
||||
@ -636,7 +635,7 @@ msgstr ""
|
||||
#: contrib/admin/templates/registration/password_change_form.html:3
|
||||
#: contrib/admin/templates/admin_doc/bookmarklets.html:3
|
||||
msgid "Documentation"
|
||||
msgstr ""
|
||||
msgstr "Documentatie"
|
||||
|
||||
#: contrib/admin/templates/admin/object_history.html:3
|
||||
#: contrib/admin/templates/admin/change_list.html:5
|
||||
@ -770,9 +769,9 @@ msgid "None available"
|
||||
msgstr "Indisponibil"
|
||||
|
||||
#: contrib/admin/templates/admin/change_list.html:11
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Add %(name)s"
|
||||
msgstr "Adaugă"
|
||||
msgstr "Adaugă %(name)s"
|
||||
|
||||
#: contrib/admin/templates/admin/login.html:22
|
||||
msgid "Have you <a href=\"/password_reset/\">forgotten your password</a>?"
|
||||
@ -785,7 +784,7 @@ msgstr "Bine ai venit,"
|
||||
#: contrib/admin/templates/admin/delete_confirmation.html:9
|
||||
#: contrib/admin/templates/admin/submit_line.html:3
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
msgstr "Sterge"
|
||||
|
||||
#: contrib/admin/templates/admin/delete_confirmation.html:14
|
||||
#, python-format
|
||||
@ -814,7 +813,7 @@ msgstr "Da, sînt sigur"
|
||||
#: contrib/admin/templates/admin/filter.html:2
|
||||
#, python-format
|
||||
msgid " By %(title)s "
|
||||
msgstr ""
|
||||
msgstr " Dupa %(title)s "
|
||||
|
||||
#: contrib/admin/templates/admin/search_form.html:8
|
||||
msgid "Go"
|
||||
@ -827,33 +826,32 @@ msgstr ""
|
||||
#: contrib/admin/templates/admin/change_form.html:30
|
||||
msgid "Please correct the error below."
|
||||
msgid_plural "Please correct the errors below."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[0] "Va rugam sa corectati eroarea de mai jos"
|
||||
msgstr[1] "Va rugam sa corectati erorile de mai jos"
|
||||
|
||||
#: contrib/admin/templates/admin/change_form.html:48
|
||||
msgid "Ordering"
|
||||
msgstr ""
|
||||
msgstr "Ordonate dupa"
|
||||
|
||||
#: contrib/admin/templates/admin/change_form.html:51
|
||||
msgid "Order:"
|
||||
msgstr ""
|
||||
msgstr "Ordonare:"
|
||||
|
||||
#: contrib/admin/templates/admin/submit_line.html:4
|
||||
msgid "Save as new"
|
||||
msgstr ""
|
||||
msgstr "Salvati ca nou"
|
||||
|
||||
#: contrib/admin/templates/admin/submit_line.html:5
|
||||
msgid "Save and add another"
|
||||
msgstr ""
|
||||
msgstr "Salvati si adaugati altul"
|
||||
|
||||
#: contrib/admin/templates/admin/submit_line.html:6
|
||||
msgid "Save and continue editing"
|
||||
msgstr ""
|
||||
msgstr "Salvati si continuati"
|
||||
|
||||
#: contrib/admin/templates/admin/submit_line.html:7
|
||||
#, fuzzy
|
||||
msgid "Save"
|
||||
msgstr "activ"
|
||||
msgstr "Salveaza"
|
||||
|
||||
#: contrib/admin/templates/registration/password_change_done.html:4
|
||||
#: contrib/admin/templates/registration/password_change_form.html:4
|
||||
@ -1133,24 +1131,20 @@ msgid "codename"
|
||||
msgstr "nume cod"
|
||||
|
||||
#: contrib/auth/models.py:17
|
||||
#, fuzzy
|
||||
msgid "permission"
|
||||
msgstr "Permisiune"
|
||||
msgstr "permisiune"
|
||||
|
||||
#: contrib/auth/models.py:18 contrib/auth/models.py:27
|
||||
#, fuzzy
|
||||
msgid "permissions"
|
||||
msgstr "Permisiuni"
|
||||
msgstr "permisiuni"
|
||||
|
||||
#: contrib/auth/models.py:29
|
||||
#, fuzzy
|
||||
msgid "group"
|
||||
msgstr "Grup"
|
||||
msgstr "grup"
|
||||
|
||||
#: contrib/auth/models.py:30 contrib/auth/models.py:65
|
||||
#, fuzzy
|
||||
msgid "groups"
|
||||
msgstr "Grupuri"
|
||||
msgstr "grupuri"
|
||||
|
||||
#: contrib/auth/models.py:55
|
||||
msgid "username"
|
||||
@ -1209,19 +1203,16 @@ msgstr ""
|
||||
"permisiunile alocate fiecărui grup din care el/ea face parte."
|
||||
|
||||
#: contrib/auth/models.py:67
|
||||
#, fuzzy
|
||||
msgid "user permissions"
|
||||
msgstr "Permisiuni"
|
||||
msgstr "permisiuni utilizator"
|
||||
|
||||
#: contrib/auth/models.py:70
|
||||
#, fuzzy
|
||||
msgid "user"
|
||||
msgstr "Utilizator"
|
||||
msgstr "utilizator"
|
||||
|
||||
#: contrib/auth/models.py:71
|
||||
#, fuzzy
|
||||
msgid "users"
|
||||
msgstr "Utilizatori"
|
||||
msgstr "utilizatori"
|
||||
|
||||
#: contrib/auth/models.py:76
|
||||
msgid "Personal info"
|
||||
@ -1240,15 +1231,16 @@ msgid "Groups"
|
||||
msgstr "Grupuri"
|
||||
|
||||
#: contrib/auth/models.py:219
|
||||
#, fuzzy
|
||||
msgid "message"
|
||||
msgstr "Mesaj"
|
||||
msgstr "mesaj"
|
||||
|
||||
#: contrib/auth/forms.py:30
|
||||
msgid ""
|
||||
"Your Web browser doesn't appear to have cookies enabled. Cookies are "
|
||||
"required for logging in."
|
||||
msgstr ""
|
||||
"Se pare ca browserul dumneavoastra nu suporta cookies. Aveti nevoie de un "
|
||||
"browser care suporta cookies ca sa va logati."
|
||||
|
||||
#: contrib/contenttypes/models.py:25
|
||||
#, fuzzy
|
||||
@ -1277,7 +1269,7 @@ msgstr "data expirare"
|
||||
|
||||
#: contrib/sessions/models.py:41
|
||||
msgid "session"
|
||||
msgstr "seiune"
|
||||
msgstr "sesiune"
|
||||
|
||||
#: contrib/sessions/models.py:42
|
||||
msgid "sessions"
|
||||
@ -1389,7 +1381,7 @@ msgstr "Decembrie"
|
||||
|
||||
#: utils/dates.py:19
|
||||
msgid "jan"
|
||||
msgstr ""
|
||||
msgstr "ian"
|
||||
|
||||
#: utils/dates.py:19
|
||||
msgid "feb"
|
||||
@ -1404,17 +1396,16 @@ msgid "apr"
|
||||
msgstr ""
|
||||
|
||||
#: utils/dates.py:19
|
||||
#, fuzzy
|
||||
msgid "may"
|
||||
msgstr "Mai"
|
||||
msgstr "mai"
|
||||
|
||||
#: utils/dates.py:19
|
||||
msgid "jun"
|
||||
msgstr ""
|
||||
msgstr "iun"
|
||||
|
||||
#: utils/dates.py:20
|
||||
msgid "jul"
|
||||
msgstr ""
|
||||
msgstr "iul"
|
||||
|
||||
#: utils/dates.py:20
|
||||
msgid "aug"
|
||||
@ -1430,7 +1421,7 @@ msgstr ""
|
||||
|
||||
#: utils/dates.py:20
|
||||
msgid "nov"
|
||||
msgstr ""
|
||||
msgstr "noi"
|
||||
|
||||
#: utils/dates.py:20
|
||||
msgid "dec"
|
||||
@ -1467,40 +1458,38 @@ msgstr "Dec."
|
||||
#: utils/timesince.py:12
|
||||
msgid "year"
|
||||
msgid_plural "years"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[0] "an"
|
||||
msgstr[1] "ani"
|
||||
|
||||
#: utils/timesince.py:13
|
||||
msgid "month"
|
||||
msgid_plural "months"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[0] "luna"
|
||||
msgstr[1] "luni"
|
||||
|
||||
#: utils/timesince.py:14
|
||||
msgid "week"
|
||||
msgid_plural "weeks"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[0] "saptamana"
|
||||
msgstr[1] "saptamani"
|
||||
|
||||
#: utils/timesince.py:15
|
||||
#, fuzzy
|
||||
msgid "day"
|
||||
msgid_plural "days"
|
||||
msgstr[0] "Mai"
|
||||
msgstr[1] "Mai"
|
||||
msgstr[0] "zi"
|
||||
msgstr[1] "zile"
|
||||
|
||||
#: utils/timesince.py:16
|
||||
msgid "hour"
|
||||
msgid_plural "hours"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
msgstr[0] "ora"
|
||||
msgstr[1] "ore"
|
||||
|
||||
#: utils/timesince.py:17
|
||||
#, fuzzy
|
||||
msgid "minute"
|
||||
msgid_plural "minutes"
|
||||
msgstr[0] "sit"
|
||||
msgstr[1] "sit"
|
||||
msgstr[0] "minut"
|
||||
msgstr[1] "minute"
|
||||
|
||||
#: conf/global_settings.py:37
|
||||
msgid "Bengali"
|
||||
@ -1545,7 +1534,7 @@ msgstr "Galiciană"
|
||||
|
||||
#: conf/global_settings.py:47
|
||||
msgid "Hungarian"
|
||||
msgstr ""
|
||||
msgstr "Ungara"
|
||||
|
||||
#: conf/global_settings.py:48
|
||||
msgid "Hebrew"
|
||||
@ -1577,7 +1566,7 @@ msgstr "Braziliană"
|
||||
|
||||
#: conf/global_settings.py:55
|
||||
msgid "Romanian"
|
||||
msgstr ""
|
||||
msgstr "Romana"
|
||||
|
||||
#: conf/global_settings.py:56
|
||||
msgid "Russian"
|
||||
@ -1750,7 +1739,7 @@ msgstr[1] "Îngrijiţi-vă limbajul! Cuvintele %s nu sînt permise aici."
|
||||
#: core/validators.py:236
|
||||
#, python-format
|
||||
msgid "This field must match the '%s' field."
|
||||
msgstr ""
|
||||
msgstr "Acest camp trebuie sa fie identic cu '%s'."
|
||||
|
||||
#: core/validators.py:255
|
||||
#, fuzzy
|
||||
@ -1897,9 +1886,8 @@ msgstr ""
|
||||
#: db/models/fields/__init__.py:114 db/models/fields/__init__.py:265
|
||||
#: db/models/fields/__init__.py:542 db/models/fields/__init__.py:553
|
||||
#: forms/__init__.py:346
|
||||
#, fuzzy
|
||||
msgid "This field is required."
|
||||
msgstr "Cîmpul este invalid."
|
||||
msgstr "Campul acesta trebuie completat obligatoriu."
|
||||
|
||||
#: db/models/fields/__init__.py:337
|
||||
#, fuzzy
|
||||
@ -1917,14 +1905,13 @@ msgid "This field cannot be null."
|
||||
msgstr "Cîmpul este invalid."
|
||||
|
||||
#: db/models/fields/__init__.py:562
|
||||
#, fuzzy
|
||||
msgid "Enter a valid filename."
|
||||
msgstr "Introduceţi o adresă de email validă."
|
||||
msgstr "Introduceti un nume de fisier valid."
|
||||
|
||||
#: db/models/fields/related.py:43
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Please enter a valid %s."
|
||||
msgstr "Introduceţi vă rog o adresă IP validă."
|
||||
msgstr "Introduceti va rog un %s valid."
|
||||
|
||||
#: db/models/fields/related.py:579
|
||||
#, fuzzy
|
||||
@ -1953,6 +1940,7 @@ msgid "Ensure your text is less than %s character."
|
||||
msgid_plural "Ensure your text is less than %s characters."
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
"Va rugam asigurati-va ca textul dumneavoastra are mai putin de %s caractere."
|
||||
|
||||
#: forms/__init__.py:385
|
||||
#, fuzzy
|
||||
@ -1966,7 +1954,7 @@ msgstr ""
|
||||
|
||||
#: forms/__init__.py:645
|
||||
msgid "The submitted file is empty."
|
||||
msgstr ""
|
||||
msgstr "Fisierul uploadat este gol"
|
||||
|
||||
#: forms/__init__.py:699
|
||||
#, fuzzy
|
||||
@ -1985,7 +1973,7 @@ msgstr "Introduceţi un număr întreg."
|
||||
|
||||
#: template/defaultfilters.py:379
|
||||
msgid "yes,no,maybe"
|
||||
msgstr ""
|
||||
msgstr "da,nu,poate"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Comments"
|
||||
|
BIN
django/conf/locale/ro/LC_MESSAGES/djangojs.mo
Normal file
BIN
django/conf/locale/ro/LC_MESSAGES/djangojs.mo
Normal file
Binary file not shown.
118
django/conf/locale/ro/LC_MESSAGES/djangojs.po
Normal file
118
django/conf/locale/ro/LC_MESSAGES/djangojs.po
Normal file
@ -0,0 +1,118 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-06-28 17:36+1000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:33
|
||||
#, perl-format
|
||||
msgid "Available %s"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:41
|
||||
msgid "Choose all"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:46
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:48
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:53
|
||||
#, perl-format
|
||||
msgid "Chosen %s"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:54
|
||||
msgid "Select your choice(s) and click "
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:59
|
||||
msgid "Clear all"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/dateparse.js:32
|
||||
#: contrib/admin/media/js/calendar.js:24
|
||||
msgid ""
|
||||
"January February March April May June July August September October November "
|
||||
"December"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/dateparse.js:33
|
||||
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/calendar.js:25
|
||||
msgid "S M T W T F S"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:47
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
|
||||
msgid "Now"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:51
|
||||
msgid "Clock"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:78
|
||||
msgid "Choose a time"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
|
||||
msgid "Midnight"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
|
||||
msgid "6 a.m."
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:84
|
||||
msgid "Noon"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:88
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:183
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:128
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:177
|
||||
msgid "Today"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:132
|
||||
msgid "Calendar"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:175
|
||||
msgid "Yesterday"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:179
|
||||
msgid "Tomorrow"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
|
||||
msgid "Show"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
|
||||
msgid "Hide"
|
||||
msgstr ""
|
BIN
django/conf/locale/uk/LC_MESSAGES/djangojs.mo
Normal file
BIN
django/conf/locale/uk/LC_MESSAGES/djangojs.mo
Normal file
Binary file not shown.
118
django/conf/locale/uk/LC_MESSAGES/djangojs.po
Normal file
118
django/conf/locale/uk/LC_MESSAGES/djangojs.po
Normal file
@ -0,0 +1,118 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-06-28 17:36+1000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:33
|
||||
#, perl-format
|
||||
msgid "Available %s"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:41
|
||||
msgid "Choose all"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:46
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:48
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:53
|
||||
#, perl-format
|
||||
msgid "Chosen %s"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:54
|
||||
msgid "Select your choice(s) and click "
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:59
|
||||
msgid "Clear all"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/dateparse.js:32
|
||||
#: contrib/admin/media/js/calendar.js:24
|
||||
msgid ""
|
||||
"January February March April May June July August September October November "
|
||||
"December"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/dateparse.js:33
|
||||
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/calendar.js:25
|
||||
msgid "S M T W T F S"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:47
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
|
||||
msgid "Now"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:51
|
||||
msgid "Clock"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:78
|
||||
msgid "Choose a time"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
|
||||
msgid "Midnight"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
|
||||
msgid "6 a.m."
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:84
|
||||
msgid "Noon"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:88
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:183
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:128
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:177
|
||||
msgid "Today"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:132
|
||||
msgid "Calendar"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:175
|
||||
msgid "Yesterday"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:179
|
||||
msgid "Tomorrow"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
|
||||
msgid "Show"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
|
||||
msgid "Hide"
|
||||
msgstr ""
|
BIN
django/conf/locale/zh_TW/LC_MESSAGES/djangojs.mo
Normal file
BIN
django/conf/locale/zh_TW/LC_MESSAGES/djangojs.mo
Normal file
Binary file not shown.
118
django/conf/locale/zh_TW/LC_MESSAGES/djangojs.po
Normal file
118
django/conf/locale/zh_TW/LC_MESSAGES/djangojs.po
Normal file
@ -0,0 +1,118 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2007-06-28 17:36+1000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:33
|
||||
#, perl-format
|
||||
msgid "Available %s"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:41
|
||||
msgid "Choose all"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:46
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:48
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:53
|
||||
#, perl-format
|
||||
msgid "Chosen %s"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:54
|
||||
msgid "Select your choice(s) and click "
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/SelectFilter2.js:59
|
||||
msgid "Clear all"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/dateparse.js:32
|
||||
#: contrib/admin/media/js/calendar.js:24
|
||||
msgid ""
|
||||
"January February March April May June July August September October November "
|
||||
"December"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/dateparse.js:33
|
||||
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/calendar.js:25
|
||||
msgid "S M T W T F S"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:47
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
|
||||
msgid "Now"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:51
|
||||
msgid "Clock"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:78
|
||||
msgid "Choose a time"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
|
||||
msgid "Midnight"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
|
||||
msgid "6 a.m."
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:84
|
||||
msgid "Noon"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:88
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:183
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:128
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:177
|
||||
msgid "Today"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:132
|
||||
msgid "Calendar"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:175
|
||||
msgid "Yesterday"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:179
|
||||
msgid "Tomorrow"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
|
||||
msgid "Show"
|
||||
msgstr ""
|
||||
|
||||
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
|
||||
msgid "Hide"
|
||||
msgstr ""
|
@ -9,7 +9,7 @@ ADMINS = (
|
||||
|
||||
MANAGERS = ADMINS
|
||||
|
||||
DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
|
||||
DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
|
||||
DATABASE_NAME = '' # Or path to database file if using sqlite3.
|
||||
DATABASE_USER = '' # Not used with sqlite3.
|
||||
DATABASE_PASSWORD = '' # Not used with sqlite3.
|
||||
|
@ -3,10 +3,13 @@ Tools for sending email.
|
||||
"""
|
||||
|
||||
from django.conf import settings
|
||||
from email import Charset, Encoders
|
||||
from email.MIMEText import MIMEText
|
||||
from email.MIMEMultipart import MIMEMultipart
|
||||
from email.MIMEBase import MIMEBase
|
||||
from email.Header import Header
|
||||
from email.Utils import formatdate
|
||||
from email import Charset
|
||||
import mimetypes
|
||||
import os
|
||||
import smtplib
|
||||
import socket
|
||||
@ -17,6 +20,10 @@ import random
|
||||
# some spam filters.
|
||||
Charset.add_charset('utf-8', Charset.SHORTEST, Charset.QP, 'utf-8')
|
||||
|
||||
# Default MIME type to use on attachments (if it is not explicitly given
|
||||
# and cannot be guessed).
|
||||
DEFAULT_ATTACHMENT_MIME_TYPE = 'application/octet-stream'
|
||||
|
||||
# Cache the hostname, but do it lazily: socket.getfqdn() can take a couple of
|
||||
# seconds, which slows down the restart of the server.
|
||||
class CachedDnsName(object):
|
||||
@ -64,6 +71,15 @@ class SafeMIMEText(MIMEText):
|
||||
val = Header(val, settings.DEFAULT_CHARSET)
|
||||
MIMEText.__setitem__(self, name, val)
|
||||
|
||||
class SafeMIMEMultipart(MIMEMultipart):
|
||||
def __setitem__(self, name, val):
|
||||
"Forbids multi-line headers, to prevent header injection."
|
||||
if '\n' in val or '\r' in val:
|
||||
raise BadHeaderError, "Header values can't contain newlines (got %r for header %r)" % (val, name)
|
||||
if name == "Subject":
|
||||
val = Header(val, settings.DEFAULT_CHARSET)
|
||||
MIMEMultipart.__setitem__(self, name, val)
|
||||
|
||||
class SMTPConnection(object):
|
||||
"""
|
||||
A wrapper that manages the SMTP network connection.
|
||||
@ -154,12 +170,19 @@ class EmailMessage(object):
|
||||
"""
|
||||
A container for email information.
|
||||
"""
|
||||
def __init__(self, subject='', body='', from_email=None, to=None, bcc=None, connection=None):
|
||||
content_subtype = 'plain'
|
||||
multipart_subtype = 'mixed'
|
||||
encoding = None # None => use settings default
|
||||
|
||||
def __init__(self, subject='', body='', from_email=None, to=None, bcc=None,
|
||||
connection=None, attachments=None, headers=None):
|
||||
self.to = to or []
|
||||
self.bcc = bcc or []
|
||||
self.from_email = from_email or settings.DEFAULT_FROM_EMAIL
|
||||
self.subject = subject
|
||||
self.body = body
|
||||
self.attachments = attachments or []
|
||||
self.extra_headers = headers or {}
|
||||
self.connection = connection
|
||||
|
||||
def get_connection(self, fail_silently=False):
|
||||
@ -168,7 +191,18 @@ class EmailMessage(object):
|
||||
return self.connection
|
||||
|
||||
def message(self):
|
||||
msg = SafeMIMEText(self.body, 'plain', settings.DEFAULT_CHARSET)
|
||||
encoding = self.encoding or settings.DEFAULT_CHARSET
|
||||
msg = SafeMIMEText(self.body, self.content_subtype, encoding)
|
||||
if self.attachments:
|
||||
body_msg = msg
|
||||
msg = SafeMIMEMultipart(_subtype=self.multipart_subtype)
|
||||
if self.body:
|
||||
msg.attach(body_msg)
|
||||
for attachment in self.attachments:
|
||||
if isinstance(attachment, MIMEBase):
|
||||
msg.attach(attachment)
|
||||
else:
|
||||
msg.attach(self._create_attachment(*attachment))
|
||||
msg['Subject'] = self.subject
|
||||
msg['From'] = self.from_email
|
||||
msg['To'] = ', '.join(self.to)
|
||||
@ -176,6 +210,8 @@ class EmailMessage(object):
|
||||
msg['Message-ID'] = make_msgid()
|
||||
if self.bcc:
|
||||
msg['Bcc'] = ', '.join(self.bcc)
|
||||
for name, value in self.extra_headers.items():
|
||||
msg[name] = value
|
||||
return msg
|
||||
|
||||
def recipients(self):
|
||||
@ -189,6 +225,61 @@ class EmailMessage(object):
|
||||
"""Send the email message."""
|
||||
return self.get_connection(fail_silently).send_messages([self])
|
||||
|
||||
def attach(self, filename=None, content=None, mimetype=None):
|
||||
"""
|
||||
Attaches a file with the given filename and content. The filename can
|
||||
be omitted (useful for multipart/alternative messages) and the mimetype
|
||||
is guessed, if not provided.
|
||||
|
||||
If the first parameter is a MIMEBase subclass it is inserted directly
|
||||
into the resulting message attachments.
|
||||
"""
|
||||
if isinstance(filename, MIMEBase):
|
||||
assert content == mimetype == None
|
||||
self.attachements.append(filename)
|
||||
else:
|
||||
assert content is not None
|
||||
self.attachments.append((filename, content, mimetype))
|
||||
|
||||
def attach_file(self, path, mimetype=None):
|
||||
"""Attaches a file from the filesystem."""
|
||||
filename = os.path.basename(path)
|
||||
content = open(path, 'rb').read()
|
||||
self.attach(filename, content, mimetype)
|
||||
|
||||
def _create_attachment(self, filename, content, mimetype=None):
|
||||
"""
|
||||
Convert the filename, content, mimetype triple into a MIME attachment
|
||||
object.
|
||||
"""
|
||||
if mimetype is None:
|
||||
mimetype, _ = mimetypes.guess_type(filename)
|
||||
if mimetype is None:
|
||||
mimetype = DEFAULT_ATTACHMENT_MIME_TYPE
|
||||
basetype, subtype = mimetype.split('/', 1)
|
||||
if basetype == 'text':
|
||||
attachment = SafeMIMEText(content, subtype, settings.DEFAULT_CHARSET)
|
||||
else:
|
||||
# Encode non-text attachments with base64.
|
||||
attachment = MIMEBase(basetype, subtype)
|
||||
attachment.set_payload(content)
|
||||
Encoders.encode_base64(attachment)
|
||||
if filename:
|
||||
attachment.add_header('Content-Disposition', 'attachment', filename=filename)
|
||||
return attachment
|
||||
|
||||
class EmailMultiAlternatives(EmailMessage):
|
||||
"""
|
||||
A version of EmailMessage that makes it easy to send multipart/alternative
|
||||
messages. For example, including text and HTML versions of the text is
|
||||
made easier.
|
||||
"""
|
||||
multipart_subtype = 'alternative'
|
||||
|
||||
def attach_alternative(self, content, mimetype=None):
|
||||
"""Attach an alternative content representation."""
|
||||
self.attach(content=content, mimetype=mimetype)
|
||||
|
||||
def send_mail(subject, message, from_email, recipient_list, fail_silently=False, auth_user=None, auth_password=None):
|
||||
"""
|
||||
Easy wrapper for sending a single message to a recipient list. All members
|
||||
|
@ -41,11 +41,16 @@ dictfetchall = complain
|
||||
get_last_insert_id = complain
|
||||
get_date_extract_sql = complain
|
||||
get_date_trunc_sql = complain
|
||||
get_datetime_cast_sql = complain
|
||||
get_limit_offset_sql = complain
|
||||
get_random_function_sql = complain
|
||||
get_deferrable_sql = complain
|
||||
get_fulltext_search_sql = complain
|
||||
get_drop_foreignkey_sql = complain
|
||||
get_pk_default_value = complain
|
||||
get_max_name_length = ignore
|
||||
get_start_transaction_sql = complain
|
||||
get_autoinc_sql = complain
|
||||
get_sql_flush = complain
|
||||
get_sql_sequence_reset = complain
|
||||
|
||||
|
@ -247,6 +247,8 @@ OPERATOR_MAPPING = {
|
||||
'iexact': 'LIKE %s',
|
||||
'contains': 'LIKE BINARY %s',
|
||||
'icontains': 'LIKE %s',
|
||||
'regex': 'REGEXP BINARY %s',
|
||||
'iregex': 'REGEXP %s',
|
||||
'gt': '> %s',
|
||||
'gte': '>= %s',
|
||||
'lt': '< %s',
|
||||
|
@ -248,6 +248,8 @@ OPERATOR_MAPPING = {
|
||||
'iexact': 'LIKE %s',
|
||||
'contains': 'LIKE BINARY %s',
|
||||
'icontains': 'LIKE %s',
|
||||
'regex': 'REGEXP BINARY %s',
|
||||
'iregex': 'REGEXP %s',
|
||||
'gt': '> %s',
|
||||
'gte': '>= %s',
|
||||
'lt': '< %s',
|
||||
|
@ -280,6 +280,8 @@ OPERATOR_MAPPING = {
|
||||
'iexact': 'ILIKE %s',
|
||||
'contains': 'LIKE %s',
|
||||
'icontains': 'ILIKE %s',
|
||||
'regex': '~ %s',
|
||||
'iregex': '~* %s',
|
||||
'gt': '> %s',
|
||||
'gte': '>= %s',
|
||||
'lt': '< %s',
|
||||
|
@ -225,6 +225,8 @@ OPERATOR_MAPPING = {
|
||||
'iexact': 'ILIKE %s',
|
||||
'contains': 'LIKE %s',
|
||||
'icontains': 'ILIKE %s',
|
||||
'regex': '~ %s',
|
||||
'iregex': '~* %s',
|
||||
'gt': '> %s',
|
||||
'gte': '>= %s',
|
||||
'lt': '< %s',
|
||||
|
@ -64,9 +64,10 @@ class DatabaseWrapper(local):
|
||||
}
|
||||
kwargs.update(self.options)
|
||||
self.connection = Database.connect(**kwargs)
|
||||
# Register extract and date_trunc functions.
|
||||
# Register extract, date_trunc, and regexp functions.
|
||||
self.connection.create_function("django_extract", 2, _sqlite_extract)
|
||||
self.connection.create_function("django_date_trunc", 2, _sqlite_date_trunc)
|
||||
self.connection.create_function("regexp", 2, _sqlite_regexp)
|
||||
cursor = self.connection.cursor(factory=SQLiteCursorWrapper)
|
||||
cursor.row_factory = utf8rowFactory
|
||||
if settings.DEBUG:
|
||||
@ -214,6 +215,13 @@ def _sqlite_date_trunc(lookup_type, dt):
|
||||
elif lookup_type == 'day':
|
||||
return "%i-%02i-%02i 00:00:00" % (dt.year, dt.month, dt.day)
|
||||
|
||||
def _sqlite_regexp(re_pattern, re_string):
|
||||
import re
|
||||
try:
|
||||
return bool(re.search(re_pattern, re_string))
|
||||
except:
|
||||
return False
|
||||
|
||||
# SQLite requires LIKE statements to include an ESCAPE clause if the value
|
||||
# being escaped has a percent or underscore in it.
|
||||
# See http://www.sqlite.org/lang_expr.html for an explanation.
|
||||
@ -222,6 +230,8 @@ OPERATOR_MAPPING = {
|
||||
'iexact': "LIKE %s ESCAPE '\\'",
|
||||
'contains': "LIKE %s ESCAPE '\\'",
|
||||
'icontains': "LIKE %s ESCAPE '\\'",
|
||||
'regex': 'REGEXP %s',
|
||||
'iregex': "REGEXP '(?i)' || %s",
|
||||
'gt': '> %s',
|
||||
'gte': '>= %s',
|
||||
'lt': '< %s',
|
||||
|
@ -174,7 +174,7 @@ class Field(object):
|
||||
|
||||
def get_db_prep_lookup(self, lookup_type, value):
|
||||
"Returns field's value prepared for database lookup."
|
||||
if lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte', 'month', 'day', 'search'):
|
||||
if lookup_type in ('exact', 'regex', 'iregex', 'gt', 'gte', 'lt', 'lte', 'month', 'day', 'search'):
|
||||
return [value]
|
||||
elif lookup_type in ('range', 'in'):
|
||||
return value
|
||||
@ -800,6 +800,7 @@ class IntegerField(Field):
|
||||
return super(IntegerField, self).formfield(**defaults)
|
||||
|
||||
class IPAddressField(Field):
|
||||
empty_strings_allowed = False
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs['maxlength'] = 15
|
||||
Field.__init__(self, *args, **kwargs)
|
||||
|
@ -1,3 +1,4 @@
|
||||
from django.conf import settings
|
||||
from django.db import backend, connection, transaction
|
||||
from django.db.models.fields import DateField, FieldDoesNotExist
|
||||
from django.db.models import signals, loading
|
||||
@ -22,6 +23,7 @@ QUERY_TERMS = (
|
||||
'gt', 'gte', 'lt', 'lte', 'in',
|
||||
'startswith', 'istartswith', 'endswith', 'iendswith',
|
||||
'range', 'year', 'month', 'day', 'isnull', 'search',
|
||||
'regex', 'iregex',
|
||||
)
|
||||
|
||||
# Size of each "chunk" for get_iterator calls.
|
||||
@ -797,6 +799,15 @@ def get_where_clause(lookup_type, table_prefix, field_name, value):
|
||||
return "%s%s IS %sNULL" % (table_prefix, field_name, (not value and 'NOT ' or ''))
|
||||
elif lookup_type == 'search':
|
||||
return backend.get_fulltext_search_sql(table_prefix + field_name)
|
||||
elif lookup_type in ('regex', 'iregex'):
|
||||
if settings.DATABASE_ENGINE == 'oracle':
|
||||
if lookup_type == 'regex':
|
||||
match_option = 'c'
|
||||
else:
|
||||
match_option = 'i'
|
||||
return "REGEXP_LIKE(%s%s, %s, '%s')" % (table_prefix, field_name, cast_sql, match_option)
|
||||
else:
|
||||
raise NotImplementedError
|
||||
raise TypeError, "Got invalid lookup_type: %s" % repr(lookup_type)
|
||||
|
||||
def get_cached_row(klass, row, index_start, max_depth=0, cur_depth=0):
|
||||
|
@ -162,7 +162,7 @@ class HttpResponse(object):
|
||||
|
||||
status_code = 200
|
||||
|
||||
def __init__(self, content='', mimetype=None):
|
||||
def __init__(self, content='', mimetype=None, status=None):
|
||||
from django.conf import settings
|
||||
self._charset = settings.DEFAULT_CHARSET
|
||||
if not mimetype:
|
||||
@ -175,6 +175,8 @@ class HttpResponse(object):
|
||||
self._is_string = True
|
||||
self.headers = {'Content-Type': mimetype}
|
||||
self.cookies = SimpleCookie()
|
||||
if status:
|
||||
self.status_code = status
|
||||
|
||||
def __str__(self):
|
||||
"Full HTTP message, including headers"
|
||||
|
@ -482,17 +482,18 @@ class ComboField(Field):
|
||||
|
||||
class MultiValueField(Field):
|
||||
"""
|
||||
A Field that is composed of multiple Fields.
|
||||
A Field that aggregates the logic of multiple Fields.
|
||||
|
||||
Its clean() method takes a "decompressed" list of values. Each value in
|
||||
Its clean() method takes a "decompressed" list of values, which are then
|
||||
cleaned into a single value according to self.fields. Each value in
|
||||
this list is cleaned by the corresponding field -- the first value is
|
||||
cleaned by the first field, the second value is cleaned by the second
|
||||
field, etc. Once all fields are cleaned, the list of clean values is
|
||||
"compressed" into a single value.
|
||||
|
||||
Subclasses should implement compress(), which specifies how a list of
|
||||
valid values should be converted to a single value. Subclasses should not
|
||||
have to implement clean().
|
||||
Subclasses should not have to implement clean(). Instead, they must
|
||||
implement compress(), which takes a list of valid values and returns a
|
||||
"compressed" version of those values -- a single value.
|
||||
|
||||
You'll probably want to use this with MultiWidget.
|
||||
"""
|
||||
|
@ -304,19 +304,28 @@ class MultiWidget(Widget):
|
||||
"""
|
||||
A widget that is composed of multiple widgets.
|
||||
|
||||
Its render() method takes a "decompressed" list of values, not a single
|
||||
value. Each value in this list is rendered in the corresponding widget --
|
||||
the first value is rendered in the first widget, the second value is
|
||||
rendered in the second widget, etc.
|
||||
Its render() method is different than other widgets', because it has to
|
||||
figure out how to split a single value for display in multiple widgets.
|
||||
The ``value`` argument can be one of two things:
|
||||
|
||||
Subclasses should implement decompress(), which specifies how a single
|
||||
value should be converted to a list of values. Subclasses should not
|
||||
have to implement clean().
|
||||
* A list.
|
||||
* A normal value (e.g., a string) that has been "compressed" from
|
||||
a list of values.
|
||||
|
||||
In the second case -- i.e., if the value is NOT a list -- render() will
|
||||
first "decompress" the value into a list before rendering it. It does so by
|
||||
calling the decompress() method, which MultiWidget subclasses must
|
||||
implement. This method takes a single "compressed" value and returns a
|
||||
list.
|
||||
|
||||
When render() does its HTML rendering, each value in the list is rendered
|
||||
with the corresponding widget -- the first value is rendered in the first
|
||||
widget, the second value is rendered in the second widget, etc.
|
||||
|
||||
Subclasses may implement format_output(), which takes the list of rendered
|
||||
widgets and returns HTML that formats them any way you'd like.
|
||||
widgets and returns a string of HTML that formats them any way you'd like.
|
||||
|
||||
You'll probably want to use this with MultiValueField.
|
||||
You'll probably want to use this class with MultiValueField.
|
||||
"""
|
||||
def __init__(self, widgets, attrs=None):
|
||||
self.widgets = [isinstance(w, type) and w() or w for w in widgets]
|
||||
@ -351,6 +360,13 @@ class MultiWidget(Widget):
|
||||
return [widget.value_from_datadict(data, name + '_%s' % i) for i, widget in enumerate(self.widgets)]
|
||||
|
||||
def format_output(self, rendered_widgets):
|
||||
"""
|
||||
Given a list of rendered widgets (as strings), returns a Unicode string
|
||||
representing the HTML for the whole lot.
|
||||
|
||||
This hook allows you to format the HTML design of the widgets, if
|
||||
needed.
|
||||
"""
|
||||
return u''.join(rendered_widgets)
|
||||
|
||||
def decompress(self, value):
|
||||
|
@ -461,7 +461,7 @@ block::
|
||||
Other built-in views
|
||||
--------------------
|
||||
|
||||
In addition to the `login` view, the authentication system includes a
|
||||
In addition to the ``login`` view, the authentication system includes a
|
||||
few other useful built-in views:
|
||||
|
||||
``django.contrib.auth.views.logout``
|
||||
|
@ -382,6 +382,65 @@ Model style
|
||||
('F', 'Female'),
|
||||
)
|
||||
|
||||
Documentation style
|
||||
===================
|
||||
|
||||
We place a high importance on consistency and readability of documentation.
|
||||
(After all, Django was created in a journalism environment!)
|
||||
|
||||
Guidelines for ReST files
|
||||
-------------------------
|
||||
|
||||
These guidelines regulate the format of our ReST documentation:
|
||||
|
||||
* In section titles, capitalize only initial words and proper nouns.
|
||||
|
||||
* Wrap the documentation at 80 characters wide, unless a code example
|
||||
is significantly less readable when split over two lines, or for another
|
||||
good reason.
|
||||
|
||||
Commonly used terms
|
||||
-------------------
|
||||
|
||||
Here are some style guidelines on commonly used terms throughout the
|
||||
documentation:
|
||||
|
||||
* **Django** -- when referring to the framework, capitalize Django. It is
|
||||
lowercase only in Python code and in the djangoproject.com logo.
|
||||
|
||||
* **e-mail** -- it has a hyphen.
|
||||
|
||||
* **MySQL**
|
||||
|
||||
* **PostgreSQL**
|
||||
|
||||
* **Python** -- when referring to the language, capitalize Python.
|
||||
|
||||
* **realize**, **customize**, **initialize**, etc. -- use the American
|
||||
"ize" suffix, not "ise."
|
||||
|
||||
* **SQLite**
|
||||
|
||||
* **subclass** -- it's a single word without a hyphen, both as a verb
|
||||
("subclass that model") and as a noun ("create a subclass").
|
||||
|
||||
* **Web**, **World Wide Web**, **the Web** -- note Web is always
|
||||
capitalized when referring to the World Wide Web.
|
||||
|
||||
* **Web site** -- use two words, with Web capitalized.
|
||||
|
||||
Django-specific terminology
|
||||
---------------------------
|
||||
|
||||
* **model** -- it's not capitalized.
|
||||
|
||||
* **template** -- it's not capitalized.
|
||||
|
||||
* **URLconf** -- use three capitalized letters, with no space before
|
||||
"conf."
|
||||
|
||||
* **view** -- it's not capitalized.
|
||||
|
||||
Committing code
|
||||
===============
|
||||
|
||||
|
@ -1173,6 +1173,58 @@ like ``contains`` but is significantly faster due to full-text indexing.
|
||||
Note this is only available in MySQL and requires direct manipulation of the
|
||||
database to add the full-text index.
|
||||
|
||||
regex
|
||||
~~~~~
|
||||
|
||||
**New in Django development version**
|
||||
|
||||
Case-sensitive regular expression match.
|
||||
|
||||
The regular expression syntax is that of the database backend in use. In the
|
||||
case of SQLite, which doesn't natively support regular-expression lookups, the
|
||||
syntax is that of Python's ``re`` module.
|
||||
|
||||
Example::
|
||||
|
||||
Entry.objects.get(title__regex=r'^(An?|The) +')
|
||||
|
||||
SQL equivalents::
|
||||
|
||||
SELECT ... WHERE title REGEXP BINARY '^(An?|The) +'; -- MySQL
|
||||
|
||||
SELECT ... WHERE REGEXP_LIKE(title, '^(an?|the) +', 'c'); -- Oracle
|
||||
|
||||
SELECT ... WHERE title ~ '^(An?|The) +'; -- PostgreSQL
|
||||
|
||||
SELECT ... WHERE title REGEXP '^(An?|The) +'; -- SQLite
|
||||
|
||||
Using raw strings (e.g., ``r'foo'`` instead of ``'foo'``) for passing in the
|
||||
regular expression syntax is recommended.
|
||||
|
||||
Regular expression matching is not supported on the ``ado_mssql`` backend.
|
||||
It will raise a ``NotImplementedError`` at runtime.
|
||||
|
||||
iregex
|
||||
~~~~~~
|
||||
|
||||
**New in Django development version**
|
||||
|
||||
Case-insensitive regular expression match.
|
||||
|
||||
Example::
|
||||
|
||||
Entry.objects.get(title__iregex=r'^(an?|the) +')
|
||||
|
||||
SQL equivalents::
|
||||
|
||||
SELECT ... WHERE title REGEXP '^(an?|the) +'; -- MySQL
|
||||
|
||||
SELECT ... WHERE REGEXP_LIKE(title, '^(an?|the) +', 'i'); -- Oracle
|
||||
|
||||
SELECT ... WHERE title ~* '^(an?|the) +'; -- PostgreSQL
|
||||
|
||||
SELECT ... WHERE title REGEXP '(?i)^(an?|the) +'; -- SQLite
|
||||
|
||||
Default lookups are exact
|
||||
-------------------------
|
||||
|
||||
@ -1779,7 +1831,7 @@ use the default manager, or if you want to search a list of related objects,
|
||||
you can provide ``get_object_or_404()`` with a manager object instead.
|
||||
For example::
|
||||
|
||||
# Get the author of blog instance `e` with a name of 'Fred'
|
||||
# Get the author of blog instance e with a name of 'Fred'
|
||||
a = get_object_or_404(e.authors, name='Fred')
|
||||
|
||||
# Use a custom manager 'recent_entries' in the search for an
|
||||
|
@ -513,7 +513,7 @@ Example usage::
|
||||
|
||||
Verbosity determines the amount of notification and debug information that
|
||||
will be printed to the console. '0' is no output, '1' is normal output,
|
||||
and `2` is verbose output.
|
||||
and ``2`` is verbose output.
|
||||
|
||||
--adminmedia
|
||||
------------
|
||||
|
126
docs/email.txt
126
docs/email.txt
@ -28,9 +28,9 @@ settings, if set, are used to authenticate to the SMTP server, and the
|
||||
.. note::
|
||||
|
||||
The character set of e-mail sent with ``django.core.mail`` will be set to
|
||||
the value of your `DEFAULT_CHARSET setting`_.
|
||||
the value of your `DEFAULT_CHARSET`_ setting.
|
||||
|
||||
.. _DEFAULT_CHARSET setting: ../settings/#default-charset
|
||||
.. _DEFAULT_CHARSET: ../settings/#default-charset
|
||||
.. _EMAIL_HOST: ../settings/#email-host
|
||||
.. _EMAIL_PORT: ../settings/#email-port
|
||||
.. _EMAIL_HOST_USER: ../settings/#email-host-user
|
||||
@ -198,27 +198,58 @@ e-mail, you can subclass these two classes to suit your needs.
|
||||
.. note::
|
||||
Not all features of the ``EmailMessage`` class are available through the
|
||||
``send_mail()`` and related wrapper functions. If you wish to use advanced
|
||||
features, such as BCC'ed recipients or multi-part e-mail, you'll need to
|
||||
create ``EmailMessage`` instances directly.
|
||||
features, such as BCC'ed recipients, file attachments, or multi-part
|
||||
e-mail, you'll need to create ``EmailMessage`` instances directly.
|
||||
|
||||
This is a design feature. ``send_mail()`` and related functions were
|
||||
originally the only interface Django provided. However, the list of
|
||||
parameters they accepted was slowly growing over time. It made sense to
|
||||
move to a more object-oriented design for e-mail messages and retain the
|
||||
original functions only for backwards compatibility.
|
||||
|
||||
In general, ``EmailMessage`` is responsible for creating the e-mail message
|
||||
itself. ``SMTPConnection`` is responsible for the network connection side of
|
||||
the operation. This means you can reuse the same connection (an
|
||||
``SMTPConnection`` instance) for multiple messages.
|
||||
|
||||
The ``EmailMessage`` class is initialized as follows::
|
||||
E-mail messages
|
||||
---------------
|
||||
|
||||
email = EmailMessage(subject, body, from_email, to, bcc, connection)
|
||||
The ``EmailMessage`` class is initialized with the following parameters (in
|
||||
the given order, if positional arguments are used). All parameters are
|
||||
optional and can be set at any time prior to calling the ``send()`` method.
|
||||
|
||||
All of these parameters are optional. If ``from_email`` is omitted, the value
|
||||
from ``settings.DEFAULT_FROM_EMAIL`` is used. Both the ``to`` and ``bcc``
|
||||
parameters are lists of addresses, as strings.
|
||||
* ``subject``: The subject line of the e-mail.
|
||||
|
||||
* ``body``: The body text. This should be a plain text message.
|
||||
|
||||
* ``from_email``: The sender's address. Both ``fred@example.com`` and
|
||||
``Fred <fred@example.com>`` forms are legal. If omitted, the
|
||||
``DEFAULT_FROM_EMAIL`` setting is used.
|
||||
|
||||
* ``to``: A list or tuple of recipient addresses.
|
||||
|
||||
* ``bcc``: A list or tuple of addresses used in the "Bcc" header when
|
||||
sending the e-mail.
|
||||
|
||||
* ``connection``: An ``SMTPConnection`` instance. Use this parameter if
|
||||
you want to use the same conneciton for multiple messages. If omitted, a
|
||||
new connection is created when ``send()`` is called.
|
||||
|
||||
* ``attachments``: A list of attachments to put on the message. These can
|
||||
be either ``email.MIMEBase.MIMEBase`` instances, or ``(filename,
|
||||
content, mimetype)`` triples.
|
||||
|
||||
* ``headers``: A dictionary of extra headers to put on the message. The
|
||||
keys are the header name, values are the header values. It's up to the
|
||||
caller to ensure header names and values are in the correct format for
|
||||
an e-mail message.
|
||||
|
||||
For example::
|
||||
|
||||
email = EmailMessage('Hello', 'Body goes here', 'from@example.com',
|
||||
['to1@example.com', 'to2@example.com'],
|
||||
['bcc@example.com'])
|
||||
['to1@example.com', 'to2@example.com'], ['bcc@example.com'],
|
||||
headers = {'Reply-To': 'another@example.com'})
|
||||
|
||||
The class has the following methods:
|
||||
|
||||
@ -227,18 +258,83 @@ The class has the following methods:
|
||||
if none already exists.
|
||||
|
||||
* ``message()`` constructs a ``django.core.mail.SafeMIMEText`` object (a
|
||||
sub-class of Python's ``email.MIMEText.MIMEText`` class) holding the
|
||||
message to be sent. If you ever need to extend the `EmailMessage` class,
|
||||
you'll probably want to override this method to put the content you wish
|
||||
subclass of Python's ``email.MIMEText.MIMEText`` class) or a
|
||||
``django.core.mail.SafeMIMEMultipart`` object holding the
|
||||
message to be sent. If you ever need to extend the ``EmailMessage`` class,
|
||||
you'll probably want to override this method to put the content you want
|
||||
into the MIME object.
|
||||
|
||||
* ``recipients()`` returns a list of all the recipients of the message,
|
||||
whether they're recorded in the ``to`` or ``bcc`` attributes. This is
|
||||
another method you might need to override when sub-classing, because the
|
||||
another method you might need to override when subclassing, because the
|
||||
SMTP server needs to be told the full list of recipients when the message
|
||||
is sent. If you add another way to specify recipients in your class, they
|
||||
need to be returned from this method as well.
|
||||
|
||||
* ``attach()`` creates a new file attachment and adds it to the message.
|
||||
There are two ways to call ``attach()``:
|
||||
|
||||
* You can pass it a single argument that is an
|
||||
``email.MIMBase.MIMEBase`` instance. This will be inserted directly
|
||||
into the resulting message.
|
||||
|
||||
* Alternatively, you can pass ``attach()`` three arguments:
|
||||
``filename``, ``content`` and ``mimetype``. ``filename`` is the name
|
||||
of the file attachment as it will appear in the e-mail, ``content`` is
|
||||
the data that will be contained inside the attachment and
|
||||
``mimetype`` is the optional MIME type for the attachment. If you
|
||||
omit ``mimetype``, the MIME content type will be guessed from the
|
||||
filename of the attachment.
|
||||
|
||||
For example::
|
||||
|
||||
message.attach('design.png', img_data, 'image/png')
|
||||
|
||||
* ``attach_file()`` creates a new attachment using a file from your
|
||||
filesystem. Call it with the path of the file to attach and, optionally,
|
||||
the MIME type to use for the attachment. If the MIME type is omitted, it
|
||||
will be guessed from the filename. The simplest use would be::
|
||||
|
||||
message.attach_file('/images/weather_map.png')
|
||||
|
||||
Sending alternative content types
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
It can be useful to include multiple versions of the content in an e-mail;
|
||||
the classic example is to send both text and HTML versions of a message. With
|
||||
Django's e-mail library, you can do this using the ``EmailMultiAlternatives``
|
||||
class. This subclass of ``EmailMessage`` has an ``attach_alternative()`` method
|
||||
for including extra versions of the message body in the e-mail. All the other
|
||||
methods (including the class initialization) are inherited directly from
|
||||
``EmailMessage``.
|
||||
|
||||
To send a text and HTML combination, you could write::
|
||||
|
||||
from django.core.mail import EmailMultiAlternatives
|
||||
|
||||
subject, from_email, to = 'hello', 'from@example.com', 'to@example.com'
|
||||
text_content = 'This is an important message.'
|
||||
html_content = '<p>This is an <strong>important</strong> message.'
|
||||
msg = EmailMultiAlternatives(subject, text_content, from_email, to)
|
||||
msg.attach_alternative(html_content, "text/html")
|
||||
msg.send()
|
||||
|
||||
By default, the MIME type of the ``body`` parameter in an ``EmailMessage`` is
|
||||
``"text/plain"``. It is good practice to leave this alone, because it
|
||||
guarantees that any recipient will be able to read the e-mail, regardless of
|
||||
their mail client. However, if you are confident that your recipients can
|
||||
handle an alternative content type, you can use the ``content_subtype``
|
||||
attribute on the ``EmailMessage`` class to change the main content type. The
|
||||
major type will always be ``"text"``, but you can change it to the subtype. For
|
||||
example::
|
||||
|
||||
msg = EmailMessage(subject, html_content, from_email, to)
|
||||
msg.content_subtype = "html" # Main content is now text/html
|
||||
msg.send()
|
||||
|
||||
SMTP network connections
|
||||
------------------------
|
||||
|
||||
The ``SMTPConnection`` class is initialized with the host, port, username and
|
||||
password for the SMTP server. If you don't specify one or more of those
|
||||
options, they are read from your settings file.
|
||||
|
@ -48,7 +48,8 @@ Get your database running
|
||||
|
||||
If you plan to use Django's database API functionality, you'll need to
|
||||
make sure a database server is running. Django works with PostgreSQL_,
|
||||
MySQL_ and SQLite_.
|
||||
MySQL_, Oracle_ and SQLite_ (the latter doesn't require a separate server to
|
||||
be running).
|
||||
|
||||
Additionally, you'll need to make sure your Python database bindings are
|
||||
installed.
|
||||
@ -76,6 +77,7 @@ installed.
|
||||
.. _pysqlite: http://initd.org/tracker/pysqlite
|
||||
.. _MySQL backend: ../databases/
|
||||
.. _cx_Oracle: http://www.python.net/crew/atuining/cx_Oracle/
|
||||
.. _Oracle: http://www.oracle.com/
|
||||
|
||||
Remove any old versions of Django
|
||||
=================================
|
||||
|
@ -18,7 +18,7 @@ You'll need to tell Django what your database connection parameters are, and
|
||||
what the name of the database is. Do that by editing these settings in your
|
||||
`settings file`_:
|
||||
|
||||
* `DATABASE_NAME`
|
||||
* `DATABASE_NAME`_
|
||||
* `DATABASE_ENGINE`_
|
||||
* `DATABASE_USER`_
|
||||
* `DATABASE_PASSWORD`_
|
||||
|
@ -493,9 +493,9 @@ possible values for "no data;" Django convention is to use the empty
|
||||
string, not ``NULL``.
|
||||
|
||||
.. note::
|
||||
Due to database limitations, when using the Oracle backend the
|
||||
``null=True`` option will be coerced for string-based fields that can
|
||||
blank, and the value ``NULL`` will be stored to denote the empty string.
|
||||
When using the Oracle database backend, the ``null=True`` option will
|
||||
be coerced for string-based fields that can blank, and the value
|
||||
``NULL`` will be stored to denote the empty string.
|
||||
|
||||
``blank``
|
||||
~~~~~~~~~
|
||||
@ -594,9 +594,12 @@ statement for this field.
|
||||
``db_tablespace``
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
If this field is indexed, the name of the database tablespace to use for the
|
||||
index. The default is the ``db_tablespace`` of the model, if any. If the
|
||||
backend doesn't support tablespaces, this option is ignored.
|
||||
**New in Django development version**
|
||||
|
||||
The name of the database tablespace to use for this field's index, if
|
||||
indeed this field is indexed. The default is the ``db_tablespace`` of
|
||||
the model, if any. If the backend doesn't support tablespaces, this
|
||||
option is ignored.
|
||||
|
||||
``default``
|
||||
~~~~~~~~~~~
|
||||
@ -1011,6 +1014,8 @@ that's OK. Django quotes column and table names behind the scenes.
|
||||
``db_tablespace``
|
||||
-----------------
|
||||
|
||||
**New in Django development version**
|
||||
|
||||
The name of the database tablespace to use for the model. If the backend
|
||||
doesn't support tablespaces, this option is ignored.
|
||||
|
||||
|
@ -28,7 +28,7 @@ The following changes may require you to update your code when you switch from
|
||||
|
||||
Due to a bug in older versions of the ``MySQLdb`` Python module (which
|
||||
Django uses to connect to MySQL databases), Django's MySQL backend now
|
||||
requires version 1.2.1p2 or higher of `MySQLdb`, and will raise
|
||||
requires version 1.2.1p2 or higher of ``MySQLdb``, and will raise
|
||||
exceptions if you attempt to use an older version.
|
||||
|
||||
If you're currently unable to upgrade your copy of ``MySQLdb`` to meet
|
||||
|
@ -48,12 +48,12 @@ Subset of fields
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
If you only want a subset of fields to be serialized, you can
|
||||
specify a `fields` argument to the serializer::
|
||||
specify a ``fields`` argument to the serializer::
|
||||
|
||||
from django.core import serializers
|
||||
data = serializers.serialize('xml', SomeModel.objects.all(), fields=('name','size'))
|
||||
|
||||
In this example, only the `name` and `size` attributes of each model will
|
||||
In this example, only the ``name`` and ``size`` attributes of each model will
|
||||
be serialized.
|
||||
|
||||
.. note::
|
||||
|
@ -253,8 +253,8 @@ can be invoked on the ``Client`` instance.
|
||||
f.close()
|
||||
|
||||
will result in the evaluation of a POST request on ``/customers/wishes/``,
|
||||
with a POST dictionary that contains `name`, `attachment` (containing the
|
||||
file name), and `attachment_file` (containing the file data). Note that you
|
||||
with a POST dictionary that contains ``name``, ``attachment`` (containing the
|
||||
file name), and ``attachment_file`` (containing the file data). Note that you
|
||||
need to manually close the file after it has been provided to the POST.
|
||||
|
||||
``login(**credentials)``
|
||||
@ -660,8 +660,8 @@ arguments:
|
||||
tested. This is the same format returned by ``django.db.models.get_apps()``
|
||||
|
||||
Verbosity determines the amount of notification and debug information that
|
||||
will be printed to the console; `0` is no output, `1` is normal output,
|
||||
and `2` is verbose output.
|
||||
will be printed to the console; ``0`` is no output, ``1`` is normal output,
|
||||
and ``2`` is verbose output.
|
||||
|
||||
This method should return the number of tests that failed.
|
||||
|
||||
|
@ -360,7 +360,7 @@ Note the following:
|
||||
quotes. The author of this tutorial runs PostgreSQL, so the example
|
||||
output is in PostgreSQL syntax.
|
||||
|
||||
* The `sql` command doesn't actually run the SQL in your database - it just
|
||||
* The ``sql`` command doesn't actually run the SQL in your database - it just
|
||||
prints it to the screen so that you can see what SQL Django thinks is required.
|
||||
If you wanted to, you could copy and paste this SQL into your database prompt.
|
||||
However, as we will see shortly, Django provides an easier way of committing
|
||||
|
@ -5,6 +5,7 @@ This demonstrates features of the database API.
|
||||
"""
|
||||
|
||||
from django.db import models
|
||||
from django.conf import settings
|
||||
|
||||
class Article(models.Model):
|
||||
headline = models.CharField(maxlength=100)
|
||||
@ -251,4 +252,100 @@ Traceback (most recent call last):
|
||||
...
|
||||
TypeError: Cannot resolve keyword 'headline__starts' into field. Choices are: id, headline, pub_date
|
||||
|
||||
# Create some articles with a bit more interesting headlines for testing field lookups:
|
||||
>>> now = datetime.now()
|
||||
>>> for a in Article.objects.all():
|
||||
... a.delete()
|
||||
>>> a1 = Article(pub_date=now, headline='f')
|
||||
>>> a1.save()
|
||||
>>> a2 = Article(pub_date=now, headline='fo')
|
||||
>>> a2.save()
|
||||
>>> a3 = Article(pub_date=now, headline='foo')
|
||||
>>> a3.save()
|
||||
>>> a4 = Article(pub_date=now, headline='fooo')
|
||||
>>> a4.save()
|
||||
>>> a5 = Article(pub_date=now, headline='hey-Foo')
|
||||
>>> a5.save()
|
||||
|
||||
# zero-or-more
|
||||
>>> Article.objects.filter(headline__regex=r'fo*')
|
||||
[<Article: f>, <Article: fo>, <Article: foo>, <Article: fooo>]
|
||||
>>> Article.objects.filter(headline__iregex=r'fo*')
|
||||
[<Article: f>, <Article: fo>, <Article: foo>, <Article: fooo>, <Article: hey-Foo>]
|
||||
|
||||
# one-or-more
|
||||
>>> Article.objects.filter(headline__regex=r'fo+')
|
||||
[<Article: fo>, <Article: foo>, <Article: fooo>]
|
||||
|
||||
# wildcard
|
||||
>>> Article.objects.filter(headline__regex=r'fooo?')
|
||||
[<Article: foo>, <Article: fooo>]
|
||||
|
||||
# and some more:
|
||||
>>> a6 = Article(pub_date=now, headline='bar')
|
||||
>>> a6.save()
|
||||
>>> a7 = Article(pub_date=now, headline='AbBa')
|
||||
>>> a7.save()
|
||||
>>> a8 = Article(pub_date=now, headline='baz')
|
||||
>>> a8.save()
|
||||
>>> a9 = Article(pub_date=now, headline='baxZ')
|
||||
>>> a9.save()
|
||||
|
||||
# leading anchor
|
||||
>>> Article.objects.filter(headline__regex=r'^b')
|
||||
[<Article: bar>, <Article: baxZ>, <Article: baz>]
|
||||
>>> Article.objects.filter(headline__iregex=r'^a')
|
||||
[<Article: AbBa>]
|
||||
|
||||
# trailing anchor
|
||||
>>> Article.objects.filter(headline__regex=r'z$')
|
||||
[<Article: baz>]
|
||||
>>> Article.objects.filter(headline__iregex=r'z$')
|
||||
[<Article: baxZ>, <Article: baz>]
|
||||
|
||||
# character sets
|
||||
>>> Article.objects.filter(headline__regex=r'ba[rz]')
|
||||
[<Article: bar>, <Article: baz>]
|
||||
>>> Article.objects.filter(headline__regex=r'ba.[RxZ]')
|
||||
[<Article: baxZ>]
|
||||
>>> Article.objects.filter(headline__iregex=r'ba[RxZ]')
|
||||
[<Article: bar>, <Article: baxZ>, <Article: baz>]
|
||||
|
||||
# and yet more:
|
||||
>>> a10 = Article(pub_date=now, headline='foobar')
|
||||
>>> a10.save()
|
||||
>>> a11 = Article(pub_date=now, headline='foobaz')
|
||||
>>> a11.save()
|
||||
>>> a12 = Article(pub_date=now, headline='ooF')
|
||||
>>> a12.save()
|
||||
>>> a13 = Article(pub_date=now, headline='foobarbaz')
|
||||
>>> a13.save()
|
||||
>>> a14 = Article(pub_date=now, headline='zoocarfaz')
|
||||
>>> a14.save()
|
||||
>>> a15 = Article(pub_date=now, headline='barfoobaz')
|
||||
>>> a15.save()
|
||||
>>> a16 = Article(pub_date=now, headline='bazbaRFOO')
|
||||
>>> a16.save()
|
||||
|
||||
# alternation
|
||||
>>> Article.objects.filter(headline__regex=r'oo(f|b)')
|
||||
[<Article: barfoobaz>, <Article: foobar>, <Article: foobarbaz>, <Article: foobaz>]
|
||||
>>> Article.objects.filter(headline__iregex=r'oo(f|b)')
|
||||
[<Article: barfoobaz>, <Article: foobar>, <Article: foobarbaz>, <Article: foobaz>, <Article: ooF>]
|
||||
>>> Article.objects.filter(headline__regex=r'^foo(f|b)')
|
||||
[<Article: foobar>, <Article: foobarbaz>, <Article: foobaz>]
|
||||
|
||||
# greedy matching
|
||||
>>> Article.objects.filter(headline__regex=r'b.*az')
|
||||
[<Article: barfoobaz>, <Article: baz>, <Article: bazbaRFOO>, <Article: foobarbaz>, <Article: foobaz>]
|
||||
>>> Article.objects.filter(headline__iregex=r'b.*ar')
|
||||
[<Article: bar>, <Article: barfoobaz>, <Article: bazbaRFOO>, <Article: foobar>, <Article: foobarbaz>]
|
||||
"""}
|
||||
|
||||
|
||||
if settings.DATABASE_ENGINE not in ('mysql', 'mysql_old'):
|
||||
__test__['API_TESTS'] += r"""
|
||||
# grouping and backreferences
|
||||
>>> Article.objects.filter(headline__regex=r'b(.).*b\1')
|
||||
[<Article: barfoobaz>, <Article: bazbaRFOO>, <Article: foobarbaz>]
|
||||
"""
|
||||
|
@ -219,6 +219,9 @@ class Templates(unittest.TestCase):
|
||||
# value will be converted to a bytestring.
|
||||
'filter-syntax18': (r'{{ var }}', {'var': UnicodeInStrClass()}, '\xc5\xa0\xc4\x90\xc4\x86\xc5\xbd\xc4\x87\xc5\xbe\xc5\xa1\xc4\x91'),
|
||||
|
||||
# Numbers as filter arguments should work
|
||||
'filter-syntax19': ('{{ var|truncatewords:1 }}', {"var": "hello world"}, "hello ..."),
|
||||
|
||||
### COMMENT SYNTAX ########################################################
|
||||
'comment-syntax01': ("{# this is hidden #}hello", {}, "hello"),
|
||||
'comment-syntax02': ("{# this is hidden #}hello{# foo #}", {}, "hello"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user