From f4a52d16b50d7a29d75de01109110ed7e474be78 Mon Sep 17 00:00:00 2001 From: Jason Pellerin Date: Sun, 20 Aug 2006 16:11:02 +0000 Subject: [PATCH] [multi-db] Merge trunk to [3620] git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3621 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- AUTHORS | 1 + django/bin/compile-messages.py | 11 +- django/conf/locale/ru/LC_MESSAGES/django.mo | Bin 31773 -> 34467 bytes django/conf/locale/ru/LC_MESSAGES/django.po | 411 +++++++----------- django/conf/project_template/settings.py | 4 + .../contrib/admin/templates/admin/base.html | 1 + django/contrib/admin/views/doc.py | 2 +- django/contrib/admin/views/main.py | 16 +- django/core/cache/backends/memcached.py | 2 +- django/middleware/cache.py | 3 + django/middleware/http.py | 24 + docs/cache.txt | 5 +- docs/faq.txt | 10 +- docs/i18n.txt | 5 +- docs/middleware.txt | 18 +- docs/model-api.txt | 55 ++- docs/templates_python.txt | 7 +- 17 files changed, 293 insertions(+), 282 deletions(-) diff --git a/AUTHORS b/AUTHORS index fb00ca43fe..e52fb46b47 100644 --- a/AUTHORS +++ b/AUTHORS @@ -68,6 +68,7 @@ answer newbie questions, and generally made Django that much better: deric@monowerks.com dne@mayonnaise.net Jeremy Dunck + Andy Dustman Clint Ecker gandalf@owca.info Baishampayan Ghose diff --git a/django/bin/compile-messages.py b/django/bin/compile-messages.py index 44a84de379..07dcce7bf6 100755 --- a/django/bin/compile-messages.py +++ b/django/bin/compile-messages.py @@ -11,7 +11,7 @@ def compile_messages(): elif os.path.isdir('locale'): basedir = os.path.abspath('locale') else: - print "this script should be run from the django svn tree or your project or app tree" + print "This script should be run from the Django SVN tree or your project or app tree." sys.exit(1) for dirpath, dirnames, filenames in os.walk(basedir): @@ -19,7 +19,14 @@ def compile_messages(): if f.endswith('.po'): sys.stderr.write('processing file %s in %s\n' % (f, dirpath)) pf = os.path.splitext(os.path.join(dirpath, f))[0] - cmd = 'msgfmt -o "%s.mo" "%s.po"' % (pf, pf) + # Store the names of the .mo and .po files in an environment + # variable, rather than doing a string replacement into the + # command, so that we can take advantage of shell quoting, to + # quote any malicious characters/escaping. + # See http://cyberelk.net/tim/articles/cmdline/ar01s02.html + os.environ['djangocompilemo'] = pf + '.mo' + os.environ['djangocompilepo'] = pf + '.po' + cmd = 'msgfmt -o "$djangocompilemo" "$djangocompilepo"' os.system(cmd) if __name__ == "__main__": diff --git a/django/conf/locale/ru/LC_MESSAGES/django.mo b/django/conf/locale/ru/LC_MESSAGES/django.mo index d45691bd30d01d7ff097b2e892217b46b901d49f..467c8ddb620897d02c5b08accb6c6b65472b1d52 100644 GIT binary patch delta 9776 zcmaLb2Yggj+Q;#m5LzgqNDv5cNdgIw450_41VWLH1jItgkQtJ|kO?yril`HUEH-Ro z#R7_}V%xxggd!?77F1?jW%aeNuIp>}m9^`u?(aYM1o3_Mv-jhZ?>Xn*d+s^UIrk=b z_xDNLHz$YR?T~Vd#oU;xs!q@R^{1lsEN)O9w zf~~MMrlHz1uq9@h^ZBMe5W87c*gA(o3oe+CO|cYfa4ELIw{b9jf+^Uer_*s3o<+SM z>VadCORVXbjmuF3xB)eQ+pq)PYut@#Jl}eeLUT_16`8zs5<~bYYKEn@Gr+ajo_ZZB zBR8WSv>j9N2zJE3U_1QK)W1g!pmi^2g6XJmm`;2TTuNT#56o++TTJ}&H5R`gw-v}ndunpLw!Ex;^nB+ zKZv^FE$oaxApcqInSMVUiW*oc>i$(Y5bwrmcpS^HTW@FPVbqde(VP4iQrJv`QuG2U zl`&N6-@;Y+H7Ya9={*?(sCo?+;iaf0d=e+%^O%CEIZl6RIGK7^R3?_-Wf;gI|II0U zX-<5P+9WNQzB=fJI&YhLE{>y~k0t0g?a!i8egvE0C#X$%3U&W47{q3MEsIB3m*6nG zFHB)5g*UM&rjgGk*a`Eo3n~+nQ5~0JDwdqXJ7O2i)cc=LL2EzTTyQ?>JuXFM;8N7uUWFRaT{sgTL3Q*a zj>5J~SD)xqk)M52H3|+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n>ei2W^?@d_)kC14=xqKpq=+$rn)5z<1p7_XlAizS%jBAV4fh@7 zjF-8oKkA=cbUb9^`B|-h8wexbr7RiU7b24zyPX{eINSl9`+B=3#mBmziNEUW+L*M| zU6lNx!@Z(=b8q+Fv`B}mORvf9`d;H5?v(T~Uan4kKX>2iJI~>MB(vJf<>-HRa*u@M zlFF)t5fvr(Rn97@Dz8Y7$|;*sRZ$&PR9;bDI^({mj473_C;LZ+ z7W6C3AK5QIH!7o`AZyl)#PW*iu7myWaUaNz3v{m=cEjOrJK}v`*LR~^xuVAmbFUrq zSyT5L)AAkeoO_GCT_a}ocdeRL=sq{=9v}Do2ikhM+E=+;6K7|+6KCgpxw31+-Mi=Z a@^N*jZRb8#^MJ!W`Jo7J_frc(eE$#Z>S#9r diff --git a/django/conf/locale/ru/LC_MESSAGES/django.po b/django/conf/locale/ru/LC_MESSAGES/django.po index 4e5ff239f8..ca204d2ddf 100644 --- a/django/conf/locale/ru/LC_MESSAGES/django.po +++ b/django/conf/locale/ru/LC_MESSAGES/django.po @@ -5,17 +5,21 @@ # msgid "" msgstr "" -"Project-Id-Version: django\n" +"Project-Id-Version: django 0.95\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-05-16 10:11+0200\n" -"PO-Revision-Date: 2005-11-26 00:00\n" -"Last-Translator: Dmitry Sorokin \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2006-08-14 18:08+0300\n" +"Last-Translator: Grigory Fateyev \n" +"Language-Team: Dialcom Services \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Russian\n" +"X-Poedit-Country: RUSSIAN FEDERATION\n" +"X-Poedit-SourceCharset: utf-8\n" -#: contrib/comments/models.py:67 contrib/comments/models.py:166 +#: contrib/comments/models.py:67 +#: contrib/comments/models.py:166 msgid "object ID" msgstr "ID объекта" @@ -23,7 +27,8 @@ msgstr "ID объекта" msgid "headline" msgstr "заголовок" -#: contrib/comments/models.py:69 contrib/comments/models.py:90 +#: contrib/comments/models.py:69 +#: contrib/comments/models.py:90 #: contrib/comments/models.py:167 msgid "comment" msgstr "комментарий" @@ -64,15 +69,18 @@ msgstr "рейтинг #8" msgid "is valid rating" msgstr "доступный рейтинг" -#: contrib/comments/models.py:83 contrib/comments/models.py:169 +#: contrib/comments/models.py:83 +#: contrib/comments/models.py:169 msgid "date/time submitted" msgstr "дата/время добавления" -#: contrib/comments/models.py:84 contrib/comments/models.py:170 +#: contrib/comments/models.py:84 +#: contrib/comments/models.py:170 msgid "is public" msgstr "публичный" -#: contrib/comments/models.py:85 contrib/admin/views/doc.py:289 +#: contrib/comments/models.py:85 +#: contrib/admin/views/doc.py:289 msgid "IP address" msgstr "IP адрес" @@ -81,19 +89,15 @@ msgid "is removed" msgstr "удален" #: contrib/comments/models.py:86 -msgid "" -"Check this box if the comment is inappropriate. A \"This comment has been " -"removed\" message will be displayed instead." -msgstr "" -"Отметте, если комментарий нежелателен. Сообщение \"Этот комментарий был " -"удалён\" будет показано взамен." +msgid "Check this box if the comment is inappropriate. A \"This comment has been removed\" message will be displayed instead." +msgstr "Отметте, если комментарий нежелателен. Сообщение \"Этот комментарий был удалён\" будет показано взамен." #: contrib/comments/models.py:91 -#, fuzzy msgid "comments" -msgstr "комментарий" +msgstr "комментарии" -#: contrib/comments/models.py:131 contrib/comments/models.py:207 +#: contrib/comments/models.py:131 +#: contrib/comments/models.py:207 msgid "Content object" msgstr "Объект наполнения" @@ -141,7 +145,6 @@ msgid "score date" msgstr "счёт времени" #: contrib/comments/models.py:237 -#, fuzzy msgid "karma score" msgstr "Карма счёт" @@ -152,7 +155,7 @@ msgstr "Карма счета" #: contrib/comments/models.py:242 #, python-format msgid "%(score)d rating by %(user)s" -msgstr "" +msgstr "%(score)d рейтинг %(user)s" #: contrib/comments/models.py:258 #, python-format @@ -197,7 +200,7 @@ msgstr "Удаления модератором" #: contrib/comments/models.py:285 #, python-format msgid "Moderator deletion by %r" -msgstr "" +msgstr "Удаления модератора %r" #: contrib/comments/views/karma.py:19 msgid "Anonymous users cannot vote" @@ -212,20 +215,17 @@ msgid "No voting for yourself" msgstr "Нельзя голосовать за себя" #: contrib/comments/views/comments.py:28 -msgid "" -"This rating is required because you've entered at least one other rating." -msgstr "" +msgid "This rating is required because you've entered at least one other rating." +msgstr "Этот рейтинг необходим, так как вы входили хоть однажды в другие рейтинги." #: contrib/comments/views/comments.py:112 #, python-format msgid "" -"This comment was posted by a user who has posted fewer than %(count)s " -"comment:\n" +"This comment was posted by a user who has posted fewer than %(count)s comment:\n" "\n" "%(text)s" msgid_plural "" -"This comment was posted by a user who has posted fewer than %(count)s " -"comments:\n" +"This comment was posted by a user who has posted fewer than %(count)s comments:\n" "\n" "%(text)s" msgstr[0] "" @@ -259,11 +259,8 @@ msgstr "Кто-то вмешивается в форму комментария #: contrib/comments/views/comments.py:207 #: contrib/comments/views/comments.py:292 -msgid "" -"The comment form had an invalid 'target' parameter -- the object ID was " -"invalid" -msgstr "" -"Форма комментария имеет неверный 'target' параметр -- ID объекта неверно" +msgid "The comment form had an invalid 'target' parameter -- the object ID was invalid" +msgstr "Форма комментария имеет неверный 'target' параметр -- ID объекта неверно" #: contrib/comments/views/comments.py:257 #: contrib/comments/views/comments.py:321 @@ -344,8 +341,11 @@ msgid "" "

By %s:

\n" "
    \n" msgstr "" +"

    К %s:

    \n" +"
      \n" -#: contrib/admin/filterspecs.py:70 contrib/admin/filterspecs.py:88 +#: contrib/admin/filterspecs.py:70 +#: contrib/admin/filterspecs.py:88 #: contrib/admin/filterspecs.py:143 msgid "All" msgstr "Все" @@ -414,14 +414,11 @@ msgstr "журнальные записи" msgid "All dates" msgstr "Все даты" -#: contrib/admin/views/decorators.py:9 contrib/auth/forms.py:36 +#: contrib/admin/views/decorators.py:9 +#: contrib/auth/forms.py:36 #: contrib/auth/forms.py:41 -msgid "" -"Please enter a correct username and password. Note that both fields are case-" -"sensitive." -msgstr "" -"Пожалуйста, вводите верные данные именя пользователя и пароль. Помните, оба " -"поля чувствительны к регистру." +msgid "Please enter a correct username and password. Note that both fields are case-sensitive." +msgstr "Пожалуйста, вводите верные данные именя пользователя и пароль. Помните, оба поля чувствительны к регистру." #: contrib/admin/views/decorators.py:23 #: contrib/admin/templates/admin/login.html:25 @@ -429,20 +426,12 @@ msgid "Log in" msgstr "Вход" #: contrib/admin/views/decorators.py:61 -msgid "" -"Please log in again, because your session has expired. Don't worry: Your " -"submission has been saved." -msgstr "" -"Пожалуйста войдите снова, посколькук ваша сессия устарела. Не беспокойтесь:" -"введенные вами данные сохранены." +msgid "Please log in again, because your session has expired. Don't worry: Your submission has been saved." +msgstr "Пожалуйста войдите снова, посколькук ваша сессия устарела. Не беспокойтесь:введенные вами данные сохранены." #: 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 "" -"Похоже, что ваш броузер не настроен на прием cookies. Пожалуйства включите " -"cookie, перезагрузите страницу и попытайтесь снова. " +msgid "Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again." +msgstr "Похоже, что ваш броузер не настроен на прием cookies. Пожалуйства включите cookie, перезагрузите страницу и попытайтесь снова. " #: contrib/admin/views/decorators.py:82 msgid "Usernames cannot contain the '@' character." @@ -451,7 +440,7 @@ msgstr "Имя пользователя не может включать сим #: contrib/admin/views/decorators.py:84 #, python-format msgid "Your e-mail address is not your username. Try '%s' instead." -msgstr "" +msgstr "Ваш e-mail адрес не ваше имя. Попробуйте '%s' в замен." #: contrib/admin/views/main.py:226 msgid "Site administration" @@ -462,11 +451,13 @@ msgstr "Администрирование сайта" msgid "The %(name)s \"%(obj)s\" was added successfully." msgstr "%(name)s \"%(obj)s\" были успешно добавлены." -#: contrib/admin/views/main.py:264 contrib/admin/views/main.py:348 +#: contrib/admin/views/main.py:264 +#: contrib/admin/views/main.py:348 msgid "You may edit it again below." msgstr "Вы снова можете редактировать их внизу" -#: contrib/admin/views/main.py:272 contrib/admin/views/main.py:357 +#: contrib/admin/views/main.py:272 +#: contrib/admin/views/main.py:357 #, python-format msgid "You may add another %s below." msgstr "Вы можете добавить %s внизу." @@ -481,7 +472,8 @@ msgstr "Добавить %s" msgid "Added %s." msgstr "Добавлено %s" -#: contrib/admin/views/main.py:336 contrib/admin/views/main.py:338 +#: contrib/admin/views/main.py:336 +#: contrib/admin/views/main.py:338 #: contrib/admin/views/main.py:340 msgid "and" msgstr "и" @@ -498,18 +490,17 @@ msgstr "Удалено %s." #: contrib/admin/views/main.py:343 msgid "No fields changed." -msgstr "" +msgstr "Ни одно поле не изменено." #: contrib/admin/views/main.py:346 #, python-format msgid "The %(name)s \"%(obj)s\" was changed successfully." -msgstr "" +msgstr "%(name)s \"%(obj)s\" было успешно изменено" #: contrib/admin/views/main.py:354 #, python-format -msgid "" -"The %(name)s \"%(obj)s\" was added successfully. You may edit it again below." -msgstr "" +msgid "The %(name)s \"%(obj)s\" was added successfully. You may edit it again below." +msgstr "%(name)s \"%(obj)s\" было успешно изменено. Вы можете редактировать его снова." #: contrib/admin/views/main.py:392 #, python-format @@ -550,9 +541,12 @@ msgstr "Выберите %s" msgid "Select %s to change" msgstr "Выберите %s для изменения" -#: 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 +#: 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 "Целое" @@ -560,7 +554,8 @@ msgstr "Целое" msgid "Boolean (Either True or False)" msgstr "Логическое (True или False)" -#: contrib/admin/views/doc.py:279 contrib/admin/views/doc.py:296 +#: contrib/admin/views/doc.py:279 +#: contrib/admin/views/doc.py:296 #, python-format msgid "String (up to %(maxlength)s)" msgstr "Строка (до %(maxlength)s символов)" @@ -581,7 +576,8 @@ msgstr "Дата (с указанием времени)" msgid "E-mail address" msgstr "E-mail адрес" -#: contrib/admin/views/doc.py:284 contrib/admin/views/doc.py:287 +#: contrib/admin/views/doc.py:284 +#: contrib/admin/views/doc.py:287 msgid "File path" msgstr "Путь к файлу" @@ -595,7 +591,7 @@ msgstr "Логическое (True, False или None)" #: contrib/admin/views/doc.py:292 msgid "Relation to parent model" -msgstr "" +msgstr "Зависимость на родительскую модель." #: contrib/admin/views/doc.py:293 msgid "Phone number" @@ -609,7 +605,8 @@ msgstr "Текст" msgid "Time" msgstr "Время" -#: contrib/admin/views/doc.py:300 contrib/flatpages/models.py:7 +#: contrib/admin/views/doc.py:300 +#: contrib/flatpages/models.py:7 msgid "URL" msgstr "URL" @@ -689,12 +686,8 @@ msgid "DATE_WITH_TIME_FULL" msgstr "j. N Y, H:i" #: contrib/admin/templates/admin/object_history.html:36 -msgid "" -"This object doesn't have a change history. It probably wasn't added via this " -"admin site." -msgstr "" -"Данный обьект не имеет истории изменения. Возможно он не был добавлен через " -"данный административный сайт." +msgid "This object doesn't have a change history. It probably wasn't added via this admin site." +msgstr "Данный обьект не имеет истории изменения. Возможно он не был добавлен через данный административный сайт." #: contrib/admin/templates/admin/base_site.html:4 msgid "Django site admin" @@ -717,12 +710,8 @@ msgid "Server Error (500)" msgstr "Ошибка сервера (500)" #: contrib/admin/templates/admin/500.html:10 -msgid "" -"There's been an error. It's been reported to the site administrators via e-" -"mail and should be fixed shortly. Thanks for your patience." -msgstr "" -"Произошла ошибка. Отчет об ошибке отправлен администраторам сайта по e-mailи " -"она должна быть вскоре исправлена. Благодарим вас на терпение и помощь." +msgid "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience." +msgstr "Произошла ошибка. Отчет об ошибке отправлен администраторам сайта по e-mailи она должна быть вскоре исправлена. Благодарим вас на терпение и помощь." #: contrib/admin/templates/admin/404.html:4 #: contrib/admin/templates/admin/404.html:8 @@ -736,7 +725,7 @@ msgstr "К сожалению, запрашиваемая вами страни #: contrib/admin/templates/admin/index.html:17 #, python-format msgid "Models available in the %(name)s application." -msgstr "Модели доступны в %(name) приложении." +msgstr "Модели доступны в %(name)s приложении." #: contrib/admin/templates/admin/index.html:28 #: contrib/admin/templates/admin/change_form.html:15 @@ -783,23 +772,13 @@ msgstr "Удалить" #: contrib/admin/templates/admin/delete_confirmation.html:14 #, python-format -msgid "" -"Deleting the %(object_name)s '%(object)s' would result in deleting related " -"objects, but your account doesn't have permission to delete the following " -"types of objects:" -msgstr "" -"Удаление объекта %(object_name)s '%(object)s' приведет к удалению зависимых " -"элементов, но предоставленных вам прав недостаточно для удаления следующих " -"типов объектов:" +msgid "Deleting the %(object_name)s '%(object)s' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:" +msgstr "Удаление объекта %(object_name)s '%(object)s' приведет к удалению зависимых элементов, но предоставленных вам прав недостаточно для удаления следующих типов объектов:" #: contrib/admin/templates/admin/delete_confirmation.html:21 #, python-format -msgid "" -"Are you sure you want to delete the %(object_name)s \"%(object)s\"? All of " -"the following related items will be deleted:" -msgstr "" -"Вы уверены, что хотите удалить %(object_name)s \"%(object)s\"? Все " -"следующие объекты также будут удалены:" +msgid "Are you sure you want to delete the %(object_name)s \"%(object)s\"? All of the following related items will be deleted:" +msgstr "Вы уверены, что хотите удалить %(object_name)s \"%(object)s\"? Все следующие объекты также будут удалены:" #: contrib/admin/templates/admin/delete_confirmation.html:26 msgid "Yes, I'm sure" @@ -808,7 +787,7 @@ msgstr "Да, я уверен" #: contrib/admin/templates/admin/filter.html:2 #, python-format msgid " By %(title)s " -msgstr "" +msgstr "К%(title)s " #: contrib/admin/templates/admin/search_form.html:8 msgid "Go" @@ -872,12 +851,8 @@ msgid "Password reset" msgstr "Сброс пароля" #: contrib/admin/templates/registration/password_reset_form.html:12 -msgid "" -"Forgotten your password? Enter your e-mail address below, and we'll reset " -"your password and e-mail the new one to you." -msgstr "" -"Забыли пароль? Введите ваш e-mail адрес ниже и мы очистим ваш старый пароль, " -"и вышлем вам по e-mail новый." +msgid "Forgotten your password? Enter your e-mail address below, and we'll reset your password and e-mail the new one to you." +msgstr "Забыли пароль? Введите ваш e-mail адрес ниже и мы очистим ваш старый пароль, и вышлем вам по e-mail новый." #: contrib/admin/templates/registration/password_reset_form.html:16 msgid "E-mail address:" @@ -901,20 +876,12 @@ msgid "Password reset successful" msgstr "Успешная очистка пароля" #: contrib/admin/templates/registration/password_reset_done.html:12 -msgid "" -"We've e-mailed a new password to the e-mail address you submitted. You " -"should be receiving it shortly." -msgstr "" -"Мы отправили новый пароль по указанному вами адресу электронной почты. Вы " -"должны его вскоре получить." +msgid "We've e-mailed a new password to the e-mail address you submitted. You should be receiving it shortly." +msgstr "Мы отправили новый пароль по указанному вами адресу электронной почты. Вы должны его вскоре получить." #: contrib/admin/templates/registration/password_change_form.html:12 -msgid "" -"Please enter your old password, for security's sake, and then enter your new " -"password twice so we can verify you typed it in correctly." -msgstr "" -"В целях безопасности, пожалуйста, введите ваш старый пароль, затем - новый " -"пароль дважды, с тем, чтобы мы могли убедиться в правильности написания." +msgid "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." +msgstr "В целях безопасности, пожалуйста, введите ваш старый пароль, затем - новый пароль дважды, с тем, чтобы мы могли убедиться в правильности написания." #: contrib/admin/templates/registration/password_change_form.html:17 msgid "Old password:" @@ -987,24 +954,16 @@ msgid "Documentation for this page" msgstr "Документация по данной странице" #: contrib/admin/templates/admin_doc/bookmarklets.html:20 -msgid "" -"Jumps you from any page to the documentation for the view that generates " -"that page." -msgstr "" -"Перенаправит вас с любой страницы к просмотру документа, который генерирует " -"эту страницу." +msgid "Jumps you from any page to the documentation for the view that generates that page." +msgstr "Перенаправит вас с любой страницы к просмотру документа, который генерирует эту страницу." #: contrib/admin/templates/admin_doc/bookmarklets.html:22 msgid "Show object ID" msgstr "Показать ID обьекта" #: contrib/admin/templates/admin_doc/bookmarklets.html:23 -msgid "" -"Shows the content-type and unique ID for pages that represent a single " -"object." -msgstr "" -"Показывает тип наполнения и уникальный ID для страниц, которые означают " -"одинокий объект." +msgid "Shows the content-type and unique ID for pages that represent a single object." +msgstr "Показывает тип наполнения и уникальный ID для страниц, которые означают одинокий объект." #: contrib/admin/templates/admin_doc/bookmarklets.html:25 msgid "Edit this object (current window)" @@ -1043,24 +1002,16 @@ msgid "redirect from" msgstr "перенаправить из" #: contrib/redirects/models.py:8 -msgid "" -"This should be an absolute path, excluding the domain name. Example: '/" -"events/search/'." -msgstr "" -"Это должен быть абсолютный путь, исключая доменное имя. Пример: '/events/" -"search/'." +msgid "This should be an absolute path, excluding the domain name. Example: '/events/search/'." +msgstr "Это должен быть абсолютный путь, исключая доменное имя. Пример: '/events/search/'." #: contrib/redirects/models.py:9 msgid "redirect to" msgstr "перенаправить на" #: contrib/redirects/models.py:10 -msgid "" -"This can be either an absolute path (as above) or a full URL starting with " -"'http://'." -msgstr "" -"Это должен быть, либо абсолютный путь (как выше) или полный URL начинающийся " -"с 'http://'." +msgid "This can be either an absolute path (as above) or a full URL starting with 'http://'." +msgstr "Это должен быть, либо абсолютный путь (как выше) или полный URL начинающийся с 'http://'." #: contrib/redirects/models.py:12 msgid "redirect" @@ -1071,10 +1022,8 @@ msgid "redirects" msgstr "перенаправления" #: contrib/flatpages/models.py:8 -msgid "" -"Example: '/about/contact/'. Make sure to have leading and trailing slashes." -msgstr "" -"Пример: '/about/contact/'. Будьте уверенны, что вставили завепршающий слэш." +msgid "Example: '/about/contact/'. Make sure to have leading and trailing slashes." +msgstr "Пример: '/about/contact/'. Будьте уверенны, что вставили завепршающий слэш." #: contrib/flatpages/models.py:9 msgid "title" @@ -1093,10 +1042,8 @@ msgid "template name" msgstr "имя шаблона" #: contrib/flatpages/models.py:13 -msgid "" -"Example: 'flatpages/contact_page'. If this isn't provided, the system will " -"use 'flatpages/default'." -msgstr "" +msgid "Example: 'flatpages/contact_page'. If this isn't provided, the system will use 'flatpages/default'." +msgstr "Пример: 'flatpages/contact_page'. Если этот файл не присутствует, система будет использовать 'flatpages/default'." #: contrib/flatpages/models.py:14 msgid "registration required" @@ -1114,7 +1061,8 @@ msgstr "простая страница" msgid "flat pages" msgstr "простые страницы" -#: contrib/auth/models.py:13 contrib/auth/models.py:26 +#: contrib/auth/models.py:13 +#: contrib/auth/models.py:26 msgid "name" msgstr "имя" @@ -1126,7 +1074,8 @@ msgstr "код" msgid "permission" msgstr "Права" -#: contrib/auth/models.py:18 contrib/auth/models.py:27 +#: contrib/auth/models.py:18 +#: contrib/auth/models.py:27 msgid "permissions" msgstr "Права" @@ -1134,7 +1083,8 @@ msgstr "Права" msgid "group" msgstr "Группа" -#: contrib/auth/models.py:30 contrib/auth/models.py:65 +#: contrib/auth/models.py:30 +#: contrib/auth/models.py:65 msgid "groups" msgstr "Группы" @@ -1160,7 +1110,7 @@ msgstr "пароль" #: contrib/auth/models.py:59 msgid "Use '[algo]$[salt]$[hexdigest]'" -msgstr "" +msgstr "Используйте '[algo]$[salt]$[hexdigest]'" #: contrib/auth/models.py:60 msgid "staff status" @@ -1187,12 +1137,8 @@ msgid "date joined" msgstr "дата регистрации" #: contrib/auth/models.py:66 -msgid "" -"In addition to the permissions manually assigned, this user will also get " -"all permissions granted to each group he/she is in." -msgstr "" -"К добавлению к перавам выбрнанным вуручную, этот пользователь может получить " -"все права группы, к которой он принадлежит." +msgid "In addition to the permissions manually assigned, this user will also get all permissions granted to each group he/she is in." +msgstr "К добавлению к перавам выбрнанным вуручную, этот пользователь может получить все права группы, к которой он принадлежит." #: contrib/auth/models.py:67 msgid "user permissions" @@ -1227,10 +1173,8 @@ msgid "message" msgstr "Сообщение" #: contrib/auth/forms.py:30 -msgid "" -"Your Web browser doesn't appear to have cookies enabled. Cookies are " -"required for logging in." -msgstr "" +msgid "Your Web browser doesn't appear to have cookies enabled. Cookies are required for logging in." +msgstr "У вашего браузера не включены cookies. Cookies необходимы для входа." #: contrib/contenttypes/models.py:25 msgid "python model class name" @@ -1328,23 +1272,28 @@ msgstr "Январь" msgid "February" msgstr "Февраль" -#: utils/dates.py:14 utils/dates.py:27 +#: utils/dates.py:14 +#: utils/dates.py:27 msgid "March" msgstr "Март" -#: utils/dates.py:14 utils/dates.py:27 +#: utils/dates.py:14 +#: utils/dates.py:27 msgid "April" msgstr "Апрель" -#: utils/dates.py:14 utils/dates.py:27 +#: utils/dates.py:14 +#: utils/dates.py:27 msgid "May" msgstr "Май" -#: utils/dates.py:14 utils/dates.py:27 +#: utils/dates.py:14 +#: utils/dates.py:27 msgid "June" msgstr "Июнь" -#: utils/dates.py:15 utils/dates.py:27 +#: utils/dates.py:15 +#: utils/dates.py:27 msgid "July" msgstr "Июль" @@ -1593,11 +1542,8 @@ msgid "This value must contain only letters, numbers and underscores." msgstr "Значение может содержать только буквы, цифры и подчеркивания." #: core/validators.py:64 -msgid "" -"This value must contain only letters, numbers, underscores, dashes or " -"slashes." -msgstr "Значение может содержать только буквы, цифры, подчеркивания, дифисы или " -"тере." +msgid "This value must contain only letters, numbers, underscores, dashes or slashes." +msgstr "Значение может содержать только буквы, цифры, подчеркивания, дифисы или тере." #: core/validators.py:72 msgid "Uppercase letters are not allowed here." @@ -1647,7 +1593,8 @@ msgstr "Вводите реальную дату в формате YYYY-MM-DD." msgid "Enter a valid time in HH:MM format." msgstr "Вводите реальное время в формате HH:MM." -#: core/validators.py:132 db/models/fields/__init__.py:468 +#: core/validators.py:132 +#: db/models/fields/__init__.py:468 msgid "Enter a valid date/time in YYYY-MM-DD HH:MM format." msgstr "Вводите реальные дата/время в формате YYYY-MM-DD HH:MM." @@ -1656,12 +1603,8 @@ msgid "Enter a valid e-mail address." msgstr "Укажите реальный e-mail адрес." #: core/validators.py:148 -msgid "" -"Upload a valid image. The file you uploaded was either not an image or a " -"corrupted image." -msgstr "" -"Загрузите реальное изображение. Файл, который вы загружали, не был " -"изображением или был поврежден." +msgid "Upload a valid image. The file you uploaded was either not an image or a corrupted image." +msgstr "Загрузите реальное изображение. Файл, который вы загружали, не был изображением или был поврежден." #: core/validators.py:155 #, python-format @@ -1701,7 +1644,8 @@ msgstr "Неверный формат XML: %s" msgid "Invalid URL: %s" msgstr "Неверный URL: %s" -#: core/validators.py:206 core/validators.py:208 +#: core/validators.py:206 +#: core/validators.py:208 #, python-format msgid "The URL %s is a broken link." msgstr "URL %s сломанная ссылка." @@ -1726,7 +1670,8 @@ msgstr "Это поле должно совпадать с полем '%s'." msgid "Please enter something for at least one field." msgstr "Пожалуйста, заполните хотя бы одно поле." -#: core/validators.py:264 core/validators.py:275 +#: core/validators.py:264 +#: core/validators.py:275 msgid "Please enter both fields or leave them both empty." msgstr "Пожалуйста, заполните оба поля либо оставьте их пустыми." @@ -1756,26 +1701,16 @@ msgstr "Пожалуйста, вводите корректное десятич #: core/validators.py:349 #, python-format msgid "Please enter a valid decimal number with at most %s total digit." -msgid_plural "" -"Please enter a valid decimal number with at most %s total digits." -msgstr[0] "" -"Пожалуйста, вводите корректное десятичное число с максимальным количеством " -"знаков %s." -msgstr[1] "" -"Пожалуйста, вводите корректное десятичное число с максимальным количеством " -"знаков %s." +msgid_plural "Please enter a valid decimal number with at most %s total digits." +msgstr[0] "Пожалуйста, вводите корректное десятичное число с максимальным количеством знаков %s." +msgstr[1] "Пожалуйста, вводите корректное десятичное число с максимальным количеством знаков %s." #: core/validators.py:352 #, python-format msgid "Please enter a valid decimal number with at most %s decimal place." -msgid_plural "" -"Please enter a valid decimal number with at most %s decimal places." -msgstr[0] "" -"Пожалуйста, вводите корректное десятичное число с максимальным количеством " -"знаков после запятой %s." -msgstr[1] "" -"Пожалуйста, вводите корректное десятичное число с максимальным количеством " -"знаков после запятой %s." +msgid_plural "Please enter a valid decimal number with at most %s decimal places." +msgstr[0] "Пожалуйста, вводите корректное десятичное число с максимальным количеством знаков после запятой %s." +msgstr[1] "Пожалуйста, вводите корректное десятичное число с максимальным количеством знаков после запятой %s." #: core/validators.py:362 #, python-format @@ -1802,50 +1737,37 @@ msgstr "Невозможно получить что-либо с %s." #: core/validators.py:429 #, python-format -msgid "" -"The URL %(url)s returned the invalid Content-Type header '%(contenttype)s'." -msgstr "URL %(url) вернул неверный заголовок Content-Type '%(contenttype)'." +msgid "The URL %(url)s returned the invalid Content-Type header '%(contenttype)s'." +msgstr "URL %(url)s вернул неверный заголовок Content-Type '%(contenttype)s'." #: core/validators.py:462 #, python-format -msgid "" -"Please close the unclosed %(tag)s tag from line %(line)s. (Line starts with " -"\"%(start)s\".)" +msgid "Please close the unclosed %(tag)s tag from line %(line)s. (Line starts with \"%(start)s\".)" msgstr "" #: core/validators.py:466 #, python-format -msgid "" -"Some text starting on line %(line)s is not allowed in that context. (Line " -"starts with \"%(start)s\".)" +msgid "Some text starting on line %(line)s is not allowed in that context. (Line starts with \"%(start)s\".)" msgstr "" #: core/validators.py:471 #, python-format -msgid "" -"\"%(attr)s\" on line %(line)s is an invalid attribute. (Line starts with \"%" -"(start)s\".)" +msgid "\"%(attr)s\" on line %(line)s is an invalid attribute. (Line starts with \"%(start)s\".)" msgstr "" #: core/validators.py:476 #, python-format -msgid "" -"\"<%(tag)s>\" on line %(line)s is an invalid tag. (Line starts with \"%" -"(start)s\".)" +msgid "\"<%(tag)s>\" on line %(line)s is an invalid tag. (Line starts with \"%(start)s\".)" msgstr "" #: core/validators.py:480 #, python-format -msgid "" -"A tag on line %(line)s is missing one or more required attributes. (Line " -"starts with \"%(start)s\".)" +msgid "A tag on line %(line)s is missing one or more required attributes. (Line starts with \"%(start)s\".)" msgstr "" #: core/validators.py:485 #, python-format -msgid "" -"The \"%(attr)s\" attribute on line %(line)s has an invalid value. (Line " -"starts with \"%(start)s\".)" +msgid "The \"%(attr)s\" attribute on line %(line)s has an invalid value. (Line starts with \"%(start)s\".)" msgstr "" #: db/models/manipulators.py:302 @@ -1858,8 +1780,10 @@ msgstr "" msgid "%(optname)s with this %(fieldname)s already exists." 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 +#: 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 msgid "This field is required." msgstr "Обязательное поле." @@ -1869,14 +1793,12 @@ msgid "This value must be an integer." msgstr "" #: db/models/fields/__init__.py:369 -#, fuzzy msgid "This value must be either True or False." -msgstr "Логическое (True или False)" +msgstr "Значение должно либо True либо False." #: db/models/fields/__init__.py:385 -#, fuzzy msgid "This field cannot be null." -msgstr "Это поле неверно." +msgstr "Это поле не может быть нулевым." #: db/models/fields/__init__.py:562 msgid "Enter a valid filename." @@ -1888,23 +1810,17 @@ msgid "Please enter a valid %s." msgstr "" #: db/models/fields/related.py:579 -#, fuzzy msgid "Separate multiple IDs with commas." msgstr "Несколько значений ID разделяйте запятыми." #: db/models/fields/related.py:581 -#, fuzzy -msgid "" -"Hold down \"Control\", or \"Command\" on a Mac, to select more than one." -msgstr "" -" Удерживайте \"Control\", или \"Command\" на Макинтош, для выбора больше чем " -"одного." +msgid "Hold down \"Control\", or \"Command\" on a Mac, to select more than one." +msgstr " Удерживайте \"Control\", или \"Command\" на Макинтош, для выбора больше чем одного." #: db/models/fields/related.py:625 #, python-format msgid "Please enter valid %(self)s IDs. The value %(value)r is invalid." -msgid_plural "" -"Please enter valid %(self)s IDs. The values %(value)r are invalid." +msgid_plural "Please enter valid %(self)s IDs. The values %(value)r are invalid." msgstr[0] "" msgstr[1] "" @@ -1919,7 +1835,9 @@ msgstr[1] "" msgid "Line breaks are not allowed here." msgstr "Переносы строк не допускаются здесь." -#: forms/__init__.py:480 forms/__init__.py:551 forms/__init__.py:589 +#: forms/__init__.py:480 +#: forms/__init__.py:551 +#: forms/__init__.py:589 #, python-format msgid "Select a valid choice; '%(data)s' is not in %(choices)s." msgstr "" @@ -1944,30 +1862,3 @@ msgstr "Введите целое число в диапазоне от 0 до 3 msgid "yes,no,maybe" msgstr "да,нет,может быть" -#~ msgid "Comment" -#~ msgstr "Комментарий" - -#~ msgid "Comments" -#~ msgstr "Комментарии" - -#~ msgid "label" -#~ msgstr "метка" - -#~ msgid "package" -#~ msgstr "пакет" - -#~ msgid "packages" -#~ msgstr "пакеты" - -#~ msgid "String (up to 50)" -#~ msgstr "Строка (до 50 символов)" - -#~ msgid "" -#~ "Example: 'flatfiles/contact_page'. If this isn't provided, the system " -#~ "will use 'flatfiles/default'." -#~ msgstr "" -#~ "Пример: 'flatfiles/contact_page'. Если не предусмотрена, система будет " -#~ "использовать 'flatfiles/default'." - -#~ msgid "Server error (500)" -#~ msgstr "Ошибка сервера (500)" diff --git a/django/conf/project_template/settings.py b/django/conf/project_template/settings.py index 63e07c061a..d6f34a28db 100644 --- a/django/conf/project_template/settings.py +++ b/django/conf/project_template/settings.py @@ -27,6 +27,10 @@ LANGUAGE_CODE = 'en-us' SITE_ID = 1 +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True + # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" MEDIA_ROOT = '' diff --git a/django/contrib/admin/templates/admin/base.html b/django/contrib/admin/templates/admin/base.html index 41514e6a81..b63604b268 100644 --- a/django/contrib/admin/templates/admin/base.html +++ b/django/contrib/admin/templates/admin/base.html @@ -6,6 +6,7 @@ {% if LANGUAGE_BIDI %}{% endif %} {% block extrastyle %}{% endblock %} {% block extrahead %}{% endblock %} +{% block blockbots %}{% endblock %} {% load i18n %} diff --git a/django/contrib/admin/views/doc.py b/django/contrib/admin/views/doc.py index d1541abee9..b724cc5485 100644 --- a/django/contrib/admin/views/doc.py +++ b/django/contrib/admin/views/doc.py @@ -226,7 +226,7 @@ def model_detail(request, app_label, model_name): return render_to_response('admin_doc/model_detail.html', { 'name': '%s.%s' % (opts.app_label, opts.object_name), - 'summary': "Fields on %s objects" % opts.object_name, + 'summary': _("Fields on %s objects") % opts.object_name, 'description': model.__doc__, 'fields': fields, }, context_instance=RequestContext(request)) diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py index 0f6167fc8f..7c942ca5b8 100644 --- a/django/contrib/admin/views/main.py +++ b/django/contrib/admin/views/main.py @@ -263,7 +263,9 @@ def add_stage(request, app_label, model_name, show_delete=False, form_url='', po post_url_continue += "?_popup=1" return HttpResponseRedirect(post_url_continue % pk_value) if request.POST.has_key("_popup"): - return HttpResponse('' % \ + if type(pk_value) is str: # Quote if string, so JavaScript doesn't think it's a variable. + pk_value = '"%s"' % pk_value.replace('"', '\\"') + return HttpResponse('' % \ (pk_value, str(new_object).replace('"', '\\"'))) elif request.POST.has_key("_addanother"): request.user.message_set.create(message=msg + ' ' + (_("You may add another %s below.") % opts.verbose_name)) @@ -711,9 +713,19 @@ class ChangeList(object): qs = qs.order_by((self.order_type == 'desc' and '-' or '') + lookup_order_field) # Apply keyword searches. + def construct_search(field_name): + if field_name.startswith('^'): + return "%s__istartswith" % field_name[1:] + elif field_name.startswith('='): + return "%s__iexact" % field_name[1:] + elif field_name.startswith('@'): + return "%s__search" % field_name[1:] + else: + return "%s__icontains" % field_name + if self.lookup_opts.admin.search_fields and self.query: for bit in self.query.split(): - or_queries = [models.Q(**{'%s__icontains' % field_name: bit}) for field_name in self.lookup_opts.admin.search_fields] + or_queries = [models.Q(**{construct_search(field_name): bit}) for field_name in self.lookup_opts.admin.search_fields] other_qs = QuerySet(self.model) other_qs = other_qs.filter(reduce(operator.or_, or_queries)) qs = qs & other_qs diff --git a/django/core/cache/backends/memcached.py b/django/core/cache/backends/memcached.py index 86ae096d2c..180f95da73 100644 --- a/django/core/cache/backends/memcached.py +++ b/django/core/cache/backends/memcached.py @@ -20,7 +20,7 @@ class CacheClass(BaseCache): return val def set(self, key, value, timeout=0): - self._cache.set(key, value, timeout) + self._cache.set(key, value, timeout or self.default_timeout) def delete(self, key): self._cache.delete(key) diff --git a/django/middleware/cache.py b/django/middleware/cache.py index 08e77d1375..58800b24da 100644 --- a/django/middleware/cache.py +++ b/django/middleware/cache.py @@ -41,6 +41,9 @@ class CacheMiddleware(object): def process_request(self, request): "Checks whether the page is already cached and returns the cached version if available." + if self.cache_anonymous_only: + assert hasattr(request, 'user'), "The Django cache middleware with CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True requires authentication middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.auth.middleware.AuthenticationMiddleware' before the CacheMiddleware." + if not request.method in ('GET', 'HEAD') or request.GET: request._cache_update_cache = False return None # Don't bother checking the cache. diff --git a/django/middleware/http.py b/django/middleware/http.py index 12d0c0f683..3ebd8ffd1a 100644 --- a/django/middleware/http.py +++ b/django/middleware/http.py @@ -35,3 +35,27 @@ class ConditionalGetMiddleware(object): response.content = '' return response + +class SetRemoteAddrFromForwardedFor(object): + """ + Middleware that sets REMOTE_ADDR based on HTTP_X_FORWARDED_FOR, if the + latter is set. This is useful if you're sitting behind a reverse proxy that + causes each request's REMOTE_ADDR to be set to 127.0.0.1. + + Note that this does NOT validate HTTP_X_FORWARDED_FOR. If you're not behind + a reverse proxy that sets HTTP_X_FORWARDED_FOR automatically, do not use + this middleware. Anybody can spoof the value of HTTP_X_FORWARDED_FOR, and + because this sets REMOTE_ADDR based on HTTP_X_FORWARDED_FOR, that means + anybody can "fake" their IP address. Only use this when you can absolutely + trust the value of HTTP_X_FORWARDED_FOR. + """ + def process_request(self, request): + try: + real_ip = request.META['HTTP_X_FORWARDED_FOR'] + except KeyError: + return None + else: + # HTTP_X_FORWARDED_FOR can be a comma-separated list of IPs. + # Take just the first one. + real_ip = real_ip.split(",")[0] + request.META['REMOTE_ADDR'] = real_ip diff --git a/docs/cache.txt b/docs/cache.txt index 62fec289b9..1795345ed9 100644 --- a/docs/cache.txt +++ b/docs/cache.txt @@ -233,7 +233,10 @@ The cache middleware caches every page that doesn't have GET or POST parameters. Optionally, if the ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting is ``True``, only anonymous requests (i.e., not those made by a logged-in user) will be cached. This is a simple and effective way of disabling caching for any -user-specific pages (include Django's admin interface). +user-specific pages (include Django's admin interface). Note that if you use +``CACHE_MIDDLEWARE_ANONYMOUS_ONLY``, you should make sure you've activated +``AuthenticationMiddleware`` and that ``AuthenticationMiddleware`` appears +before ``CacheMiddleware`` in your ``MIDDLEWARE_CLASSES``. Additionally, ``CacheMiddleware`` automatically sets a few headers in each ``HttpResponse``: diff --git a/docs/faq.txt b/docs/faq.txt index 3cd7090583..42d9ddea55 100644 --- a/docs/faq.txt +++ b/docs/faq.txt @@ -98,11 +98,10 @@ Lawrence, Kansas, USA. On IRC, Simon goes by ``SimonW``. `Wilson Miner`_ - Wilson's design-fu makes us all look like rock stars. When not sneaking - into apartment complex swimming pools, he's the Commercial Development - Director for World Online, which means he makes the money that pays all our - paychecks. He lives in Lawrence, Kansas. - + Wilson's design-fu makes us all look like rock stars. By day, he's an + interactive designer for `Apple`. Don't ask him what he's working on, or + he'll have to kill you. He lives in San Francisco. + On IRC, Wilson goes by ``wilsonian``. .. _`World Online`: http://code.djangoproject.com/wiki/WorldOnline @@ -113,6 +112,7 @@ Lawrence, Kansas, USA. .. _`simon.incutio.com`: http://simon.incutio.com/ .. _`Jacob Kaplan-Moss`: http://www.jacobian.org/ .. _`Wilson Miner`: http://www.wilsonminer.com/ +.. _`Apple`: http://www.apple.com/ Which sites use Django? ----------------------- diff --git a/docs/i18n.txt b/docs/i18n.txt index e12900c2f9..4d0d92b082 100644 --- a/docs/i18n.txt +++ b/docs/i18n.txt @@ -48,9 +48,10 @@ bit of i18n-related overhead in certain places of the framework. If you don't use internationalization, you should take the two seconds to set ``USE_I18N = False`` in your settings file. If ``USE_I18N`` is set to ``False``, then Django will make some optimizations so as not to load the -internationalization machinery. +internationalization machinery. See the `documentation for USE_I18N`_. -See the `documentation for USE_I18N`_. +You'll probably also want to remove ``'django.core.context_processors.i18n'`` +from your ``TEMPLATE_CONTEXT_PROCESSORS`` setting. .. _documentation for USE_I18N: http://www.djangoproject.com/documentation/settings/#use-i18n diff --git a/docs/middleware.txt b/docs/middleware.txt index bad00fd890..efc4d89569 100644 --- a/docs/middleware.txt +++ b/docs/middleware.txt @@ -63,7 +63,7 @@ Adds a few conveniences for perfectionists: last component in the path contains a period. So ``foo.com/bar`` is redirected to ``foo.com/bar/``, but ``foo.com/bar/file.txt`` is passed through unchanged. - + If ``PREPEND_WWW`` is ``True``, URLs that lack a leading "www." will be redirected to the same URL with a leading "www." @@ -101,6 +101,22 @@ Handles conditional GET operations. If the response has a ``ETag`` or Also removes the content from any response to a HEAD request and sets the ``Date`` and ``Content-Length`` response-headers. +django.middleware.http.SetRemoteAddrFromForwardedFor +---------------------------------------------------- + +**New in Django development version** + +Sets ``request['REMOTE_ADDR']`` based on ``request.['HTTP_X_FORWARDED_FOR']``, +if the latter is set. This is useful if you're sitting behind a reverse proxy +that causes each request's ``REMOTE_ADDR`` to be set to ``127.0.0.1``. + +**Important note:** This does NOT validate ``HTTP_X_FORWARDED_FOR``. If you're +not behind a reverse proxy that sets ``HTTP_X_FORWARDED_FOR`` automatically, do +not use this middleware. Anybody can spoof the value of +``HTTP_X_FORWARDED_FOR``, and because this sets ``REMOTE_ADDR`` based on +``HTTP_X_FORWARDED_FOR``, that means anybody can "fake" their IP address. Only +use this when you can absolutely trust the value of ``HTTP_X_FORWARDED_FOR``. + django.contrib.sessions.middleware.SessionMiddleware ---------------------------------------------------- diff --git a/docs/model-api.txt b/docs/model-api.txt index 502ceaf7ff..0a3abe4e26 100644 --- a/docs/model-api.txt +++ b/docs/model-api.txt @@ -217,7 +217,7 @@ steps: subdirectory of ``MEDIA_ROOT`` it should upload files. 3. All that will be stored in your database is a path to the file - (relative to ``MEDIA_ROOT``). You'll must likely want to use the + (relative to ``MEDIA_ROOT``). You'll most likely want to use the convenience ``get__url`` function provided by Django. For example, if your ``ImageField`` is called ``mug_shot``, you can get the absolute URL to your image in a template with ``{{ @@ -230,6 +230,14 @@ For example, say your ``MEDIA_ROOT`` is set to ``'/home/media'``, and upload a file on Jan. 15, 2007, it will be saved in the directory ``/home/media/photos/2007/01/15``. +Note that whenever you deal with uploaded files, you should pay close attention +to where you're uploading them and what type of files they are, to avoid +security holes. *Validate all uploaded files* so that you're sure the files are +what you think they are. For example, if you blindly let somebody upload files, +without validation, to a directory that's within your Web server's document +root, then somebody could upload a CGI or PHP script and execute that script by +visiting its URL on your site. Don't allow that. + .. _`strftime formatting`: http://docs.python.org/lib/module-time.html#l2h-1941 ``FilePathField`` @@ -678,8 +686,9 @@ you can use the name of the model, rather than the model object itself:: class Manufacturer(models.Model): # ... -Note, however, that support for strings around model names in ``ForeignKey`` is -quite new, and it can be buggy in some cases. +Note, however, that you can only use strings to refer to models in the same +models.py file -- you cannot use a string to reference a model in a different +application, or to reference a model that has been imported from elsewhere. Behind the scenes, Django appends ``"_id"`` to the field name to create its database column name. In the above example, the database table for the ``Car`` @@ -801,7 +810,10 @@ here's how you'd represent that:: As with ``ForeignKey``, a relationship to self can be defined by using the string ``'self'`` instead of the model name, and you can refer to as-yet -undefined models by using a string containing the model name. +undefined models by using a string containing the model name. However, you +can only use strings to refer to models in the same models.py file -- you +cannot use a string to reference a model in a different application, or to +reference a model that has been imported from elsewhere. It's suggested, but not required, that the name of a ``ManyToManyField`` (``toppings`` in the example above) be a plural describing the set of related @@ -1374,6 +1386,41 @@ user searches for ``john lennon``, Django will do the equivalent of this SQL WHERE (first_name ILIKE '%john%' OR last_name ILIKE '%john%') AND (first_name ILIKE '%lennon%' OR last_name ILIKE '%lennon%') +**New in Django development version:** For faster and/or more restrictive +searches, prefix the field name with an operator: + +``^`` + Matches the beginning of the field. For example, if ``search_fields`` is + set to ``['^first_name', '^last_name']`` and a user searches for + ``john lennon``, Django will do the equivalent of this SQL ``WHERE`` + clause:: + + WHERE (first_name ILIKE 'john%' OR last_name ILIKE 'john%') + AND (first_name ILIKE 'lennon%' OR last_name ILIKE 'lennon%') + + This query is more efficient than the normal ``'%john%'`` query, because + the database only needs to check the beginning of a column's data, rather + than seeking through the entire column's data. Plus, if the column has an + index on it, some databases may be able to use the index for this query, + even though it's a ``LIKE`` query. + +``=`` + Matches exactly, case-insensitive. For example, if + ``search_fields`` is set to ``['=first_name', '=last_name']`` and + a user searches for ``john lennon``, Django will do the equivalent + of this SQL ``WHERE`` clause:: + + WHERE (first_name ILIKE 'john' OR last_name ILIKE 'john') + AND (first_name ILIKE 'lennon' OR last_name ILIKE 'lennon') + + Note that the query input is split by spaces, so, following this example, + it's not currently not possible to search for all records in which + ``first_name`` is exactly ``'john winston'`` (containing a space). + +``@`` + Performs a full-text match. This is like the default search method but uses + an index. Currently this is only available for MySQL. + Managers ======== diff --git a/docs/templates_python.txt b/docs/templates_python.txt index 95ccfb3eab..62069ffd6a 100644 --- a/docs/templates_python.txt +++ b/docs/templates_python.txt @@ -259,9 +259,10 @@ an `HttpRequest object`_ as its first argument. For example:: The second difference is that it automatically populates the context with a few variables, according to your `TEMPLATE_CONTEXT_PROCESSORS setting`_. -The ``TEMPLATE_CONTEXT_PROCESSORS`` setting is a tuple of callables that take a -request object as their argument and return a dictionary of items to be merged -into the context. By default, ``TEMPLATE_CONTEXT_PROCESSORS`` is set to:: +The ``TEMPLATE_CONTEXT_PROCESSORS`` setting is a tuple of callables -- called +**context processors** -- that take a request object as their argument and +return a dictionary of items to be merged into the context. By default, +``TEMPLATE_CONTEXT_PROCESSORS`` is set to:: ("django.core.context_processors.auth", "django.core.context_processors.debug",