Django

Code

Changeset 4156

Show
Ignore:
Timestamp:
12/04/06 14:29:44 (2 years ago)
Author:
jpellerin
Message:

[multi-db] Merged trunk to [4000]. Some tests still failing.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/multiple-db-support/AUTHORS

    r4155 r4156  
    9292    Robert Rock Howard <http://djangomojo.com/> 
    9393    Jason Huggins <http://www.jrandolph.com/blog/> 
     94        Baurzhan Ismagulov <ibr@radix50.net> 
    9495    jcrasta@gmail.com 
    9596    Michael Josephson <http://www.sdjournal.com/> 
  • django/branches/multiple-db-support/django/conf/__init__.py

    r3427 r4156  
    7878 
    7979        try: 
    80             mod = __import__(self.SETTINGS_MODULE, '', '', ['']) 
     80            mod = __import__(self.SETTINGS_MODULE, {}, {}, ['']) 
    8181        except ImportError, e: 
    8282            raise EnvironmentError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e) 
     
    9898        for app in self.INSTALLED_APPS: 
    9999            if app.endswith('.*'): 
    100                 appdir = os.path.dirname(__import__(app[:-2], '', '', ['']).__file__) 
     100                appdir = os.path.dirname(__import__(app[:-2], {}, {}, ['']).__file__) 
    101101                for d in os.listdir(appdir): 
    102102                    if d.isalpha() and os.path.isdir(os.path.join(appdir, d)): 
  • django/branches/multiple-db-support/django/conf/locale/pt_BR/LC_MESSAGES/djangojs.po

    r2139 r4156  
    1 # SOME DESCRIPTIVE TITLE
    2 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 
     1# Português do Brasil translation of django
     2# Copyright (C) 2006 THE PACKAGE'S COPYRIGHT HOLDER 
    33# This file is distributed under the same license as the PACKAGE package. 
    4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR
     4# Carlos Eduardo de Paula <carlosedp@gmail.com>, 2006
    55# 
    66msgid "" 
     
    99"Report-Msgid-Bugs-To: \n" 
    1010"POT-Creation-Date: 2005-12-09 11:51+0100\n" 
    11 "PO-Revision-Date: 2006-01-23 19:54-0200\n" 
    12 "Last-Translator: João Marcus Christ <joaoma@gmail.com>\n" 
     11"PO-Revision-Date: 2006-11-01 17:45-0300\n" 
     12"Last-Translator: Carlos Eduardo de Paula <carlosedp@gmail.com>\n" 
    1313"Language-Team: Português do Brasil <pt-br@li.org>\n" 
    1414"MIME-Version: 1.0\n" 
     
    5252"December" 
    5353msgstr "" 
    54 "Janeiro Fevereiro Março Abrio Maio Junho Julho Agosto Setembro Outubro Novembro " 
     54"Janeiro Fevereiro Março Abril Maio Junho Julho Agosto Setembro Outubro Novembro " 
    5555"Dezembro" 
    5656#: contrib/admin/media/js/dateparse.js:27 
  • django/branches/multiple-db-support/django/conf/locale/pt_BR/LC_MESSAGES/django.po

    r2917 r4156  
    33# This file is distributed under the same license as the PACKAGE package. 
    44# João Marcus Christ <joaoma@gmail.com>, 2006. 
     5# Carlos Eduardo de Paula <carlosedp@gmail.com>, 2006. 
    56# 
    67msgid "" 
     
    910"Report-Msgid-Bugs-To: \n" 
    1011"POT-Creation-Date: 2006-05-16 10:11+0200\n" 
    11 "PO-Revision-Date: 2006-01-23 19:54-0200\n" 
    12 "Last-Translator: João Marcus Christ <joaoma@gmail.com>\n" 
     12"PO-Revision-Date: 2006-11-01 17:45-0300\n" 
     13"Last-Translator: Carlos Eduardo de Paula <carlosedp@gmail.com>\n" 
    1314"Language-Team: Português do Brasil <pt-br@li.org>\n" 
    1415"MIME-Version: 1.0\n" 
     
    8788msgstr "" 
    8889"Selecione esta opção se o comentário é inapropriado. Uma mensagem \"Este " 
    89 "comentário foi removido\" será mostrada no lugar." 
     90"comentário foi removido\" a mensagem será mostrada no lugar." 
    9091 
    9192#: contrib/comments/models.py:91 
    9293#, fuzzy 
    9394msgid "comments" 
    94 msgstr "comentário
     95msgstr "comentários
    9596 
    9697#: contrib/comments/models.py:131 contrib/comments/models.py:207 
     
    151152#, fuzzy 
    152153msgid "karma scores" 
    153 msgstr "Pontuação de Karma" 
     154msgstr "Pontuações de Karma" 
    154155 
    155156#: contrib/comments/models.py:242 
     
    171172#: contrib/comments/models.py:265 
    172173msgid "flag date" 
    173 msgstr "marca de data" 
     174msgstr "flag de data" 
    174175 
    175176#: contrib/comments/models.py:268 
    176177#, fuzzy 
    177178msgid "user flag" 
    178 msgstr "Flag de usuário" 
     179msgstr "flag de usuário" 
    179180 
    180181#: contrib/comments/models.py:269 
    181182#, fuzzy 
    182183msgid "user flags" 
    183 msgstr "Flags de usuário" 
     184msgstr "flags de usuário" 
    184185 
    185186#: contrib/comments/models.py:273 
     
    190191#: contrib/comments/models.py:278 
    191192msgid "deletion date" 
    192 msgstr "data de apagamento" 
     193msgstr "data de exclusão" 
    193194 
    194195#: contrib/comments/models.py:280 
    195196#, fuzzy 
    196197msgid "moderator deletion" 
    197 msgstr "Apagamento feito por moderador" 
     198msgstr "Exclusão feita pelo moderador" 
    198199 
    199200#: contrib/comments/models.py:281 
    200201#, fuzzy 
    201202msgid "moderator deletions" 
    202 msgstr "Apagamentos feitos por moderador" 
     203msgstr "Exclusões feitas pelo moderador" 
    203204 
    204205#: contrib/comments/models.py:285 
    205206#, python-format 
    206207msgid "Moderator deletion by %r" 
    207 msgstr "Apagamento feito pelo moderador %r" 
     208msgstr "Exclusao feita pelo moderador %r" 
    208209 
    209210#: contrib/comments/views/karma.py:19 
     
    238239"%(text)s" 
    239240msgstr[0] "" 
    240 "Este comentário foi feito por um usuário esboço:\n
    241 "\n" 
     241"Este comentário foi feito por um usuário que postou menos de %(count)s
     242"comentário:\n" 
    242243"%(text)s" 
    243244msgstr[1] "" 
    244 "Este comentário foi feito por um usuário esboço:\n
    245 "\n" 
     245"Este comentário foi feito por um usuário que postou menos de %(count)s
     246"comentários:\n" 
    246247"%(text)s" 
    247248 
     
    253254"%(text)s" 
    254255msgstr "" 
    255 "Este comentário foi feito por um usuário esboço:\n" 
     256"Este comentário foi feito por um usuário incompleto:\n" 
    256257"\n" 
    257258"%(text)s" 
     
    300301#, fuzzy 
    301302msgid "Forgotten your password?" 
    302 msgstr "Alterar minha senha
     303msgstr "Esqueceu sua senha?
    303304 
    304305#: contrib/comments/templates/comments/form.html:8 
     
    326327#, fuzzy 
    327328msgid "Ratings" 
    328 msgstr "avaliação #1
     329msgstr "Avaliações
    329330 
    330331#: contrib/comments/templates/comments/form.html:12 
    331332#: contrib/comments/templates/comments/form.html:23 
    332333msgid "Required" 
    333 msgstr "
     334msgstr "Requerido
    334335 
    335336#: contrib/comments/templates/comments/form.html:12 
    336337#: contrib/comments/templates/comments/form.html:23 
    337338msgid "Optional" 
    338 msgstr "
     339msgstr "Opcional
    339340 
    340341#: contrib/comments/templates/comments/form.html:23 
    341342msgid "Post a photo" 
    342 msgstr "
     343msgstr "Postar uma foto
    343344 
    344345#: contrib/comments/templates/comments/form.html:27 
     
    352353#, fuzzy 
    353354msgid "Preview comment" 
    354 msgstr "Comentário livre
     355msgstr "Pré visualizar comentário
    355356 
    356357#: contrib/comments/templates/comments/freeform.html:4 
    357358#, fuzzy 
    358359msgid "Your name:" 
    359 msgstr "usuário
     360msgstr "Seu nome:
    360361 
    361362#: contrib/admin/filterspecs.py:40 
     
    444445msgstr "" 
    445446"Por favor entre usuário e senha corretos. Note que ambos os " 
    446 "camposdiferenciam maiúsculas e minúsculas." 
     447"campos diferenciam maiúsculas e minúsculas." 
    447448 
    448449#: contrib/admin/views/decorators.py:23 
     
    469470#: contrib/admin/views/decorators.py:82 
    470471msgid "Usernames cannot contain the '@' character." 
    471 msgstr "Nomes de usuário não podem conter o caracter '@'." 
     472msgstr "Nomes de usuário não podem conter o caractere '@'." 
    472473 
    473474#: contrib/admin/views/decorators.py:84 
     
    554555#, python-format 
    555556msgid "The %(name)s \"%(obj)s\" was deleted successfully." 
    556 msgstr "O(A) %(name)s \"%(obj)s\" foi adicionado com sucesso." 
     557msgstr "O(A) %(name)s \"%(obj)s\" foi excluído com sucesso." 
    557558 
    558559#: contrib/admin/views/main.py:511 
     
    747748msgstr "" 
    748749"Houve um erro. Este foi reportado aos administradores do site através d e-" 
    749 "mail e deve ser consertado em breve. Obrigado pela compreensão." 
     750"mail e deve ser corrigido em breve. Obrigado pela compreensão." 
    750751 
    751752#: contrib/admin/templates/admin/404.html:4 
     
    761762#, python-format 
    762763msgid "Models available in the %(name)s application." 
    763 msgstr "
     764msgstr "Modelos disponíveis na aplicação %(name)s
    764765 
    765766#: contrib/admin/templates/admin/index.html:28 
     
    795796#: contrib/admin/templates/admin/login.html:22 
    796797msgid "Have you <a href=\"/password_reset/\">forgotten your password</a>?" 
    797 msgstr "Você <a href=\"/password_reset/\"esqueceu a senha</a>?" 
     798msgstr "Você <a href=\"/password_reset/\">esqueceu sua senha</a>?" 
    798799 
    799800#: contrib/admin/templates/admin/base.html:23 
     
    837838#: contrib/admin/templates/admin/search_form.html:8 
    838839msgid "Go" 
    839 msgstr "
     840msgstr "Ir
    840841 
    841842#: contrib/admin/templates/admin/change_form.html:21 
     
    848849msgid_plural "Please correct the errors below." 
    849850msgstr[0] "Por favor, corrija o erro abaixo." 
    850 msgstr[1] "Por favor, corrija o erro abaixo." 
     851msgstr[1] "Por favor, corrija os erros abaixo." 
    851852 
    852853#: contrib/admin/templates/admin/change_form.html:48 
     
    931932"should be receiving it shortly." 
    932933msgstr "" 
    933 "Nós enviamos uma nova senha para o e-mail que você informou. Você deve estar
    934 "recebendo uma mensagem em breve." 
     934"Nós enviamos uma nova senha para o e-mail que você informou. Você deve
     935"receber uma mensagem em breve." 
    935936 
    936937#: contrib/admin/templates/registration/password_change_form.html:12 
     
    974975#: contrib/admin/templates/registration/password_reset_email.html:7 
    975976msgid "Feel free to change this password by going to this page:" 
    976 msgstr "Sinta-se livre para alterar esta senha visitando esta página:" 
     977msgstr "Sinta-se a vontade para alterar esta senha visitando esta página:" 
    977978 
    978979#: contrib/admin/templates/registration/password_reset_email.html:11 
     
    10411042#: contrib/admin/templates/admin_doc/bookmarklets.html:25 
    10421043msgid "Edit this object (current window)" 
    1043 msgstr "Edita este objeto (janela atual)" 
     1044msgstr "Editar este objeto (janela atual)" 
    10441045 
    10451046#: contrib/admin/templates/admin_doc/bookmarklets.html:26 
    10461047msgid "Jumps to the admin page for pages that represent a single object." 
    10471048msgstr "" 
    1048 "Vai para a página de administração para páginas que representam um objeto " 
     1049"Vai para a página de administração que representam um objeto " 
    10491050"único." 
    10501051 
    10511052#: contrib/admin/templates/admin_doc/bookmarklets.html:28 
    10521053msgid "Edit this object (new window)" 
    1053 msgstr "Edita este objeto (nova janela)" 
     1054msgstr "Editar este objeto (nova janela)" 
    10541055 
    10551056#: contrib/admin/templates/admin_doc/bookmarklets.html:29 
     
    11361137#: contrib/flatpages/models.py:14 
    11371138msgid "registration required" 
    1138 msgstr "é obrigatório registrar
     1139msgstr "registro obrigatório
    11391140 
    11401141#: contrib/flatpages/models.py:14 
     
    11611162#, fuzzy 
    11621163msgid "permission" 
    1163 msgstr "Permissão" 
     1164msgstr "permissão" 
    11641165 
    11651166#: contrib/auth/models.py:18 contrib/auth/models.py:27 
    11661167#, fuzzy 
    11671168msgid "permissions" 
    1168 msgstr "Permissões" 
     1169msgstr "permissões" 
    11691170 
    11701171#: contrib/auth/models.py:29 
    11711172#, fuzzy 
    11721173msgid "group" 
    1173 msgstr "Grupo" 
     1174msgstr "grupo" 
    11741175 
    11751176#: contrib/auth/models.py:30 contrib/auth/models.py:65 
    11761177#, fuzzy 
    11771178msgid "groups" 
    1178 msgstr "Grupos" 
     1179msgstr "grupos" 
    11791180 
    11801181#: contrib/auth/models.py:55 
     
    12371238#, fuzzy 
    12381239msgid "user permissions" 
    1239 msgstr "Permissões
     1240msgstr "permissões do usuário
    12401241 
    12411242#: contrib/auth/models.py:70 
    12421243#, fuzzy 
    12431244msgid "user" 
    1244 msgstr "Usuário" 
     1245msgstr "usuário" 
    12451246 
    12461247#: contrib/auth/models.py:71 
    12471248#, fuzzy 
    12481249msgid "users" 
    1249 msgstr "Usuários" 
     1250msgstr "usuários" 
    12501251 
    12511252#: contrib/auth/models.py:76 
     
    12681269#, fuzzy 
    12691270msgid "message" 
    1270 msgstr "Mensagem" 
     1271msgstr "mensagem" 
    12711272 
    12721273#: contrib/auth/forms.py:30 
     
    12761277msgstr "" 
    12771278"Seu navegador Web não parece estar com os cookies habilitados. Cookies são " 
    1278 "requeridos para acesssar." 
     1279"requeridos para acessar." 
    12791280 
    12801281#: contrib/contenttypes/models.py:25 
     
    14181419#, fuzzy 
    14191420msgid "jan" 
    1420 msgstr "e
     1421msgstr "jan
    14211422 
    14221423#: utils/dates.py:19 
    14231424msgid "feb" 
    1424 msgstr "
     1425msgstr "fev
    14251426 
    14261427#: utils/dates.py:19 
    14271428msgid "mar" 
    1428 msgstr "
     1429msgstr "mar
    14291430 
    14301431#: utils/dates.py:19 
    14311432msgid "apr" 
    1432 msgstr "
     1433msgstr "abr
    14331434 
    14341435#: utils/dates.py:19 
    14351436#, fuzzy 
    14361437msgid "may" 
    1437 msgstr "dia
     1438msgstr "mai
    14381439 
    14391440#: utils/dates.py:19 
    14401441msgid "jun" 
    1441 msgstr "
     1442msgstr "jun
    14421443 
    14431444#: utils/dates.py:20 
    14441445msgid "jul" 
    1445 msgstr "
     1446msgstr "jul
    14461447 
    14471448#: utils/dates.py:20 
    14481449msgid "aug" 
    1449 msgstr "
     1450msgstr "ago
    14501451 
    14511452#: utils/dates.py:20 
    14521453msgid "sep" 
    1453 msgstr "
     1454msgstr "set
    14541455 
    14551456#: utils/dates.py:20 
    14561457msgid "oct" 
    1457 msgstr "
     1458msgstr "out
    14581459 
    14591460#: utils/dates.py:20 
    14601461msgid "nov" 
    1461 msgstr "
     1462msgstr "nov
    14621463 
    14631464#: utils/dates.py:20 
    14641465msgid "dec" 
    1465 msgstr "
     1466msgstr "dez
    14661467 
    14671468#: utils/dates.py:27 
     
    14981499msgid_plural "years" 
    14991500msgstr[0] "ano" 
    1500 msgstr[1] "ano
     1501msgstr[1] "anos
    15011502 
    15021503#: utils/timesince.py:13 
     
    15051506msgid_plural "months" 
    15061507msgstr[0] "mês" 
    1507 msgstr[1] "mês" 
     1508msgstr[1] "meses" 
    15081509 
    15091510#: utils/timesince.py:14 
    15101511msgid "week" 
    15111512msgid_plural "weeks" 
    1512 msgstr[0] "
    1513 msgstr[1] "
     1513msgstr[0] "semana
     1514msgstr[1] "semanas
    15141515 
    15151516#: utils/timesince.py:15 
     
    15181519msgid_plural "days" 
    15191520msgstr[0] "dia" 
    1520 msgstr[1] "dia
     1521msgstr[1] "dias
    15211522 
    15221523#: utils/timesince.py:16 
     
    15251526msgid_plural "hours" 
    15261527msgstr[0] "hora" 
    1527 msgstr[1] "hora
     1528msgstr[1] "horas
    15281529 
    15291530#: utils/timesince.py:17 
     
    15321533msgid_plural "minutes" 
    15331534msgstr[0] "minuto" 
    1534 msgstr[1] "minuto
     1535msgstr[1] "minutos
    15351536 
    15361537#: conf/global_settings.py:37 
    15371538msgid "Bengali" 
    1538 msgstr "
     1539msgstr "Bengalês
    15391540 
    15401541#: conf/global_settings.py:38 
     
    15491550#, fuzzy 
    15501551msgid "Danish" 
    1551 msgstr "Espanhol
     1552msgstr "Dinamarquês
    15521553 
    15531554#: conf/global_settings.py:41 
     
    15571558#: conf/global_settings.py:42 
    15581559msgid "Greek" 
    1559 msgstr "
     1560msgstr "Grego
    15601561 
    15611562#: conf/global_settings.py:43 
     
    15771578#: conf/global_settings.py:47 
    15781579msgid "Hungarian" 
    1579 msgstr "
     1580msgstr "Húngaro
    15801581 
    15811582#: conf/global_settings.py:48 
    15821583msgid "Hebrew" 
    1583 msgstr "
     1584msgstr "Hebraico
    15841585 
    15851586#: conf/global_settings.py:49 
     
    16051606#: conf/global_settings.py:54 
    16061607msgid "Brazilian" 
    1607 msgstr "Brazileiro" 
     1608msgstr "Brasileiro" 
    16081609 
    16091610#: conf/global_settings.py:55 
     
    16221623#, fuzzy 
    16231624msgid "Slovenian" 
    1624 msgstr "Eslovaco" 
     1625msgstr "Esloveno" 
    16251626 
    16261627#: conf/global_settings.py:59 
     
    16351636#, fuzzy 
    16361637msgid "Ukrainian" 
    1637 msgstr "Brazileiro" 
     1638msgstr "Ucraniano" 
    16381639 
    16391640#: conf/global_settings.py:62 
     
    16901691#: core/validators.py:116 
    16911692msgid "Enter a whole number." 
    1692 msgstr "Informe um número inteiro." 
     1693msgstr "Informe um número completo." 
    16931694 
    16941695#: core/validators.py:120 
     
    17731774msgid_plural "Watch your mouth! The words %s are not allowed here." 
    17741775msgstr[0] "Lave sua boca! A palavra %s não é permitida aqui." 
    1775 msgstr[1] "Lave sua boca! A palavra %s não é permitida aqui." 
     1776msgstr[1] "Lave sua boca! As palavras %s não são permitidas aqui." 
    17761777 
    17771778#: core/validators.py:236 
     
    18091810#: core/validators.py:347 
    18101811msgid "Please enter a valid decimal number." 
    1811 msgstr "Informe um número decimal." 
     1812msgstr "Informe um número decimal válido." 
    18121813 
    18131814#: core/validators.py:349 
     
    18161817msgid_plural "" 
    18171818"Please enter a valid decimal number with at most %s total digits." 
    1818 msgstr[0] "Por favor entre com um número decimal com no máximo %s digitos." 
     1819msgstr[0] "Por favor entre com um número decimal com no máximo %s digito." 
    18191820msgstr[1] "Por favor entre com um número decimal com no máximo %s digitos." 
    18201821 
     
    18251826"Please enter a valid decimal number with at most %s decimal places." 
    18261827msgstr[0] "Informe um número decimal com no máximo %s casa decimal." 
    1827 msgstr[1] "Informe um número decimal com no máximo %s casa decimal." 
     1828msgstr[1] "Informe um número decimal com no máximo %s casas decimais." 
    18281829 
    18291830#: core/validators.py:362 
     
    19311932#, fuzzy 
    19321933msgid "This value must be an integer." 
    1933 msgstr "Este valor deve ser uma potência de %s." 
     1934msgstr "Este valor deve ser um inteiro." 
    19341935 
    19351936#: db/models/fields/__init__.py:369 
    19361937#, fuzzy 
    19371938msgid "This value must be either True or False." 
    1938 msgstr "Este valor deve ser uma potência de %s." 
     1939msgstr "Este valor deve ser Verdadeiro ou Falso." 
    19391940 
    19401941#: db/models/fields/__init__.py:385 
    19411942#, fuzzy 
    19421943msgid "This field cannot be null." 
    1943 msgstr "Este campo é inválido." 
     1944msgstr "Este campo não pode ser nulo." 
    19441945 
    19451946#: db/models/fields/__init__.py:562 
     
    19551956#, fuzzy 
    19561957msgid "Separate multiple IDs with commas." 
    1957 msgstr " Separe IDs múltiplos com vírgulas." 
     1958msgstr "Separe IDs múltiplos com vírgulas." 
    19581959 
    19591960#: db/models/fields/related.py:581 
     
    19621963"Hold down \"Control\", or \"Command\" on a Mac, to select more than one." 
    19631964msgstr "" 
    1964 " Mantenha pressionado \"Control\", ou \"Command\" num Mac para selecionar " 
     1965" Mantenha pressionado \"Control\", ou \"Command\" no Mac para selecionar " 
    19651966"mais de uma opção." 
    19661967 
     
    19731974"Por favor, entre IDs válidos para %(self)s. O valor %(value)r é inválido." 
    19741975msgstr[1] "" 
    1975 "Por favor, entre IDs válidos para %(self)s. O valor %(value)r é inválido." 
     1976"Por favor, entre IDs válidos para %(self)s. Os valores %(value)r são inválidos." 
    19761977 
    19771978#: forms/__init__.py:380 
     
    19791980msgid "Ensure your text is less than %s character." 
    19801981msgid_plural "Ensure your text is less than %s characters." 
    1981 msgstr[0] "Certifique-se de que seu texto tenha menos que %s caracteres." 
     1982msgstr[0] "Certifique-se de que seu texto tenha menos que %s caractere." 
    19821983msgstr[1] "Certifique-se de que seu texto tenha menos que %s caracteres." 
    19831984 
    19841985#: forms/__init__.py:385 
    19851986msgid "Line breaks are not allowed here." 
    1986 msgstr "Não são permitidas múltiplas linhas aqui." 
     1987msgstr "Não são permitidas quebras de linha aqui." 
    19871988 
    19881989#: forms/__init__.py:480 forms/__init__.py:551 forms/__init__.py:589 
     
    20382039#~ "%(text)s" 
    20392040#~ msgstr "" 
    2040 #~ "Este comentário foi envidao por um usuário que enviou menos de %(count)s " 
     2041#~ "Este comentário foi enviado por um usuário que enviou menos de %(count)s " 
    20412042#~ "comentário:\n" 
    20422043#~ "\n" 
     
    20482049#, fuzzy 
    20492050#~ msgid "count" 
    2050 #~ msgstr "conteúdo
     2051#~ msgstr "contagem
  • django/branches/multiple-db-support/django/contrib/admin/views/doc.py

    r3712 r4156  
    9999 
    100100    if settings.ADMIN_FOR: 
    101         settings_modules = [__import__(m, '', '', ['']) for m in settings.ADMIN_FOR] 
     101        settings_modules = [__import__(m, {}, {}, ['']) for m in settings.ADMIN_FOR] 
    102102    else: 
    103103        settings_modules = [settings] 
     
    105105    views = [] 
    106106    for settings_mod in settings_modules: 
    107         urlconf = __import__(settings_mod.ROOT_URLCONF, '', '', ['']) 
     107        urlconf = __import__(settings_mod.ROOT_URLCONF, {}, {}, ['']) 
    108108        view_functions = extract_views_from_urlpatterns(urlconf.urlpatterns) 
    109109        if Site._meta.installed: 
     
    128128    mod, func = urlresolvers.get_mod_func(view) 
    129129    try: 
    130         view_func = getattr(__import__(mod, '', '', ['']), func) 
     130        view_func = getattr(__import__(mod, {}, {}, ['']), func) 
    131131    except (ImportError, AttributeError): 
    132132        raise Http404 
     
    236236    templates = [] 
    237237    for site_settings_module in settings.ADMIN_FOR: 
    238         settings_mod = __import__(site_settings_module, '', '', ['']) 
     238        settings_mod = __import__(site_settings_module, {}, {}, ['']) 
    239239        if Site._meta.installed: 
    240240            site_obj = Site.objects.get(pk=settings_mod.SITE_ID) 
  • django/branches/multiple-db-support/django/contrib/admin/views/template.py

    r3427 r4156  
    1515    settings_modules = {} 
    1616    for mod in settings.ADMIN_FOR: 
    17         settings_module = __import__(mod, '', '', ['']) 
     17        settings_module = __import__(mod, {}, {}, ['']) 
    1818        settings_modules[settings_module.SITE_ID] = settings_module 
    1919    manipulator = TemplateValidator(settings_modules) 
  • django/branches/multiple-db-support/django/contrib/auth/__init__.py

    r3427 r4156  
    1010    module, attr = path[:i], path[i+1:] 
    1111    try: 
    12         mod = __import__(module, '', '', [attr]) 
     12        mod = __import__(module, {}, {}, [attr]) 
    1313    except ImportError, e: 
    1414        raise ImproperlyConfigured, 'Error importing authentication backend %s: "%s"' % (module, e) 
  • django/branches/multiple-db-support/django/core/cache/__init__.py

    r2378 r4156  
    4949        host = host[:-1] 
    5050 
    51     cache_class = getattr(__import__('django.core.cache.backends.%s' % BACKENDS[scheme], '', '', ['']), 'CacheClass') 
     51    cache_class = getattr(__import__('django.core.cache.backends.%s' % BACKENDS[scheme], {}, {}, ['']), 'CacheClass') 
    5252    return cache_class(host, params) 
    5353 
  • django/branches/multiple-db-support/django/core/handlers/base.py

    r4152 r4156  
    2727            mw_module, mw_classname = middleware_path[:dot], middleware_path[dot+1:] 
    2828            try: 
    29                 mod = __import__(mw_module, '', '', ['']) 
     29                mod = __import__(mw_module, {}, {}, ['']) 
    3030            except ImportError, e: 
    3131                raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e) 
  • django/branches/multiple-db-support/django/core/management.py

    r4155 r4156  
    290290        # dispatcher events. 
    291291        try: 
    292             __import__(app_name + '.management', '', '', ['']) 
     292            __import__(app_name + '.management', {}, {}, ['']) 
    293293        except ImportError: 
    294294            pass 
     
    10791079    else: 
    10801080        test_module_name = '.' 
    1081     test_module = __import__(test_module_name, [],[],test_path[-1]) 
     1081    test_module = __import__(test_module_name, {}, {}, test_path[-1]) 
    10821082    test_runner = getattr(test_module, test_path[-1]) 
    10831083 
     
    12681268    project_name = os.path.basename(project_directory) 
    12691269    sys.path.append(os.path.join(project_directory, '..')) 
    1270     project_module = __import__(project_name, '', '', ['']) 
     1270    project_module = __import__(project_name, {}, {}, ['']) 
    12711271    sys.path.pop() 
    12721272 
  • django/branches/multiple-db-support/django/core/serializers/__init__.py

    r3258 r4156  
    3030def register_serializer(format, serializer_module): 
    3131    """Register a new serializer by passing in a module name.""" 
    32     module = __import__(serializer_module, '', '', ['']) 
     32    module = __import__(serializer_module, {}, {}, ['']) 
    3333    _serializers[format] = module 
    3434     
  • django/branches/multiple-db-support/django/core/servers/fastcgi.py

    r4139 r4156  
    3232  socket=FILE          UNIX socket to listen on. 
    3333  method=IMPL          prefork or threaded (default prefork) 
     34  maxrequests=NUMBER   number of requests a child handles before it is  
     35                       killed and a new child is forked (0 = no limit). 
    3436  maxspare=NUMBER      max number of spare processes to keep running. 
    3537  minspare=NUMBER      min number of spare processes to prefork. 
     
    6769    'minspare': 2, 
    6870    'maxchildren': 50, 
     71    'maxrequests': 0, 
    6972} 
    7073 
     
    104107            'minSpare': int(options["minspare"]), 
    105108            'maxChildren': int(options["maxchildren"]), 
     109            'maxRequests': int(options["maxrequests"]),  
    106110        } 
    107111    elif options['method'] in ('thread', 'threaded'): 
  • django/branches/multiple-db-support/django/core/urlresolvers.py

    r4154 r4156  
    120120        mod_name, func_name = get_mod_func(self._callback_str) 
    121121        try: 
    122             self._callback = getattr(__import__(mod_name, '', '', ['']), func_name) 
     122            self._callback = getattr(__import__(mod_name, {}, {}, ['']), func_name) 
    123123        except ImportError, e: 
    124124            raise ViewDoesNotExist, "Could not import %s. Error was: %s" % (mod_name, str(e)) 
     
    131131        mod_name, func_name = get_mod_func(viewname) 
    132132        try: 
    133             lookup_view = getattr(__import__(mod_name, '', '', ['']), func_name) 
     133            lookup_view = getattr(__import__(mod_name, {}, {}, ['']), func_name) 
    134134        except (ImportError, AttributeError): 
    135135            raise NoReverseMatch 
     
    172172        except AttributeError: 
    173173            try: 
    174                 self._urlconf_module = __import__(self.urlconf_name, '', '', ['']) 
     174                self._urlconf_module = __import__(self.urlconf_name, {}, {}, ['']) 
    175175            except ValueError, e: 
    176176                # Invalid urlconf_name, such as "foo.bar." (note trailing period) 
     
    187187        mod_name, func_name = get_mod_func(callback) 
    188188        try: 
    189             return getattr(__import__(mod_name, '', '', ['']), func_name), {} 
     189            return getattr(__import__(mod_name, {}, {}, ['']), func_name), {} 
    190190        except (ImportError, AttributeError), e: 
    191191            raise ViewDoesNotExist, "Tried %s. Error was: %s" % (callback, str(e)) 
     
    201201            mod_name, func_name = get_mod_func(lookup_view) 
    202202            try: 
    203                 lookup_view = getattr(__import__(mod_name, '', '', ['']), func_name) 
     203                lookup_view = getattr(__import__(mod_name, {}, {}, ['']), func_name) 
    204204            except (ImportError, AttributeError): 
    205205                raise NoReverseMatch 
  • django/branches/multiple-db-support/django/db/__init__.py

    r4086 r4156  
    7474    def get_introspection_module(self): 
    7575        return __import__('django.db.backends.%s.introspection' %  
    76                           self.settings.DATABASE_ENGINE, '', '', ['']) 
     76                          self.settings.DATABASE_ENGINE, {}, {}, ['']) 
    7777 
    7878    def get_creation_module(self): 
    7979        return __import__('django.db.backends.%s.creation' %  
    80                           self.settings.DATABASE_ENGINE, '', '', ['']) 
     80                          self.settings.DATABASE_ENGINE, {}, {}, ['']) 
    8181 
    8282    def load_backend(self): 
    8383        try: 
    8484            backend = __import__('django.db.backends.%s.base' % 
    85                                  self.settings.DATABASE_ENGINE, '', '', ['']) 
     85                                 self.settings.DATABASE_ENGINE, {}, {}, ['']) 
    8686        except ImportError, e: 
    8787            # The database backend wasn't found. Display a helpful error 
     
    109109    def runshell(self): 
    110110        __import__('django.db.backends.%s.client' % 
    111                    self.settings.DATABASE_ENGINE, '', '', [''] 
     111                   self.settings.DATABASE_ENGINE, {}, {}, [''] 
    112112                   ).runshell(self.settings) 
    113113         
  • django/branches/multiple-db-support/django/db/models/base.py

    r3581 r4156  
    384384        return getattr(self, cachename) 
    385385 
    386     # Handles setting many-to-many related objects. 
    387     # Example: Album.set_songs() 
    388     def _set_related_many_to_many(self, rel_class, rel_field, id_list): 
    389         id_list = map(int, id_list) # normalize to integers 
    390         rel = rel_field.rel.to 
    391         m2m_table = rel_field.m2m_db_table() 
    392         this_id = self._get_pk_val() 
    393         db = self._default_manager.db 
    394         connection = db.connection 
    395         qn = db.backend.quote_name 
    396         cursor = connection.cursor() 
    397         cursor.execute("DELETE FROM %s WHERE %s = %%s" % \ 
    398             (qn(m2m_table), 
    399             qn(rel_field.m2m_column_name())), [this_id]) 
    400         sql = "INSERT INTO %s (%s, %s) VALUES (%%s, %%s)" % \ 
    401             (qn(m2m_table), 
    402             qn(rel_field.m2m_column_name()), 
    403             qn(rel_field.m2m_reverse_name())) 
    404         cursor.executemany(sql, [(this_id, i) for i in id_list]) 
    405         transaction.commit_unless_managed([connection]) 
    406  
    407386############################################ 
    408387# HELPER FUNCTIONS (CURRIED MODEL METHODS) #