diff options
Diffstat (limited to 'rest_framework')
19 files changed, 228 insertions, 179 deletions
| diff --git a/rest_framework/locale/de/LC_MESSAGES/django.mo b/rest_framework/locale/de/LC_MESSAGES/django.moBinary files differ index 48245c60..91f102eb 100644 --- a/rest_framework/locale/de/LC_MESSAGES/django.mo +++ b/rest_framework/locale/de/LC_MESSAGES/django.mo diff --git a/rest_framework/locale/de/LC_MESSAGES/django.po b/rest_framework/locale/de/LC_MESSAGES/django.po index 74bee416..387e916b 100644 --- a/rest_framework/locale/de/LC_MESSAGES/django.po +++ b/rest_framework/locale/de/LC_MESSAGES/django.po @@ -3,14 +3,15 @@  # This file is distributed under the same license as the PACKAGE package.  #   # Translators: +# Fabian Büchler <fabian@buechler.io>, 2015  # Thomas Tanner, 2015  msgid ""  msgstr ""  "Project-Id-Version: Django REST framework\n"  "Report-Msgid-Bugs-To: \n"  "POT-Creation-Date: 2015-01-30 16:23+0000\n" -"PO-Revision-Date: 2015-01-30 16:27+0000\n" -"Last-Translator: Thomas Christie <tom@tomchristie.com>\n" +"PO-Revision-Date: 2015-03-07 19:50+0000\n" +"Last-Translator: Fabian Büchler <fabian@buechler.io>\n"  "Language-Team: German (http://www.transifex.com/projects/p/django-rest-framework/language/de/)\n"  "MIME-Version: 1.0\n"  "Content-Type: text/plain; charset=UTF-8\n" @@ -80,7 +81,7 @@ msgstr "Methode \"{method}\" nicht erlaubt."  #: exceptions.py:109  msgid "Could not satisfy the request Accept header." -msgstr "Kann den Accept header der Anfrage nicht erfüllen." +msgstr "Kann die Accept Kopfzeile der Anfrage nicht erfüllen."  #: exceptions.py:121  msgid "Unsupported media type \"{media_type}\" in request." @@ -101,7 +102,7 @@ msgstr "Dieses Feld darf nicht Null sein."  #: fields.py:487 fields.py:515  msgid "\"{input}\" is not a valid boolean." -msgstr "\"{input}\" ist kein gültiger Boole'scher Wert." +msgstr "\"{input}\" ist kein gültiger Wahrheitswert."  #: fields.py:550  msgid "This field may not be blank." @@ -117,7 +118,7 @@ msgstr "Stelle sicher, dass dieses Feld mindestens {min_length} Zeichen lang ist  #: fields.py:587  msgid "Enter a valid email address." -msgstr "Gebe eine gültige E-Mail Adresse an." +msgstr "Gib eine gültige E-Mail Adresse an."  #: fields.py:604  msgid "This value does not match the required pattern." @@ -127,15 +128,15 @@ msgstr "Dieser Wert passt nicht zu dem erforderlichen Muster."  msgid ""  "Enter a valid \"slug\" consisting of letters, numbers, underscores or "  "hyphens." -msgstr "Gebe ein gültiges \"slug\" aus Buchstaben, Ziffern, Unterstrichen und Minuszeichen ein." +msgstr "Gib ein gültiges \"slug\" aus Buchstaben, Ziffern, Unterstrichen und Minuszeichen ein."  #: fields.py:627  msgid "Enter a valid URL." -msgstr "Gebe eine gültige URL ein." +msgstr "Gib eine gültige URL ein."  #: fields.py:638  msgid "\"{value}\" is not a valid UUID." -msgstr "" +msgstr "\"{value}\" ist keine gültige UUID."  #: fields.py:657  msgid "A valid integer is required." @@ -147,7 +148,7 @@ msgstr "Stelle sicher, dass dieser Wert kleiner oder gleich {max_value} ist."  #: fields.py:659 fields.py:693 fields.py:726  msgid "Ensure this value is greater than or equal to {min_value}." -msgstr "Stelle sicher, dass dieser Wert größer oder gleich {max_value} ist." +msgstr "Stelle sicher, dass dieser Wert größer oder gleich {min_value} ist."  #: fields.py:660 fields.py:694 fields.py:730  msgid "String value too large." @@ -174,11 +175,11 @@ msgstr "Stelle sicher, dass es nicht mehr als {max_whole_places} Stellen vor dem  #: fields.py:813  msgid "Datetime has wrong format. Use one of these formats instead: {format}." -msgstr "Datum- und Zeitangabe hat das falsche Format. Nutze stattdessen eines dieser Formate: {format}." +msgstr "Datums- und Zeitangabe hat das falsche Format. Nutze stattdessen eines dieser Formate: {format}."  #: fields.py:814  msgid "Expected a datetime but got a date." -msgstr "Erwarte eine Datum- und Zeitangabe, erhielt aber ein Datum." +msgstr "Erwarte eine Datums- und Zeitangabe, erhielt aber ein Datum."  #: fields.py:878  msgid "Date has wrong format. Use one of these formats instead: {format}." @@ -186,7 +187,7 @@ msgstr "Datum hat das falsche Format. Nutze stattdessen eines dieser Formate: {f  #: fields.py:879  msgid "Expected a date but got a datetime." -msgstr "Erwarte ein Datum, erhielt aber eine Datum- und Zeitangabe." +msgstr "Erwarte ein Datum, erhielt aber eine Datums- und Zeitangabe."  #: fields.py:936  msgid "Time has wrong format. Use one of these formats instead: {format}." @@ -207,7 +208,7 @@ msgstr "Es wurde keine Datei übermittelt."  #: fields.py:1068  msgid ""  "The submitted data was not a file. Check the encoding type on the form." -msgstr "Die übermittelten Daten sind keine Datei. Prüfe den Kodierungstyp im Formular." +msgstr "Die übermittelten Daten stellen keine Datei dar. Prüfe den Kodierungstyp im Formular."  #: fields.py:1069  msgid "No filename could be determined." @@ -220,53 +221,53 @@ msgstr "Die übermittelte Datei ist leer."  #: fields.py:1071  msgid ""  "Ensure this filename has at most {max_length} characters (it has {length})." -msgstr "" +msgstr "Stelle sicher, dass dieser Dateiname höchstens {max_length} Zeichen lang ist (er hat {length})."  #: fields.py:1113  msgid ""  "Upload a valid image. The file you uploaded was either not an image or a "  "corrupted image." -msgstr "" +msgstr "Lade ein gültiges Bild hoch. Die hochgeladene Datei ist entweder kein Bild oder ein beschädigtes Bild."  #: fields.py:1188  msgid "Expected a dictionary of items but got type \"{input_type}\"." -msgstr "" +msgstr "Erwarte ein Dictionary mit Elementen, erhielt aber den Typ \"{input_type}\"."  #: pagination.py:221  msgid "Invalid page \"{page_number}\": {message}." -msgstr "" +msgstr "Ungültige Seite \"{page_number}\": {message}."  #: pagination.py:442  msgid "Invalid cursor" -msgstr "" +msgstr "Ungültiger Zeiger"  #: relations.py:133  msgid "Invalid pk \"{pk_value}\" - object does not exist." -msgstr "" +msgstr "Ungültiger pk \"{pk_value}\" - Object existiert nicht."  #: relations.py:134  msgid "Incorrect type. Expected pk value, received {data_type}." -msgstr "" +msgstr "Falscher Typ. Erwarte pk Wert, erhielt aber {data_type}."  #: relations.py:157  msgid "Invalid hyperlink - No URL match." -msgstr "" +msgstr "Ungültiger Hyperlink - entspricht keiner URL."  #: relations.py:158  msgid "Invalid hyperlink - Incorrect URL match." -msgstr "" +msgstr "Ungültiger Hyperlink - URL stimmt nicht überein."  #: relations.py:159  msgid "Invalid hyperlink - Object does not exist." -msgstr "" +msgstr "Ungültiger Hyperlink - Objekt existiert nicht."  #: relations.py:160  msgid "Incorrect type. Expected URL string, received {data_type}." -msgstr "" +msgstr "Falscher Typ. Erwarte URL Zeichenkette, erhielt aber {data_type}."  #: relations.py:295  msgid "Object with {slug_name}={value} does not exist." -msgstr "" +msgstr "Objekt mit {slug_name}={value} existiert nicht."  #: relations.py:296  msgid "Invalid value." @@ -278,39 +279,39 @@ msgstr "Ungültige Daten. Dictionary erwartet, aber {datatype} erhalten."  #: validators.py:22  msgid "This field must be unique." -msgstr "Dieses Feld muss eineindeutig sein." +msgstr "Dieses Feld muss eindeutig sein."  #: validators.py:76  msgid "The fields {field_names} must make a unique set." -msgstr "" +msgstr "Die Felder {field_names} müssen eine eindeutige Menge bilden."  #: validators.py:219  msgid "This field must be unique for the \"{date_field}\" date." -msgstr "" +msgstr "Dieses Feld muss bezüglich des \"{date_field}\" Datums eindeutig sein."  #: validators.py:234  msgid "This field must be unique for the \"{date_field}\" month." -msgstr "" +msgstr "Dieses Feld muss bezüglich des \"{date_field}\" Monats eindeutig sein."  #: validators.py:247  msgid "This field must be unique for the \"{date_field}\" year." -msgstr "" +msgstr "Dieses Feld muss bezüglich des \"{date_field}\" Jahrs eindeutig sein."  #: versioning.py:39  msgid "Invalid version in \"Accept\" header." -msgstr "" +msgstr "Ungültige Version in der \"Accept\" Kopfzeile."  #: versioning.py:70 versioning.py:112  msgid "Invalid version in URL path." -msgstr "" +msgstr "Ungültige Version im URL Pfad."  #: versioning.py:138  msgid "Invalid version in hostname." -msgstr "" +msgstr "Ungültige Version im Hostname."  #: versioning.py:160  msgid "Invalid version in query parameter." -msgstr "" +msgstr "Ungültige Version im Anfrageparameter."  #: authtoken/serializers.py:20  msgid "User account is disabled." diff --git a/rest_framework/locale/en_US/LC_MESSAGES/django.mo b/rest_framework/locale/en_US/LC_MESSAGES/django.moBinary files differ index eb60d9d7..8a8b9d55 100644 --- a/rest_framework/locale/en_US/LC_MESSAGES/django.mo +++ b/rest_framework/locale/en_US/LC_MESSAGES/django.mo diff --git a/rest_framework/locale/es/LC_MESSAGES/django.mo b/rest_framework/locale/es/LC_MESSAGES/django.moBinary files differ index 814db7be..f8a064e3 100644 --- a/rest_framework/locale/es/LC_MESSAGES/django.mo +++ b/rest_framework/locale/es/LC_MESSAGES/django.mo diff --git a/rest_framework/locale/es/LC_MESSAGES/django.po b/rest_framework/locale/es/LC_MESSAGES/django.po index 28ef893d..9c097e76 100644 --- a/rest_framework/locale/es/LC_MESSAGES/django.po +++ b/rest_framework/locale/es/LC_MESSAGES/django.po @@ -4,15 +4,15 @@  #   # Translators:  # José Padilla <jpadilla@webapplicate.com>, 2015 -# Miguel González <migonzalvar@activitycentral.com>, 2015 +# Miguel González <migonzalvar@gmail.com>, 2015  # Sergio Infante <rsinfante@gmail.com>, 2015  msgid ""  msgstr ""  "Project-Id-Version: Django REST framework\n"  "Report-Msgid-Bugs-To: \n"  "POT-Creation-Date: 2015-01-30 16:23+0000\n" -"PO-Revision-Date: 2015-01-30 16:27+0000\n" -"Last-Translator: Thomas Christie <tom@tomchristie.com>\n" +"PO-Revision-Date: 2015-03-06 19:51+0000\n" +"Last-Translator: Miguel González <migonzalvar@gmail.com>\n"  "Language-Team: Spanish (http://www.transifex.com/projects/p/django-rest-framework/language/es/)\n"  "MIME-Version: 1.0\n"  "Content-Type: text/plain; charset=UTF-8\n" @@ -137,7 +137,7 @@ msgstr "Introduzca una URL válida."  #: fields.py:638  msgid "\"{value}\" is not a valid UUID." -msgstr "" +msgstr "\"{value}\" no es un UUID válido."  #: fields.py:657  msgid "A valid integer is required." @@ -232,7 +232,7 @@ msgstr "Adjunte una imagen válida. El archivo adjunto o bien no es una imagen o  #: fields.py:1188  msgid "Expected a dictionary of items but got type \"{input_type}\"." -msgstr "" +msgstr "Se esperaba un diccionario de elementos en vez del tipo \"{input_type}\"."  #: pagination.py:221  msgid "Invalid page \"{page_number}\": {message}." @@ -240,7 +240,7 @@ msgstr "Página \"{page_number}\" inválida: {message}."  #: pagination.py:442  msgid "Invalid cursor" -msgstr "" +msgstr "Cursor inválido"  #: relations.py:133  msgid "Invalid pk \"{pk_value}\" - object does not exist." diff --git a/rest_framework/locale/et/LC_MESSAGES/django.mo b/rest_framework/locale/et/LC_MESSAGES/django.moBinary files differ index ca9b6ec4..74a159d4 100644 --- a/rest_framework/locale/et/LC_MESSAGES/django.mo +++ b/rest_framework/locale/et/LC_MESSAGES/django.mo diff --git a/rest_framework/locale/et/LC_MESSAGES/django.po b/rest_framework/locale/et/LC_MESSAGES/django.po index dec03d4d..7a4837e8 100644 --- a/rest_framework/locale/et/LC_MESSAGES/django.po +++ b/rest_framework/locale/et/LC_MESSAGES/django.po @@ -9,8 +9,8 @@ msgstr ""  "Project-Id-Version: Django REST framework\n"  "Report-Msgid-Bugs-To: \n"  "POT-Creation-Date: 2015-01-30 16:23+0000\n" -"PO-Revision-Date: 2015-01-30 16:27+0000\n" -"Last-Translator: Thomas Christie <tom@tomchristie.com>\n" +"PO-Revision-Date: 2015-02-27 16:24+0000\n" +"Last-Translator: Tõnis Kärdi <tonis.kardi@gmail.com>\n"  "Language-Team: Estonian (http://www.transifex.com/projects/p/django-rest-framework/language/et/)\n"  "MIME-Version: 1.0\n"  "Content-Type: text/plain; charset=UTF-8\n" @@ -20,31 +20,31 @@ msgstr ""  #: authentication.py:69  msgid "Invalid basic header. No credentials provided." -msgstr "" +msgstr "Sobimatu lihtpäis. Kasutajatunnus on esitamata."  #: authentication.py:72  msgid "Invalid basic header. Credentials string should not contain spaces." -msgstr "" +msgstr "Sobimatu lihtpäis. Kasutajatunnus ei tohi sisaldada tühikuid."  #: authentication.py:78  msgid "Invalid basic header. Credentials not correctly base64 encoded." -msgstr "" +msgstr "Sobimatu lihtpäis. Kasutajatunnus pole korrektselt base64-kodeeritud."  #: authentication.py:90  msgid "Invalid username/password." -msgstr "Vale kasutajatunnus/salasõna." +msgstr "Sobimatu kasutajatunnus/salasõna."  #: authentication.py:156  msgid "Invalid token header. No credentials provided." -msgstr "" +msgstr "Sobimatu lubakaardi päis. Kasutajatunnus on esitamata."  #: authentication.py:159  msgid "Invalid token header. Token string should not contain spaces." -msgstr "" +msgstr "Sobimatu lubakaardi päis. Loa sõne ei tohi sisaldada tühikuid."  #: authentication.py:168  msgid "Invalid token." -msgstr "" +msgstr "Sobimatu lubakaart."  #: authentication.py:171  msgid "User inactive or deleted." @@ -52,43 +52,43 @@ msgstr "Kasutaja on inaktiivne või kustutatud."  #: exceptions.py:38  msgid "A server error occurred." -msgstr "" +msgstr "Viga serveril."  #: exceptions.py:73  msgid "Malformed request." -msgstr "" +msgstr "Väändunud päring."  #: exceptions.py:78  msgid "Incorrect authentication credentials." -msgstr "" +msgstr "Ebakorrektne autentimistunnus."  #: exceptions.py:83  msgid "Authentication credentials were not provided." -msgstr "" +msgstr "Autentimistunnus on esitamata."  #: exceptions.py:88  msgid "You do not have permission to perform this action." -msgstr "" +msgstr "Teil puuduvad piisavad õigused selle tegevuse teostamiseks."  #: exceptions.py:93  msgid "Not found." -msgstr "" +msgstr "Ei leidnud."  #: exceptions.py:98  msgid "Method \"{method}\" not allowed." -msgstr "" +msgstr "Meetod \"{method}\" pole lubatud."  #: exceptions.py:109  msgid "Could not satisfy the request Accept header." -msgstr "" +msgstr "Päringu Accept-päist ei suutnud täita."  #: exceptions.py:121  msgid "Unsupported media type \"{media_type}\" in request." -msgstr "" +msgstr "Meedia tüüpi {media_type} päringus ei toetata."  #: exceptions.py:134  msgid "Request was throttled." -msgstr "" +msgstr "Liiga palju päringuid."  #: fields.py:153 relations.py:132 relations.py:156 validators.py:77  #: validators.py:155 @@ -101,23 +101,23 @@ msgstr "Väli ei tohi olla tühi."  #: fields.py:487 fields.py:515  msgid "\"{input}\" is not a valid boolean." -msgstr "" +msgstr "\"{input}\" pole kehtiv kahendarv."  #: fields.py:550  msgid "This field may not be blank." -msgstr "" +msgstr "See väli ei tohi olla tühi."  #: fields.py:551 fields.py:1324  msgid "Ensure this field has no more than {max_length} characters." -msgstr "" +msgstr "Veendu, et see väli poleks pikem kui {max_length} tähemärki."  #: fields.py:552  msgid "Ensure this field has at least {min_length} characters." -msgstr "" +msgstr "Veendu, et see väli oleks vähemalt {min_length} tähemärki pikk."  #: fields.py:587  msgid "Enter a valid email address." -msgstr "Sisesta kehtiv e-posti aadress." +msgstr "Sisestage kehtiv e-posti aadress."  #: fields.py:604  msgid "This value does not match the required pattern." @@ -127,27 +127,27 @@ msgstr "Väärtus ei ühti etteantud mustriga."  msgid ""  "Enter a valid \"slug\" consisting of letters, numbers, underscores or "  "hyphens." -msgstr "" +msgstr "Sisestage kehtiv \"slug\", mis koosneks tähtedest, numbritest, ala- või sidekriipsudest."  #: fields.py:627  msgid "Enter a valid URL." -msgstr "Sisesta korrektne URL." +msgstr "Sisestage korrektne URL."  #: fields.py:638  msgid "\"{value}\" is not a valid UUID." -msgstr "" +msgstr "\"{value}\" pole kehtiv UUID."  #: fields.py:657  msgid "A valid integer is required." -msgstr "" +msgstr "Sisendiks peab olema täisarv."  #: fields.py:658 fields.py:692 fields.py:725  msgid "Ensure this value is less than or equal to {max_value}." -msgstr "Veendu, et väärtus on väiksem kui või võrdne väärtusega {max_value}. " +msgstr "Veenduge, et väärtus on väiksem kui või võrdne väärtusega {max_value}. "  #: fields.py:659 fields.py:693 fields.py:726  msgid "Ensure this value is greater than or equal to {min_value}." -msgstr "Veendu, et väärtus on suurem kui või võrdne väärtusega {min_value}." +msgstr "Veenduge, et väärtus on suurem kui või võrdne väärtusega {min_value}."  #: fields.py:660 fields.py:694 fields.py:730  msgid "String value too large." @@ -155,166 +155,166 @@ msgstr "Sõne on liiga pikk."  #: fields.py:691 fields.py:724  msgid "A valid number is required." -msgstr "" +msgstr "Sisendiks peab olema arv."  #: fields.py:727  msgid "Ensure that there are no more than {max_digits} digits in total." -msgstr "Veendu, et kokku pole rohkem kui {max_digits}." +msgstr "Veenduge, et kokku pole rohkem kui {max_digits} numbit."  #: fields.py:728  msgid ""  "Ensure that there are no more than {max_decimal_places} decimal places." -msgstr "Veendu, et komakohti pole rohkem kui {max_decimal_places}. " +msgstr "Veenduge, et komakohti pole rohkem kui {max_decimal_places}. "  #: fields.py:729  msgid ""  "Ensure that there are no more than {max_whole_digits} digits before the "  "decimal point." -msgstr "" +msgstr "Veenduge, et täiskohti poleks rohkem kui {max_whole_digits}."  #: fields.py:813  msgid "Datetime has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "Valesti formaaditud kuupäev-kellaaeg. Kasutage mõnda neist: {format}."  #: fields.py:814  msgid "Expected a datetime but got a date." -msgstr "" +msgstr "Ootasin kuupäev-kellaaeg andmetüüpi, kuid sain hoopis kuupäeva."  #: fields.py:878  msgid "Date has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "Valesti formaaditud kuupäev. Kasutage mõnda neist: {format}."  #: fields.py:879  msgid "Expected a date but got a datetime." -msgstr "" +msgstr "Ootasin kuupäeva andmetüüpi, kuid sain hoopis kuupäev-kellaaja."  #: fields.py:936  msgid "Time has wrong format. Use one of these formats instead: {format}." -msgstr "" +msgstr "Valesti formaaditud kellaaeg. Kasutage mõnda neist: {format}."  #: fields.py:992 fields.py:1036  msgid "\"{input}\" is not a valid choice." -msgstr "" +msgstr "\"{input}\" on sobimatu valik."  #: fields.py:1037 fields.py:1151 serializers.py:482  msgid "Expected a list of items but got type \"{input_type}\"." -msgstr "" +msgstr "Ootasin kirjete järjendit, kuid sain \"{input_type}\" - tüübi."  #: fields.py:1067  msgid "No file was submitted." -msgstr "" +msgstr "Ühtegi faili ei esitatud."  #: fields.py:1068  msgid ""  "The submitted data was not a file. Check the encoding type on the form." -msgstr "" +msgstr "Esitatud andmetes ei olnud faili. Kontrollige vormi kodeeringut."  #: fields.py:1069  msgid "No filename could be determined." -msgstr "" +msgstr "Ei suutnud tuvastada failinime."  #: fields.py:1070  msgid "The submitted file is empty." -msgstr "" +msgstr "Esitatud fail oli tühi."  #: fields.py:1071  msgid ""  "Ensure this filename has at most {max_length} characters (it has {length})." -msgstr "" +msgstr "Veenduge, et failinimi oleks maksimaalselt {max_length} tähemärki pikk (praegu on {length})."  #: fields.py:1113  msgid ""  "Upload a valid image. The file you uploaded was either not an image or a "  "corrupted image." -msgstr "" +msgstr "Laadige üles kehtiv pildifail. Üles laetud fail ei olnud pilt või oli see katki."  #: fields.py:1188  msgid "Expected a dictionary of items but got type \"{input_type}\"." -msgstr "" +msgstr "Ootasin kirjete sõnastikku, kuid sain \"{input_type}\"."  #: pagination.py:221  msgid "Invalid page \"{page_number}\": {message}." -msgstr "" +msgstr "Sobimatu lehekülg \"{page_number}\": {message}."  #: pagination.py:442  msgid "Invalid cursor" -msgstr "" +msgstr "Sobimatu kursor."  #: relations.py:133  msgid "Invalid pk \"{pk_value}\" - object does not exist." -msgstr "" +msgstr "Sobimatu primaarvõti \"{pk_value}\" - objekti pole olemas."  #: relations.py:134  msgid "Incorrect type. Expected pk value, received {data_type}." -msgstr "" +msgstr "Sobimatu andmetüüp. Ootasin primaarvõtit, sain {data_type}."  #: relations.py:157  msgid "Invalid hyperlink - No URL match." -msgstr "" +msgstr "Sobimatu hüperlink - ei leidnud URLi vastet."  #: relations.py:158  msgid "Invalid hyperlink - Incorrect URL match." -msgstr "" +msgstr "Sobimatu hüperlink - vale URLi vaste."  #: relations.py:159  msgid "Invalid hyperlink - Object does not exist." -msgstr "" +msgstr "Sobimatu hüperlink - objekti ei eksisteeri."  #: relations.py:160  msgid "Incorrect type. Expected URL string, received {data_type}." -msgstr "" +msgstr "Sobimatu andmetüüp. Ootasin URLi sõne, sain {data_type}."  #: relations.py:295  msgid "Object with {slug_name}={value} does not exist." -msgstr "" +msgstr "Objekti {slug_name}={value} ei eksisteeri."  #: relations.py:296  msgid "Invalid value." -msgstr "" +msgstr "Sobimatu väärtus."  #: serializers.py:299  msgid "Invalid data. Expected a dictionary, but got {datatype}." -msgstr "" +msgstr "Sobimatud andmed. Ootasin sõnastikku, kuid sain {datatype}."  #: validators.py:22  msgid "This field must be unique." -msgstr "" +msgstr "Selle välja väärtus peab olema unikaalne."  #: validators.py:76  msgid "The fields {field_names} must make a unique set." -msgstr "" +msgstr "Veerud {field_names} peavad moodustama unikaalse hulga."  #: validators.py:219  msgid "This field must be unique for the \"{date_field}\" date." -msgstr "" +msgstr "Selle välja väärtus peab olema unikaalne veerus \"{date_field}\" märgitud kuupäeval."  #: validators.py:234  msgid "This field must be unique for the \"{date_field}\" month." -msgstr "" +msgstr "Selle välja väärtus peab olema unikaalneveerus \"{date_field}\" märgitud kuul."  #: validators.py:247  msgid "This field must be unique for the \"{date_field}\" year." -msgstr "" +msgstr "Selle välja väärtus peab olema unikaalneveerus \"{date_field}\" märgitud aastal."  #: versioning.py:39  msgid "Invalid version in \"Accept\" header." -msgstr "" +msgstr "Sobimatu versioon \"Accept\" päises."  #: versioning.py:70 versioning.py:112  msgid "Invalid version in URL path." -msgstr "" +msgstr "Sobimatu versioon URLi rajas."  #: versioning.py:138  msgid "Invalid version in hostname." -msgstr "" +msgstr "Sobimatu versioon hostinimes."  #: versioning.py:160  msgid "Invalid version in query parameter." -msgstr "" +msgstr "Sobimatu versioon päringu parameetris."  #: authtoken/serializers.py:20  msgid "User account is disabled." -msgstr "Kasutajakonto on suletud" +msgstr "Kasutajakonto on suletud."  #: authtoken/serializers.py:23  msgid "Unable to log in with provided credentials." diff --git a/rest_framework/locale/pl/LC_MESSAGES/django.mo b/rest_framework/locale/pl/LC_MESSAGES/django.moBinary files differ index 9db72cfb..a4e0d1f1 100644 --- a/rest_framework/locale/pl/LC_MESSAGES/django.mo +++ b/rest_framework/locale/pl/LC_MESSAGES/django.mo diff --git a/rest_framework/locale/pl/LC_MESSAGES/django.po b/rest_framework/locale/pl/LC_MESSAGES/django.po index 8e51d754..dbf2a077 100644 --- a/rest_framework/locale/pl/LC_MESSAGES/django.po +++ b/rest_framework/locale/pl/LC_MESSAGES/django.po @@ -4,14 +4,15 @@  #   # Translators:  # Janusz Harkot <jh@blueice.pl>, 2015 +# piotrjakimiak <legolass71@gmail.com>, 2015  # Maciek Olko <maciej.olko@gmail.com>, 2015  msgid ""  msgstr ""  "Project-Id-Version: Django REST framework\n"  "Report-Msgid-Bugs-To: \n"  "POT-Creation-Date: 2015-01-30 16:23+0000\n" -"PO-Revision-Date: 2015-01-30 16:27+0000\n" -"Last-Translator: Thomas Christie <tom@tomchristie.com>\n" +"PO-Revision-Date: 2015-03-04 17:03+0000\n" +"Last-Translator: piotrjakimiak <legolass71@gmail.com>\n"  "Language-Team: Polish (http://www.transifex.com/projects/p/django-rest-framework/language/pl/)\n"  "MIME-Version: 1.0\n"  "Content-Type: text/plain; charset=UTF-8\n" @@ -136,7 +137,7 @@ msgstr "Wprowadź poprawny adres URL."  #: fields.py:638  msgid "\"{value}\" is not a valid UUID." -msgstr "" +msgstr "\"{value}\" nie jest poprawnym UUID."  #: fields.py:657  msgid "A valid integer is required." @@ -231,7 +232,7 @@ msgstr "Prześlij poprawny plik graficzny. Przesłany plik albo nie jest grafik  #: fields.py:1188  msgid "Expected a dictionary of items but got type \"{input_type}\"." -msgstr "" +msgstr "Oczekiwano słownika, ale otrzymano  \"{input_type}\"."  #: pagination.py:221  msgid "Invalid page \"{page_number}\": {message}." @@ -239,7 +240,7 @@ msgstr "Niepoprawna strona \"{page_number}\": {message}."  #: pagination.py:442  msgid "Invalid cursor" -msgstr "" +msgstr "Niepoprawny wskaźnik"  #: relations.py:133  msgid "Invalid pk \"{pk_value}\" - object does not exist." diff --git a/rest_framework/locale/ru/LC_MESSAGES/django.mo b/rest_framework/locale/ru/LC_MESSAGES/django.moBinary files differ index d1555f1f..4d5145d3 100644 --- a/rest_framework/locale/ru/LC_MESSAGES/django.mo +++ b/rest_framework/locale/ru/LC_MESSAGES/django.mo diff --git a/rest_framework/locale/ru/LC_MESSAGES/django.po b/rest_framework/locale/ru/LC_MESSAGES/django.po index 38489747..dc2a37c1 100644 --- a/rest_framework/locale/ru/LC_MESSAGES/django.po +++ b/rest_framework/locale/ru/LC_MESSAGES/django.po @@ -3,14 +3,15 @@  # This file is distributed under the same license as the PACKAGE package.  #   # Translators: +# Kirill Tarasenko, 2015  # Mikhail Dmitriev <mktums@gmail.com>, 2015  msgid ""  msgstr ""  "Project-Id-Version: Django REST framework\n"  "Report-Msgid-Bugs-To: \n"  "POT-Creation-Date: 2015-01-30 16:23+0000\n" -"PO-Revision-Date: 2015-01-30 16:27+0000\n" -"Last-Translator: Thomas Christie <tom@tomchristie.com>\n" +"PO-Revision-Date: 2015-02-23 10:40+0000\n" +"Last-Translator: Kirill Tarasenko\n"  "Language-Team: Russian (http://www.transifex.com/projects/p/django-rest-framework/language/ru/)\n"  "MIME-Version: 1.0\n"  "Content-Type: text/plain; charset=UTF-8\n" @@ -135,7 +136,7 @@ msgstr "Введите корректный URL."  #: fields.py:638  msgid "\"{value}\" is not a valid UUID." -msgstr "" +msgstr "\"{value}\" не является корректным UUID."  #: fields.py:657  msgid "A valid integer is required." @@ -230,7 +231,7 @@ msgstr "Загрузите корректное изображение. Загр  #: fields.py:1188  msgid "Expected a dictionary of items but got type \"{input_type}\"." -msgstr "" +msgstr "Ожидался словарь со значениями, но был получен \"{input_type}\"."  #: pagination.py:221  msgid "Invalid page \"{page_number}\": {message}." @@ -238,7 +239,7 @@ msgstr "Недопустимая страница \"{page_number}\": {message}."  #: pagination.py:442  msgid "Invalid cursor" -msgstr "" +msgstr "Не корректный курсор"  #: relations.py:133  msgid "Invalid pk \"{pk_value}\" - object does not exist." @@ -278,11 +279,11 @@ msgstr "Недопустимые данные. Ожидался dictionary, но  #: validators.py:22  msgid "This field must be unique." -msgstr "" +msgstr "Это поле должно быть уникально."  #: validators.py:76  msgid "The fields {field_names} must make a unique set." -msgstr "" +msgstr "Поля {field_names} должны производить массив с уникальными значениями."  #: validators.py:219  msgid "This field must be unique for the \"{date_field}\" date." diff --git a/rest_framework/locale/tr/LC_MESSAGES/django.mo b/rest_framework/locale/tr/LC_MESSAGES/django.moBinary files differ index e6b848cf..02f0e3a6 100644 --- a/rest_framework/locale/tr/LC_MESSAGES/django.mo +++ b/rest_framework/locale/tr/LC_MESSAGES/django.mo diff --git a/rest_framework/locale/tr/LC_MESSAGES/django.po b/rest_framework/locale/tr/LC_MESSAGES/django.po index 5aabbeba..348585d6 100644 --- a/rest_framework/locale/tr/LC_MESSAGES/django.po +++ b/rest_framework/locale/tr/LC_MESSAGES/django.po @@ -3,6 +3,7 @@  # This file is distributed under the same license as the PACKAGE package.  #   # Translators: +# Emrah BİLBAY <emrahbilbay@gmail.com>, 2015  # Ertaç Paprat <epaprat@gmail.com>, 2015  # Mesut Can Gürle <mesutcang@gmail.com>, 2015  # Recep KIRMIZI <rkirmizi@gmail.com>, 2015 @@ -12,8 +13,8 @@ msgstr ""  "Project-Id-Version: Django REST framework\n"  "Report-Msgid-Bugs-To: \n"  "POT-Creation-Date: 2015-01-30 16:23+0000\n" -"PO-Revision-Date: 2015-01-30 16:27+0000\n" -"Last-Translator: Thomas Christie <tom@tomchristie.com>\n" +"PO-Revision-Date: 2015-03-10 23:50+0000\n" +"Last-Translator: Emrah BİLBAY <emrahbilbay@gmail.com>\n"  "Language-Team: Turkish (http://www.transifex.com/projects/p/django-rest-framework/language/tr/)\n"  "MIME-Version: 1.0\n"  "Content-Type: text/plain; charset=UTF-8\n" @@ -23,15 +24,15 @@ msgstr ""  #: authentication.py:69  msgid "Invalid basic header. No credentials provided." -msgstr "" +msgstr "Geçersiz yetkilendirme başlığı. Gerekli uygunluk kriterleri sağlanmamış."  #: authentication.py:72  msgid "Invalid basic header. Credentials string should not contain spaces." -msgstr "" +msgstr "Geçersiz yetkilendirme başlığı. Uygunluk kriterine ait veri boşluk karakteri içermemeli."  #: authentication.py:78  msgid "Invalid basic header. Credentials not correctly base64 encoded." -msgstr "" +msgstr "Geçersiz yetkilendirme başlığı. Uygunluk kriterleri base64 formatına uygun olarak kodlanmamış."  #: authentication.py:90  msgid "Invalid username/password." @@ -83,7 +84,7 @@ msgstr "\"{method}\" metoduna izin verilmiyor."  #: exceptions.py:109  msgid "Could not satisfy the request Accept header." -msgstr "" +msgstr "İsteğe ait Accept başlık bilgisi yanıt verilecek başlık bilgileri arasında değil."  #: exceptions.py:121  msgid "Unsupported media type \"{media_type}\" in request." @@ -91,7 +92,7 @@ msgstr "İstekte desteklenmeyen medya tipi: \"{media_type}\"."  #: exceptions.py:134  msgid "Request was throttled." -msgstr "" +msgstr "Üst üste çok fazla istek yapıldı."  #: fields.py:153 relations.py:132 relations.py:156 validators.py:77  #: validators.py:155 @@ -138,7 +139,7 @@ msgstr "Geçerli bir URL girin."  #: fields.py:638  msgid "\"{value}\" is not a valid UUID." -msgstr "" +msgstr "\"{value}\" geçerli bir UUID değil."  #: fields.py:657  msgid "A valid integer is required." @@ -233,7 +234,7 @@ msgstr "Geçerli bir resim yükleyin. Yüklediğiniz dosya resim değil ya da bo  #: fields.py:1188  msgid "Expected a dictionary of items but got type \"{input_type}\"." -msgstr "" +msgstr "Sözlük tipi bir değişken beklenirken \"{input_type}\" tipi bir değişken alındı."  #: pagination.py:221  msgid "Invalid page \"{page_number}\": {message}." @@ -241,7 +242,7 @@ msgstr "Geçersiz sayfa \"{page_number}\":{message}."  #: pagination.py:442  msgid "Invalid cursor" -msgstr "" +msgstr "Sayfalandırma imleci geçersiz"  #: relations.py:133  msgid "Invalid pk \"{pk_value}\" - object does not exist." diff --git a/rest_framework/pagination.py b/rest_framework/pagination.py index 80985873..5e60448d 100644 --- a/rest_framework/pagination.py +++ b/rest_framework/pagination.py @@ -10,7 +10,7 @@ from django.core.paginator import InvalidPage, Paginator as DjangoPaginator  from django.template import Context, loader  from django.utils import six  from django.utils.six.moves.urllib import parse as urlparse -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _  from rest_framework.compat import OrderedDict  from rest_framework.exceptions import NotFound  from rest_framework.response import Response @@ -18,6 +18,7 @@ from rest_framework.settings import api_settings  from rest_framework.utils.urls import (      replace_query_param, remove_query_param  ) +import warnings  def _positive_int(integer_string, strict=False, cutoff=None): @@ -130,12 +131,19 @@ def _decode_cursor(encoded):      """      Given a string representing an encoded cursor, return a `Cursor` instance.      """ + +    # The offset in the cursor is used in situations where we have a +    # nearly-unique index. (Eg millisecond precision creation timestamps) +    # We guard against malicious users attempting to cause expensive database +    # queries, by having a hard cap on the maximum possible size of the offset. +    OFFSET_CUTOFF = 1000 +      try:          querystring = b64decode(encoded.encode('ascii')).decode('ascii')          tokens = urlparse.parse_qs(querystring, keep_blank_values=True)          offset = tokens.get('o', ['0'])[0] -        offset = _positive_int(offset) +        offset = _positive_int(offset, cutoff=OFFSET_CUTOFF)          reverse = tokens.get('r', ['0'])[0]          reverse = bool(int(reverse)) @@ -203,18 +211,18 @@ class PageNumberPagination(BasePagination):      """      # The default page size.      # Defaults to `None`, meaning pagination is disabled. -    paginate_by = api_settings.PAGINATE_BY +    page_size = api_settings.PAGE_SIZE      # Client can control the page using this query parameter.      page_query_param = 'page'      # Client can control the page size using this query parameter.      # Default is 'None'. Set to eg 'page_size' to enable usage. -    paginate_by_param = api_settings.PAGINATE_BY_PARAM +    page_size_query_param = None      # Set to an integer to limit the maximum page size the client may request. -    # Only relevant if 'paginate_by_param' has also been set. -    max_paginate_by = api_settings.MAX_PAGINATE_BY +    # Only relevant if 'page_size_query_param' has also been set. +    max_page_size = None      last_page_strings = ('last',) @@ -228,12 +236,48 @@ class PageNumberPagination(BasePagination):          attributes were set there. The attributes should now be set on          the pagination class, but the old style is still pending deprecation.          """ -        for attr in ( -            'paginate_by', 'page_query_param', -            'paginate_by_param', 'max_paginate_by' +        assert not ( +            getattr(view, 'pagination_serializer_class', None) or +            getattr(api_settings, 'DEFAULT_PAGINATION_SERIALIZER_CLASS', None) +        ), ( +            "The pagination_serializer_class attribute and " +            "DEFAULT_PAGINATION_SERIALIZER_CLASS setting have been removed as " +            "part of the 3.1 pagination API improvement. See the pagination " +            "documentation for details on the new API." +        ) + +        for (settings_key, attr_name) in ( +            ('PAGINATE_BY', 'page_size'), +            ('PAGINATE_BY_PARAM', 'page_size_query_param'), +            ('MAX_PAGINATE_BY', 'max_page_size')          ): -            if hasattr(view, attr): -                setattr(self, attr, getattr(view, attr)) +            value = getattr(api_settings, settings_key, None) +            if value is not None: +                setattr(self, attr_name, value) +                warnings.warn( +                    "The `%s` settings key is pending deprecation. " +                    "Use the `%s` attribute on the pagination class instead." % ( +                        settings_key, attr_name +                    ), +                    PendingDeprecationWarning, +                ) + +        for (view_attr, attr_name) in ( +            ('paginate_by', 'page_size'), +            ('page_query_param', 'page_query_param'), +            ('paginate_by_param', 'page_size_query_param'), +            ('max_paginate_by', 'max_page_size') +        ): +            value = getattr(view, view_attr, None) +            if value is not None: +                setattr(self, attr_name, value) +                warnings.warn( +                    "The `%s` view attribute is pending deprecation. " +                    "Use the `%s` attribute on the pagination class instead." % ( +                        view_attr, attr_name +                    ), +                    PendingDeprecationWarning, +                )      def paginate_queryset(self, queryset, request, view=None):          """ @@ -264,7 +308,7 @@ class PageNumberPagination(BasePagination):              self.display_page_controls = True          self.request = request -        return self.page +        return list(self.page)      def get_paginated_response(self, data):          return Response(OrderedDict([ @@ -275,17 +319,17 @@ class PageNumberPagination(BasePagination):          ]))      def get_page_size(self, request): -        if self.paginate_by_param: +        if self.page_size_query_param:              try:                  return _positive_int( -                    request.query_params[self.paginate_by_param], +                    request.query_params[self.page_size_query_param],                      strict=True, -                    cutoff=self.max_paginate_by +                    cutoff=self.max_page_size                  )              except (KeyError, ValueError):                  pass -        return self.paginate_by +        return self.page_size      def get_next_link(self):          if not self.page.has_next(): @@ -336,7 +380,7 @@ class LimitOffsetPagination(BasePagination):      http://api.example.org/accounts/?limit=100      http://api.example.org/accounts/?offset=400&limit=100      """ -    default_limit = api_settings.PAGINATE_BY +    default_limit = api_settings.PAGE_SIZE      limit_query_param = 'limit'      offset_query_param = 'offset'      max_limit = None @@ -349,7 +393,7 @@ class LimitOffsetPagination(BasePagination):          self.request = request          if self.count > self.limit and self.template is not None:              self.display_page_controls = True -        return queryset[self.offset:self.offset + self.limit] +        return list(queryset[self.offset:self.offset + self.limit])      def get_paginated_response(self, data):          return Response(OrderedDict([ @@ -435,14 +479,15 @@ class LimitOffsetPagination(BasePagination):  class CursorPagination(BasePagination): -    # Determine how/if True, False and None positions work - do the string -    # encodings work with Django queryset filters? -    # Consider a max offset cap. -    # Tidy up the `get_ordering` API (eg remove queryset from it) +    """ +    The cursor pagination implementation is neccessarily complex. +    For an overview of the position/offset style we use, see this post: +    http://cramer.io/2011/03/08/building-cursors-for-the-disqus-api/ +    """      cursor_query_param = 'cursor' -    page_size = api_settings.PAGINATE_BY +    page_size = api_settings.PAGE_SIZE      invalid_cursor_message = _('Invalid cursor') -    ordering = None +    ordering = '-created'      template = 'rest_framework/pagination/previous_and_next.html'      def paginate_queryset(self, queryset, request, view=None): @@ -484,7 +529,7 @@ class CursorPagination(BasePagination):          # We also always fetch an extra item in order to determine if there is a          # page following on from this one.          results = list(queryset[offset:offset + self.page_size + 1]) -        self.page = results[:self.page_size] +        self.page = list(results[:self.page_size])          # Determine the position of the final item following the page.          if len(results) > len(self.page): @@ -643,12 +688,12 @@ class CursorPagination(BasePagination):                  )              )          else: -            # The default case is to check for an `ordering` attribute, -            # first on the view instance, and then on this pagination instance. -            ordering = getattr(view, 'ordering', getattr(self, 'ordering', None)) +            # The default case is to check for an `ordering` attribute +            # on this pagination instance. +            ordering = self.ordering              assert ordering is not None, (                  'Using cursor pagination, but no ordering attribute was declared ' -                'on the view or on the pagination class.' +                'on the pagination class.'              )          assert isinstance(ordering, (six.string_types, list, tuple)), ( diff --git a/rest_framework/relations.py b/rest_framework/relations.py index 0b7c9d86..3a966c5b 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -360,6 +360,10 @@ class ManyRelatedField(Field):          ]      def get_attribute(self, instance): +        # Can't have any relationships if not created +        if not instance.pk: +            return [] +          relationship = get_attribute(instance, self.source_attrs)          return relationship.all() if (hasattr(relationship, 'all')) else relationship diff --git a/rest_framework/request.py b/rest_framework/request.py index fd4f6a3e..e4b5bc26 100644 --- a/rest_framework/request.py +++ b/rest_framework/request.py @@ -14,7 +14,6 @@ from django.http import QueryDict  from django.http.multipartparser import parse_header  from django.utils import six  from django.utils.datastructures import MultiValueDict -from django.utils.datastructures import MergeDict as DjangoMergeDict  from rest_framework import HTTP_HEADER_ENCODING  from rest_framework import exceptions  from rest_framework.settings import api_settings @@ -61,15 +60,6 @@ class override_method(object):              self.view.action = self.action -class MergeDict(DjangoMergeDict, dict): -    """ -    Using this as a workaround until the parsers API is properly -    addressed in 3.1. -    """ -    def __init__(self, *dicts): -        self.dicts = dicts - -  class Empty(object):      """      Placeholder for unset attributes. @@ -328,7 +318,8 @@ class Request(object):          if not _hasattr(self, '_data'):              self._data, self._files = self._parse()              if self._files: -                self._full_data = MergeDict(self._data, self._files) +                self._full_data = self._data.copy() +                self._full_data.update(self._files)              else:                  self._full_data = self._data @@ -392,7 +383,8 @@ class Request(object):          # At this point we're committed to parsing the request as form data.          self._data = self._request.POST          self._files = self._request.FILES -        self._full_data = MergeDict(self._data, self._files) +        self._full_data = self._data.copy() +        self._full_data.update(self._files)          # Method overloading - change the method and remove the param from the content.          if ( diff --git a/rest_framework/routers.py b/rest_framework/routers.py index b1e39ff7..4df852bf 100644 --- a/rest_framework/routers.py +++ b/rest_framework/routers.py @@ -218,14 +218,15 @@ class SimpleRouter(BaseRouter):          https://github.com/alanjds/drf-nested-routers          """ -        base_regex = '(?P<{lookup_prefix}{lookup_field}>{lookup_value})' +        base_regex = '(?P<{lookup_prefix}{lookup_url_kwarg}>{lookup_value})'          # Use `pk` as default field, unset set.  Default regex should not          # consume `.json` style suffixes and should break at '/' boundaries.          lookup_field = getattr(viewset, 'lookup_field', 'pk') +        lookup_url_kwarg = getattr(viewset, 'lookup_url_kwarg', None) or lookup_field          lookup_value = getattr(viewset, 'lookup_value_regex', '[^/.]+')          return base_regex.format(              lookup_prefix=lookup_prefix, -            lookup_field=lookup_field, +            lookup_url_kwarg=lookup_url_kwarg,              lookup_value=lookup_value          ) diff --git a/rest_framework/settings.py b/rest_framework/settings.py index 394b1262..a3e9f590 100644 --- a/rest_framework/settings.py +++ b/rest_framework/settings.py @@ -61,9 +61,7 @@ DEFAULTS = {      'NUM_PROXIES': None,      # Pagination -    'PAGINATE_BY': None, -    'PAGINATE_BY_PARAM': None, -    'MAX_PAGINATE_BY': None, +    'PAGE_SIZE': None,      # Filtering      'SEARCH_PARAM': 'search', @@ -117,7 +115,12 @@ DEFAULTS = {      'UNICODE_JSON': True,      'COMPACT_JSON': True,      'COERCE_DECIMAL_TO_STRING': True, -    'UPLOADED_FILES_USE_URL': True +    'UPLOADED_FILES_USE_URL': True, + +    # Pending deprecation: +    'PAGINATE_BY': None, +    'PAGINATE_BY_PARAM': None, +    'MAX_PAGINATE_BY': None  } diff --git a/rest_framework/templates/rest_framework/pagination/previous_and_next.html b/rest_framework/templates/rest_framework/pagination/previous_and_next.html index eacbfff4..08c17709 100644 --- a/rest_framework/templates/rest_framework/pagination/previous_and_next.html +++ b/rest_framework/templates/rest_framework/pagination/previous_and_next.html @@ -7,6 +7,6 @@  {% if next_url %}      <li class="next"><a href="{{ next_url }}">Next »</a></li>  {% else %} -    <li class="next disabled"><a href="#">Next »</li> +    <li class="next disabled"><a href="#">Next »</a></li>  {% endif %}  </ul> | 
