From 543996711d323722a1017e376619ae462a726ada Mon Sep 17 00:00:00 2001 From: Josh Thomas Date: Wed, 23 Apr 2025 04:03:14 -0500 Subject: [PATCH 01/15] Fix `UniqueTogetherValidator` to handle fields w/ `source` attr (#9688) * Add failing test for `UniqueConstraint` validation with `source` attribute * Fix `UniqueTogetherValidator` to handle fields with source attribute * split inner sources logic out to tuple comprehension --- rest_framework/validators.py | 3 ++- tests/test_validators.py | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/rest_framework/validators.py b/rest_framework/validators.py index a152c6362..4c444cf01 100644 --- a/rest_framework/validators.py +++ b/rest_framework/validators.py @@ -188,7 +188,8 @@ class UniqueTogetherValidator: if attrs[field_name] != getattr(serializer.instance, field_name) ] - condition_kwargs = {source: attrs[source] for source in self.condition_fields} + condition_sources = (serializer.fields[field_name].source for field_name in self.condition_fields) + condition_kwargs = {source: attrs[source] for source in condition_sources} if checked_values and None not in checked_values and qs_exists_with_condition(queryset, self.condition, condition_kwargs): field_names = ', '.join(self.fields) message = self.message.format(field_names=field_names) diff --git a/tests/test_validators.py b/tests/test_validators.py index 29b097ef3..d19734d98 100644 --- a/tests/test_validators.py +++ b/tests/test_validators.py @@ -683,6 +683,24 @@ class TestUniqueConstraintValidation(TestCase): result = serializer.save() self.assertIsInstance(result, UniqueConstraintNullableModel) + def test_unique_constraint_source(self): + class SourceUniqueConstraintSerializer(serializers.ModelSerializer): + raceName = serializers.CharField(source="race_name") + + class Meta: + model = UniqueConstraintModel + fields = ("raceName", "position", "global_id", "fancy_conditions") + + serializer = SourceUniqueConstraintSerializer( + data={ + "raceName": "example", + "position": 5, + "global_id": 11, + "fancy_conditions": 11, + } + ) + assert serializer.is_valid() + # Tests for `UniqueForDateValidator` # ---------------------------------- From d375154d1853a13a8c77b6b2d59b852762302bf1 Mon Sep 17 00:00:00 2001 From: Salman Saeed Albukhaitan <44763729+bukh-sal@users.noreply.github.com> Date: Sat, 26 Apr 2025 17:42:44 +0300 Subject: [PATCH 02/15] Update Arabic translations (#9595) --- .../locale/ar/LC_MESSAGES/django.mo | Bin 12150 -> 15133 bytes .../locale/ar/LC_MESSAGES/django.po | 129 +++++++++--------- 2 files changed, 65 insertions(+), 64 deletions(-) diff --git a/rest_framework/locale/ar/LC_MESSAGES/django.mo b/rest_framework/locale/ar/LC_MESSAGES/django.mo index f793d7c73b74b37eee04252018de72e7505a305d..a3c7c5ca248d8b3ae71a93809cb04825eabfcd4a 100644 GIT binary patch literal 15133 zcmcJV4~$$#ea9aVNa6$nfdokTGh7=;z_qTuo)iXFH}+8YG|~8p%qH&le|`i{rQk2}-33RTV92)#|O(Hmztyt0GD(^$$`( z{d{NUz1_Xrb8JXgp8LLeGxM9@{Qk{v=K1fgz3httzt2(LL%I60Ab1Y^-^=;K?}a5n zV8A)>M({7d68JyhTfh%p6$I}BSA!bA8T=Kn0)7ZQ3eq)r0qh6A2`&Zy1=JMRUmXM= z1K$U307Fo8rhWa7!H-kF`prSG4%`mz0KW*{2L1@V75p`rSqnY_t^vOU-Uogk901>Q zjqCp)I7IzP@P6>0z+VMdzBLH01$Tg&KL+*wu*Vrt^#2Uhd`sTOoZvc8a*04#2|f>M zU0?CzU+Ea4mQ@I0=@(Z-cNJ{1{ZfpMlH3)o%}io4{S*2f!!64})`{ z`u`26dH)q$4*nDry$`=52sVNbgM;8Rp!)vS3p<`egM7?{4Y@SuDhNBE(c`~8$juQC&<6x2!9OtGzg2qw?RxT_)A~UK-tNU zK*{sJL9PG2?+k(~z)c=^fHVa=!8d_>K>h{$`EwiiMNo419(W7*b5QGA2~)D8&7kUE z1|`pzK)M8f?ce_xl>J`yZe$OB2)qsaw6A{&)Ox=Ms^33@2E2@y;`c^S@*4u*2>vc8 zKA#3L`QQZj5pWJ%0sbxcFnA5bB##(`WKaXO?xVi`6xdJwS#TxT0p{uy zeIPCq+ze{o)xJLH@m^5&@*s!_1d)ILS@7Rqhn_(3H-U0xXD7fl;P*kveaZXXdOrY) z|Br#P&lJ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N>PaaI5T diff --git a/rest_framework/locale/ar/LC_MESSAGES/django.po b/rest_framework/locale/ar/LC_MESSAGES/django.po index 58f72ec17..be261d8dd 100644 --- a/rest_framework/locale/ar/LC_MESSAGES/django.po +++ b/rest_framework/locale/ar/LC_MESSAGES/django.po @@ -8,6 +8,7 @@ # Bashar Al-Abdulhadi, 2016-2017 # Eyad Toma , 2015,2017 # zak zak , 2020 +# Salman Saeed Albukhaitan , 2024 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" @@ -24,19 +25,19 @@ msgstr "" #: authentication.py:70 msgid "Invalid basic header. No credentials provided." -msgstr "رأس أساسي غير صالح, لم تقدم اي بيانات." +msgstr "ترويسة أساسية غير صالحة. لم تقدم أي بيانات تفويض." #: authentication.py:73 msgid "Invalid basic header. Credentials string should not contain spaces." -msgstr "رأس أساسي غير صالح, سلسلة البيانات لا يجب أن تحتوي على أي أحرف مسافات" +msgstr "ترويسة أساسية غير صالحة. يجب أن لا تحتوي سلسلة بيانات التفويض على مسافات." #: authentication.py:83 msgid "Invalid basic header. Credentials not correctly base64 encoded." -msgstr "رأس أساسي غير صالح, البيانات ليست مرمّزة بصحة على أساس64." +msgstr "ترويسة أساسية غير صالحة. بيانات التفويض لم تُشفر بشكل صحيح بنظام أساس64." #: authentication.py:101 msgid "Invalid username/password." -msgstr "اسم المستخدم/كلمة السر غير صحيحين." +msgstr "اسم المستخدم/كلمة المرور غير صحيحة." #: authentication.py:104 authentication.py:206 msgid "User inactive or deleted." @@ -93,7 +94,7 @@ msgstr "كلمة المرور" #: authtoken/serializers.py:35 msgid "Unable to log in with provided credentials." -msgstr "تعذر تسجيل الدخول بالبيانات التي ادخلتها." +msgstr "تعذر تسجيل الدخول بالبيانات المدخلة." #: authtoken/serializers.py:38 msgid "Must include \"username\" and \"password\"." @@ -101,11 +102,11 @@ msgstr "يجب أن تتضمن \"اسم المستخدم\" و \"كلمة الم #: exceptions.py:102 msgid "A server error occurred." -msgstr "حدث خطأ في المخدم." +msgstr "حدث خطأ في الخادم." #: exceptions.py:142 msgid "Invalid input." -msgstr "" +msgstr "مدخل غير صالح." #: exceptions.py:161 msgid "Malformed request." @@ -130,11 +131,11 @@ msgstr "غير موجود." #: exceptions.py:191 #, python-brace-format msgid "Method \"{method}\" not allowed." -msgstr "الطريقة \"{method}\" غير مسموح بها." +msgstr "طريقة \"{method}\" غير مسموح بها." #: exceptions.py:202 msgid "Could not satisfy the request Accept header." -msgstr "لم نتمكن من تلبية الرٱس Accept في الطلب." +msgstr "تعذر تلبية ترويسة Accept في الطلب." #: exceptions.py:212 #, python-brace-format @@ -143,17 +144,17 @@ msgstr "الوسيط \"{media_type}\" الموجود في الطلب غير مع #: exceptions.py:223 msgid "Request was throttled." -msgstr "تم تقييد الطلب." +msgstr "تم حد الطلب." #: exceptions.py:224 #, python-brace-format msgid "Expected available in {wait} second." -msgstr "" +msgstr "متوقع التوفر خلال {wait} ثانية." #: exceptions.py:225 #, python-brace-format msgid "Expected available in {wait} seconds." -msgstr "" +msgstr "متوقع التوفر خلال {wait} ثواني." #: fields.py:316 relations.py:245 relations.py:279 validators.py:90 #: validators.py:183 @@ -166,11 +167,11 @@ msgstr "لا يمكن لهذا الحقل ان يكون فارغاً null." #: fields.py:701 msgid "Must be a valid boolean." -msgstr "" +msgstr "يجب أن يكون قيمة منطقية صالحة." #: fields.py:766 msgid "Not a valid string." -msgstr "" +msgstr "ليس نصاً صالحاً." #: fields.py:767 msgid "This field may not be blank." @@ -179,16 +180,16 @@ msgstr "لا يمكن لهذا الحقل ان يكون فارغاً." #: fields.py:768 fields.py:1881 #, python-brace-format msgid "Ensure this field has no more than {max_length} characters." -msgstr "تأكد ان الحقل لا يزيد عن {max_length} محرف." +msgstr "تأكد ان عدد الحروف في هذا الحقل لا تتجاوز {max_length}." #: fields.py:769 #, python-brace-format msgid "Ensure this field has at least {min_length} characters." -msgstr "تأكد ان الحقل {min_length} محرف على الاقل." +msgstr "تأكد ان عدد الحروف في هذا الحقل لا يقل عن {min_length}." #: fields.py:816 msgid "Enter a valid email address." -msgstr "عليك ان تدخل بريد إلكتروني صالح." +msgstr "يرجى إدخال عنوان بريد إلكتروني صحيح." #: fields.py:827 msgid "This value does not match the required pattern." @@ -204,7 +205,7 @@ msgstr "أدخل \"slug\" صالح يحتوي على حروف، أرقام، ش msgid "" "Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " "or hyphens." -msgstr "" +msgstr "أدخل \"slug\" صالح يحتوي على حروف يونيكود، أرقام، شُرط سفلية أو واصلات." #: fields.py:854 msgid "Enter a valid URL." @@ -212,7 +213,7 @@ msgstr "الرجاء إدخال رابط إلكتروني صالح." #: fields.py:867 msgid "Must be a valid UUID." -msgstr "" +msgstr "يجب أن يكون معرف UUID صالح." #: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." @@ -225,16 +226,16 @@ msgstr "الرجاء إدخال رقم صحيح صالح." #: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366 #, python-brace-format msgid "Ensure this value is less than or equal to {max_value}." -msgstr "تأكد ان القيمة أقل أو تساوي {max_value}." +msgstr "تأكد ان القيمة أقل من أو تساوي {max_value}." #: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367 #, python-brace-format msgid "Ensure this value is greater than or equal to {min_value}." -msgstr "تأكد ان القيمة أكبر أو تساوي {min_value}." +msgstr "تأكد ان القيمة أكبر من أو تساوي {min_value}." #: fields.py:934 fields.py:971 fields.py:1010 msgid "String value too large." -msgstr "السلسلة اطول من القيمة المسموح بها." +msgstr "النص طويل جداً." #: fields.py:968 fields.py:1004 msgid "A valid number is required." @@ -249,7 +250,7 @@ msgstr "تأكد ان القيمة لا تحوي أكثر من {max_digits} رق #, python-brace-format msgid "" "Ensure that there are no more than {max_decimal_places} decimal places." -msgstr "تأكد انه لا يوجد اكثر من {max_decimal_places} منازل عشرية." +msgstr "تأكد انه لا يوجد اكثر من {max_decimal_places} أرقام عشرية." #: fields.py:1009 #, python-brace-format @@ -261,7 +262,7 @@ msgstr "تأكد انه لا يوجد اكثر من {max_whole_digits} أرقا #: fields.py:1148 #, python-brace-format msgid "Datetime has wrong format. Use one of these formats instead: {format}." -msgstr "صيغة التاريخ و الوقت غير صحيحة. عليك أن تستخدم واحدة من هذه الصيغ التالية: {format}." +msgstr "صيغة التاريخ و الوقت غير صحيحة. عليك أن تستخدم احد الصيغ التالية: {format}." #: fields.py:1149 msgid "Expected a datetime but got a date." @@ -270,11 +271,11 @@ msgstr "متوقع تاريخ و وقت و وجد تاريخ فقط" #: fields.py:1150 #, python-brace-format msgid "Invalid datetime for the timezone \"{timezone}\"." -msgstr "" +msgstr "تاريخ و وقت غير صالح للمنطقة الزمنية \"{timezone}\"." #: fields.py:1151 msgid "Datetime value out of range." -msgstr "" +msgstr "قيمة التاريخ و الوقت خارج النطاق." #: fields.py:1236 #, python-brace-format @@ -293,12 +294,12 @@ msgstr "صيغة الوقت غير صحيحة. عليك أن تستخدم واح #: fields.py:1365 #, python-brace-format msgid "Duration has wrong format. Use one of these formats instead: {format}." -msgstr "صيغة المدة غير صحيحه, يرجى إستخدام إحدى هذه الصيغ: {format}." +msgstr "صيغة المدة غير صحيحة. يرجى استخدام احد الصيغ التالية: {format}." #: fields.py:1399 fields.py:1456 #, python-brace-format msgid "\"{input}\" is not a valid choice." -msgstr "\"{input}\" ليست واحدة من الخيارات الصالحة." +msgstr "\"{input}\" ليس خياراً صالحاً." #: fields.py:1402 #, python-brace-format @@ -317,7 +318,7 @@ msgstr "هذا التحديد لا يجب أن يكون فارغا." #: fields.py:1495 #, python-brace-format msgid "\"{input}\" is not a valid path choice." -msgstr "{input} كإختيار مسار غير صالح." +msgstr "{input} ليس خيار مسار صالح." #: fields.py:1514 msgid "No file was submitted." @@ -326,41 +327,41 @@ msgstr "لم يتم إرسال أي ملف." #: fields.py:1515 msgid "" "The submitted data was not a file. Check the encoding type on the form." -msgstr "المعطيات المرسولة ليست ملف. إفحص نوع الترميز في النموذج." +msgstr "البيانات المرسلة ليست ملف. تأكد من نوع الترميز في النموذج." #: fields.py:1516 msgid "No filename could be determined." -msgstr "ما من إسم ملف أمكن تحديده." +msgstr "تعذر تحديد اسم الملف." #: fields.py:1517 msgid "The submitted file is empty." -msgstr "الملف الذي تم إرساله فارغ." +msgstr "الملف المرسل فارغ." #: fields.py:1518 #, python-brace-format msgid "" "Ensure this filename has at most {max_length} characters (it has {length})." -msgstr "تأكد ان اسم الملف لا يحوي أكثر من {max_length} محرف (الإسم المرسل يحوي {length} محرف)." +msgstr "تأكد ان طول إسم الملف لا يتجاوز {max_length} حرف (عدد الحروف الحالي {length})." #: fields.py:1566 msgid "" "Upload a valid image. The file you uploaded was either not an image or a " "corrupted image." -msgstr "الرجاء تحميل صورة صالحة. الملف الذي تم تحميله إما لم يكن صورة او انه كان صورة تالفة." +msgstr "يرجى رفع صورة صالحة. الملف الذي قمت برفعه ليس صورة أو أنه ملف تالف." #: fields.py:1604 relations.py:486 serializers.py:571 msgid "This list may not be empty." -msgstr "القائمة يجب أن لا تكون فارغة." +msgstr "يجب أن لا تكون القائمة فارغة." #: fields.py:1605 #, python-brace-format msgid "Ensure this field has at least {min_length} elements." -msgstr "" +msgstr "تأكد ان عدد العناصر في هذا الحقل لا يقل عن {min_length}." #: fields.py:1606 #, python-brace-format msgid "Ensure this field has no more than {max_length} elements." -msgstr "" +msgstr "تأكد ان عدد العناصر في هذا الحقل لا يتجاوز {max_length}." #: fields.py:1682 #, python-brace-format @@ -369,7 +370,7 @@ msgstr "المتوقع كان قاموس عناصر و لكن النوع الم #: fields.py:1683 msgid "This dictionary may not be empty." -msgstr "" +msgstr "يجب أن لا يكون القاموس فارغاً." #: fields.py:1755 msgid "Value must be valid JSON." @@ -381,7 +382,7 @@ msgstr "بحث" #: filters.py:50 msgid "A search term." -msgstr "" +msgstr "مصطلح البحث." #: filters.py:180 templates/rest_framework/filters/ordering.html:3 msgid "Ordering" @@ -389,7 +390,7 @@ msgstr "الترتيب" #: filters.py:181 msgid "Which field to use when ordering the results." -msgstr "" +msgstr "أي حقل يجب استخدامه عند ترتيب النتائج." #: filters.py:287 msgid "ascending" @@ -401,11 +402,11 @@ msgstr "تنازلي" #: pagination.py:174 msgid "A page number within the paginated result set." -msgstr "" +msgstr "رقم الصفحة ضمن النتائج المقسمة." #: pagination.py:179 pagination.py:372 pagination.py:590 msgid "Number of results to return per page." -msgstr "" +msgstr "عدد النتائج التي يجب إرجاعها في كل صفحة." #: pagination.py:189 msgid "Invalid page." @@ -413,11 +414,11 @@ msgstr "صفحة غير صحيحة." #: pagination.py:374 msgid "The initial index from which to return the results." -msgstr "" +msgstr "الفهرس الأولي الذي يجب البدء منه لإرجاع النتائج." #: pagination.py:581 msgid "The pagination cursor value." -msgstr "" +msgstr "قيمة المؤشر للتقسيم." #: pagination.py:583 msgid "Invalid cursor" @@ -431,24 +432,24 @@ msgstr "معرف العنصر \"{pk_value}\" غير صالح - العنصر غ #: relations.py:247 #, python-brace-format msgid "Incorrect type. Expected pk value, received {data_type}." -msgstr "نوع خاطئ. المتوقع قيمة من pk، لكن المتحصل عليه {data_type}." +msgstr "نوع غير صحيح. يتوقع قيمة معرف العنصر، بينما حصل على {data_type}." #: relations.py:280 msgid "Invalid hyperlink - No URL match." -msgstr "إرتباط تشعبي غير صالح - لا مطابقة لURL." +msgstr "رابط تشعبي غير صالح - لا يوجد تطابق URL." #: relations.py:281 msgid "Invalid hyperlink - Incorrect URL match." -msgstr "إرتباط تشعبي غير صالح - مطابقة خاطئة لURL." +msgstr "رابط تشعبي غير صالح - تطابق URL غير صحيح." #: relations.py:282 msgid "Invalid hyperlink - Object does not exist." -msgstr "إرتباط تشعبي غير صالح - عنصر غير موجود." +msgstr "رابط تشعبي غير صالح - العنصر غير موجود." #: relations.py:283 #, python-brace-format msgid "Incorrect type. Expected URL string, received {data_type}." -msgstr "نوع خاطئ. المتوقع سلسلة URL، لكن المتحصل عليه {data_type}." +msgstr "نوع غير صحيح. المتوقع هو رابط URL، ولكن تم الحصول على {data_type}." #: relations.py:448 #, python-brace-format @@ -461,20 +462,20 @@ msgstr "قيمة غير صالحة." #: schemas/utils.py:32 msgid "unique integer value" -msgstr "" +msgstr "رقم صحيح فريد" #: schemas/utils.py:34 msgid "UUID string" -msgstr "" +msgstr "نص UUID" #: schemas/utils.py:36 msgid "unique value" -msgstr "" +msgstr "قيمة فريدة" #: schemas/utils.py:38 #, python-brace-format msgid "A {value_type} identifying this {name}." -msgstr "" +msgstr "نوع {value_type} يحدد هذا {name}." #: serializers.py:337 #, python-brace-format @@ -484,7 +485,7 @@ msgstr "معطيات غير صالحة. المتوقع هو قاموس، لكن #: templates/rest_framework/admin.html:116 #: templates/rest_framework/base.html:136 msgid "Extra Actions" -msgstr "" +msgstr "إجراءات إضافية" #: templates/rest_framework/admin.html:130 #: templates/rest_framework/base.html:150 @@ -493,27 +494,27 @@ msgstr "مرشحات" #: templates/rest_framework/base.html:37 msgid "navbar" -msgstr "" +msgstr "شريط التنقل" #: templates/rest_framework/base.html:75 msgid "content" -msgstr "" +msgstr "المحتوى" #: templates/rest_framework/base.html:78 msgid "request form" -msgstr "" +msgstr "نموذج الطلب" #: templates/rest_framework/base.html:157 msgid "main content" -msgstr "" +msgstr "المحتوى الرئيسي" #: templates/rest_framework/base.html:173 msgid "request info" -msgstr "" +msgstr "معلومات الطلب" #: templates/rest_framework/base.html:177 msgid "response info" -msgstr "" +msgstr "معلومات الرد" #: templates/rest_framework/horizontal/radio.html:4 #: templates/rest_framework/inline/radio.html:3 @@ -525,7 +526,7 @@ msgstr "لا شيء" #: templates/rest_framework/inline/select_multiple.html:3 #: templates/rest_framework/vertical/select_multiple.html:3 msgid "No items to select." -msgstr "ما من عناصر للتحديد." +msgstr "لا يوجد عناصر لتحديدها." #: validators.py:39 msgid "This field must be unique." @@ -539,7 +540,7 @@ msgstr "الحقول {field_names} يجب أن تشكل مجموعة فريدة. #: validators.py:171 #, python-brace-format msgid "Surrogate characters are not allowed: U+{code_point:X}." -msgstr "" +msgstr "لا يُسمح بالحروف البديلة: U+{code_point:X}." #: validators.py:243 #, python-brace-format @@ -558,11 +559,11 @@ msgstr "الحقل يجب ان يكون فريد للعام {date_field}." #: versioning.py:40 msgid "Invalid version in \"Accept\" header." -msgstr "إصدار غير صالح في الرٱس \"Accept\"." +msgstr "إصدار غير صالح في ترويسة \"Accept\"." #: versioning.py:71 msgid "Invalid version in URL path." -msgstr "إصدار غير صالح في المسار URL." +msgstr "نسخة غير صالحة في مسار URL." #: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." From 376026ce353faee992e7293ef61f19146230f755 Mon Sep 17 00:00:00 2001 From: rezatn0934 <96861572+rezatn0934@users.noreply.github.com> Date: Sat, 26 Apr 2025 18:28:29 +0330 Subject: [PATCH 03/15] Update persian translations (#9576) --- .../locale/fa/LC_MESSAGES/django.mo | Bin 11976 -> 14921 bytes .../locale/fa/LC_MESSAGES/django.po | 58 +++++++++--------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/rest_framework/locale/fa/LC_MESSAGES/django.mo b/rest_framework/locale/fa/LC_MESSAGES/django.mo index 099318e69a178c32d30b3ddcefbec1a8579d8d55..53b8fd98e9f9f197eafae4ceeac27f9474d8a643 100644 GIT binary patch delta 5059 zcmbW2du)~E9mk&*lu|C`BBfNsM*+E)0Sby2F5(3dMX-uGEvG$i+r!SKo(rYa?tr1R z+lt%r#<>`Wi_2C(ped&e_`?gvMNP<@S+c!{W)n9P$ux6Ymd#AmeZKE`50}g>+n)4y zKF|BS&-;6R*Qakj`c^vo+i^pmHjEBrGBR|iF}?7kVf-+<%Z;({8*n<@4{P8r;Ar>- ztb(IQ6uzGUFXwp`oB=mMwwP`>54vzJJOMc(YyQY&B@2Ipx5FDo78GrVdj0{t1HKQJ z!?~l3c>u=X68Jj24xWWK!i89M1B}Bpa4%d6{|dE#euXi2!zMVD^UVO0aV&UH5%|!5 zVNBT=ZQwvC#p|FB>VebXYfusS0CKh&HP-jYTn@E973$#C@OrotE`u+@Tj6K0hV#t| zPRBUY0<|#<=fh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OZ1zJxWk6lN=#G)jCo3q;)51WFeZdE@J_77@wgRr|9;HHH!z47u?RoILcE2e zF`Q^j4Hn~K-0m7R=jklrf{$NU<1$=>2e2H!#VX86GNuljuo7QJeg8Es$E;*yrs6}G zfqPLCJmOt{$8!YryuY!`M2)FPac9_#TH#LAKRAl>F@_OLPc>!{HsUNijQp7o`Otlz zV;Gai7?X!(Sb%GhN0=wE7!Tnrd>@zb|IIIS7Gh!uoKV;z!4^O$EJ z>H!0&GI_<)L1ZoFj7>~Kx?nLr%CgU*9!PVG|`%nwJhBTx6XVLN`0{a80y~b1A6`#TFj4$I|SVP6?obSO1UP9GC!ZbH^ zA>{W_(?+L*FD~K+EMVH&$^*Cn2T|2~6N@mI?;fl9sEM~>AzntU^cE_&B|L;|m<7n3 zOcOE((~FDoMakcAT@Um1|NVLhS+KUP3EW zeNY}|Em23PCAm1KM!TbS50UEh+}bKs{{P>!`eyHfwwzjWa;S>V@~-PWK*~)Ep*qoV z)4PLLgjqqTDGfTFO~h1!N;k_0j=j^C@>xwJ>;LBw%Cj1Wz^MiGN9n_B^Kmwz%AM?8 zQ_6Tfn04Nm`Z6oM{zBvx;j~&$K_;Er;5FeCW0{VK&gJbEPbc&C02_#iH}+!=Rh5}+{gu&a_hi=itsB|B@$KC`U7M_< zV|Q6A$CX)E#4r v_Ql?gy=e{2`P8~Lx86Ee@{IjN=>@-CSAN82MJnop`(lG5PmlCnJ!t*~u5}22 diff --git a/rest_framework/locale/fa/LC_MESSAGES/django.po b/rest_framework/locale/fa/LC_MESSAGES/django.po index fd7001d32..8d76372fa 100644 --- a/rest_framework/locale/fa/LC_MESSAGES/django.po +++ b/rest_framework/locale/fa/LC_MESSAGES/django.po @@ -105,7 +105,7 @@ msgstr "خطای سمت سرور رخ داده است." #: exceptions.py:142 msgid "Invalid input." -msgstr "" +msgstr "ورودی نامعتبر" #: exceptions.py:161 msgid "Malformed request." @@ -148,12 +148,12 @@ msgstr "تعداد درخواست‌های شما محدود شده است." #: exceptions.py:224 #, python-brace-format msgid "Expected available in {wait} second." -msgstr "" +msgstr "انتظار می‌رود در {wait} ثانیه در دسترس باشد." #: exceptions.py:225 #, python-brace-format msgid "Expected available in {wait} seconds." -msgstr "" +msgstr "انتظار می‌رود در {wait} ثانیه در دسترس باشد." #: fields.py:316 relations.py:245 relations.py:279 validators.py:90 #: validators.py:183 @@ -166,11 +166,11 @@ msgstr "این مقدار نباید توهی باشد." #: fields.py:701 msgid "Must be a valid boolean." -msgstr "" +msgstr "باید یک مقدار منطقی(بولی) معتبر باشد." #: fields.py:766 msgid "Not a valid string." -msgstr "" +msgstr "یک رشته معتبر نیست." #: fields.py:767 msgid "This field may not be blank." @@ -212,7 +212,7 @@ msgstr "یک URL معتبر وارد کنید" #: fields.py:867 msgid "Must be a valid UUID." -msgstr "" +msgstr "باید یک UUID معتبر باشد." #: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." @@ -270,11 +270,11 @@ msgstr "باید datetime باشد اما date دریافت شد." #: fields.py:1150 #, python-brace-format msgid "Invalid datetime for the timezone \"{timezone}\"." -msgstr "" +msgstr "تاریخ و زمان برای منطقه زمانی \"{timezone}\" نامعتبر است." #: fields.py:1151 msgid "Datetime value out of range." -msgstr "" +msgstr "مقدار تاریخ و زمان خارج از محدوده است." #: fields.py:1236 #, python-brace-format @@ -355,12 +355,12 @@ msgstr "این لیست نمی تواند خالی باشد" #: fields.py:1605 #, python-brace-format msgid "Ensure this field has at least {min_length} elements." -msgstr "" +msgstr "اطمینان حاصل کنید که این فیلد حداقل {min_length} عنصر دارد." #: fields.py:1606 #, python-brace-format msgid "Ensure this field has no more than {max_length} elements." -msgstr "" +msgstr "اطمینان حاصل کنید که این فیلد بیش از {max_length} عنصر ندارد." #: fields.py:1682 #, python-brace-format @@ -369,7 +369,7 @@ msgstr "باید دیکشنری از آیتم ها ارسال می شد، اما #: fields.py:1683 msgid "This dictionary may not be empty." -msgstr "" +msgstr "این دیکشنری نمی‌تواند خالی باشد." #: fields.py:1755 msgid "Value must be valid JSON." @@ -381,7 +381,7 @@ msgstr "جستجو" #: filters.py:50 msgid "A search term." -msgstr "" +msgstr "یک عبارت جستجو." #: filters.py:180 templates/rest_framework/filters/ordering.html:3 msgid "Ordering" @@ -389,7 +389,7 @@ msgstr "ترتیب" #: filters.py:181 msgid "Which field to use when ordering the results." -msgstr "" +msgstr "کدام فیلد باید هنگام مرتب‌سازی نتایج استفاده شود." #: filters.py:287 msgid "ascending" @@ -401,11 +401,11 @@ msgstr "نزولی" #: pagination.py:174 msgid "A page number within the paginated result set." -msgstr "" +msgstr "یک شماره صفحه‌ در مجموعه نتایج صفحه‌بندی شده." #: pagination.py:179 pagination.py:372 pagination.py:590 msgid "Number of results to return per page." -msgstr "" +msgstr "تعداد نتایج برای نمایش در هر صفحه." #: pagination.py:189 msgid "Invalid page." @@ -413,11 +413,11 @@ msgstr "صفحه نامعتبر" #: pagination.py:374 msgid "The initial index from which to return the results." -msgstr "" +msgstr "ایندکس اولیه‌ای که از آن نتایج بازگردانده می‌شود." #: pagination.py:581 msgid "The pagination cursor value." -msgstr "" +msgstr "مقدار نشانگر صفحه‌بندی." #: pagination.py:583 msgid "Invalid cursor" @@ -461,20 +461,20 @@ msgstr "مقدار نامعتبر." #: schemas/utils.py:32 msgid "unique integer value" -msgstr "" +msgstr "مقداد عدد یکتا" #: schemas/utils.py:34 msgid "UUID string" -msgstr "" +msgstr "رشته UUID" #: schemas/utils.py:36 msgid "unique value" -msgstr "" +msgstr "مقدار یکتا" #: schemas/utils.py:38 #, python-brace-format msgid "A {value_type} identifying this {name}." -msgstr "" +msgstr "یک {value_type} که این {name} را شناسایی میکند." #: serializers.py:337 #, python-brace-format @@ -484,7 +484,7 @@ msgstr "داده نامعتبر. باید دیکشنری ارسال می شد، #: templates/rest_framework/admin.html:116 #: templates/rest_framework/base.html:136 msgid "Extra Actions" -msgstr "" +msgstr "اقدامات اضافی" #: templates/rest_framework/admin.html:130 #: templates/rest_framework/base.html:150 @@ -493,27 +493,27 @@ msgstr "فیلترها" #: templates/rest_framework/base.html:37 msgid "navbar" -msgstr "" +msgstr "نوار ناوبری" #: templates/rest_framework/base.html:75 msgid "content" -msgstr "" +msgstr "محتوا" #: templates/rest_framework/base.html:78 msgid "request form" -msgstr "" +msgstr "فرم درخواست" #: templates/rest_framework/base.html:157 msgid "main content" -msgstr "" +msgstr "محتوای اصلی" #: templates/rest_framework/base.html:173 msgid "request info" -msgstr "" +msgstr "اطلاعات درخواست" #: templates/rest_framework/base.html:177 msgid "response info" -msgstr "" +msgstr "اطلاعات پاسخ" #: templates/rest_framework/horizontal/radio.html:4 #: templates/rest_framework/inline/radio.html:3 @@ -539,7 +539,7 @@ msgstr "فیلدهای {field_names} باید یک مجموعه یکتا باش #: validators.py:171 #, python-brace-format msgid "Surrogate characters are not allowed: U+{code_point:X}." -msgstr "" +msgstr "کاراکترهای جایگزین مجاز نیستند: U+{code_point:X}." #: validators.py:243 #, python-brace-format From 78e97074e7c823ef9c693e4b63ac1e5c6e41ff81 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 28 Apr 2025 05:08:48 +0100 Subject: [PATCH 04/15] Drop HTML line breaks on long headers in browsable API (#9438) * Drop HTML line breaks on long headers * Remove related test * Fix flake8 --------- Co-authored-by: Asif Saif Uddin Co-authored-by: Bruno Alla --- rest_framework/templates/rest_framework/base.html | 2 +- rest_framework/templatetags/rest_framework.py | 11 ----------- tests/test_templatetags.py | 9 ++------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index 7f16482b7..e261d8c9d 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -176,7 +176,7 @@
HTTP {{ response.status_code }} {{ response.status_text }}{% for key, val in response_headers|items %}
-{{ key }}: {{ val|break_long_headers|urlize }}{% endfor %}
+{{ key }}: {{ val|urlize }}{% endfor %}
 
 {{ content|urlize }}
diff --git a/rest_framework/templatetags/rest_framework.py b/rest_framework/templatetags/rest_framework.py index dba8153b1..3ff74e7cc 100644 --- a/rest_framework/templatetags/rest_framework.py +++ b/rest_framework/templatetags/rest_framework.py @@ -313,14 +313,3 @@ def smart_urlquote_wrapper(matched_url): return smart_urlquote(matched_url) except ValueError: return None - - -@register.filter -def break_long_headers(header): - """ - Breaks headers longer than 160 characters (~page length) - when possible (are comma separated) - """ - if len(header) > 160 and ',' in header: - header = mark_safe('
' + ',
'.join(escape(header).split(','))) - return header diff --git a/tests/test_templatetags.py b/tests/test_templatetags.py index 4b84f6647..7134c1bae 100644 --- a/tests/test_templatetags.py +++ b/tests/test_templatetags.py @@ -8,8 +8,8 @@ from rest_framework.compat import coreapi, coreschema from rest_framework.relations import Hyperlink from rest_framework.templatetags import rest_framework from rest_framework.templatetags.rest_framework import ( - add_nested_class, add_query_param, as_string, break_long_headers, - format_value, get_pagination_html, schema_links + add_nested_class, add_query_param, as_string, format_value, + get_pagination_html, schema_links ) from rest_framework.test import APIRequestFactory @@ -234,11 +234,6 @@ class TemplateTagTests(TestCase): get_pagination_html(pager) assert pager.called is True - def test_break_long_lines(self): - header = 'long test header,' * 20 - expected_header = '
' + ',
'.join(header.split(',')) - assert break_long_headers(header) == expected_header - class Issue1386Tests(TestCase): """ From 985dd732e058644f6e875de76205a392ce4241dd Mon Sep 17 00:00:00 2001 From: Rohit <130643902+Rohit10jr@users.noreply.github.com> Date: Thu, 1 May 2025 18:14:34 +0530 Subject: [PATCH 05/15] Fix broken Heroku JSON Schema link in schemas.md (#9693) Replaced the outdated Heroku JSON Schema reference URL, which was returning a 404 error, with the updated working link from the official Heroku blog. --- docs/api-guide/schemas.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-guide/schemas.md b/docs/api-guide/schemas.md index c387af972..0eee3c99f 100644 --- a/docs/api-guide/schemas.md +++ b/docs/api-guide/schemas.md @@ -451,7 +451,7 @@ If your views have related customizations that are needed frequently, you can create a base `AutoSchema` subclass for your project that takes additional `__init__()` kwargs to save subclassing `AutoSchema` for each view. -[cite]: https://blog.heroku.com/archives/2014/1/8/json_schema_for_heroku_platform_api +[cite]: https://www.heroku.com/blog/json_schema_for_heroku_platform_api/ [openapi]: https://github.com/OAI/OpenAPI-Specification [openapi-specification-extensions]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#specification-extensions [openapi-operation]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#operationObject From c0202a0aa5cbaf8573458b932878dfd5044c93ab Mon Sep 17 00:00:00 2001 From: Rohit <130643902+Rohit10jr@users.noreply.github.com> Date: Tue, 13 May 2025 19:40:21 +0530 Subject: [PATCH 06/15] Update Django documentation links to use stable version (#9698) Co-authored-by: Bruno Alla --- docs/api-guide/caching.md | 8 ++++---- docs/api-guide/exceptions.md | 2 +- docs/api-guide/fields.md | 2 +- docs/api-guide/filtering.md | 4 ++-- docs/api-guide/generic-views.md | 2 +- docs/api-guide/routers.md | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/api-guide/caching.md b/docs/api-guide/caching.md index c4ab215c8..4beea30d0 100644 --- a/docs/api-guide/caching.md +++ b/docs/api-guide/caching.md @@ -85,7 +85,7 @@ def get_user_list(request): **NOTE:** The [`cache_page`][page] decorator only caches the `GET` and `HEAD` responses with status 200. -[page]: https://docs.djangoproject.com/en/dev/topics/cache/#the-per-view-cache -[cookie]: https://docs.djangoproject.com/en/dev/topics/http/decorators/#django.views.decorators.vary.vary_on_cookie -[headers]: https://docs.djangoproject.com/en/dev/topics/http/decorators/#django.views.decorators.vary.vary_on_headers -[decorator]: https://docs.djangoproject.com/en/dev/topics/class-based-views/intro/#decorating-the-class +[page]: https://docs.djangoproject.com/en/stable/topics/cache/#the-per-view-cache +[cookie]: https://docs.djangoproject.com/en/stable/topics/http/decorators/#django.views.decorators.vary.vary_on_cookie +[headers]: https://docs.djangoproject.com/en/stable/topics/http/decorators/#django.views.decorators.vary.vary_on_headers +[decorator]: https://docs.djangoproject.com/en/stable/topics/class-based-views/intro/#decorating-the-class diff --git a/docs/api-guide/exceptions.md b/docs/api-guide/exceptions.md index 33590046b..4a31828a0 100644 --- a/docs/api-guide/exceptions.md +++ b/docs/api-guide/exceptions.md @@ -269,5 +269,5 @@ The [drf-standardized-errors][drf-standardized-errors] package provides an excep [cite]: https://doughellmann.com/blog/2009/06/19/python-exception-handling-techniques/ [authentication]: authentication.md -[django-custom-error-views]: https://docs.djangoproject.com/en/dev/topics/http/views/#customizing-error-views +[django-custom-error-views]: https://docs.djangoproject.com/en/stable/topics/http/views/#customizing-error-views [drf-standardized-errors]: https://github.com/ghazi-git/drf-standardized-errors diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md index 3225191f1..d2e6b67e8 100644 --- a/docs/api-guide/fields.md +++ b/docs/api-guide/fields.md @@ -857,4 +857,4 @@ The [django-rest-framework-hstore][django-rest-framework-hstore] package provide [django-hstore]: https://github.com/djangonauts/django-hstore [python-decimal-rounding-modes]: https://docs.python.org/3/library/decimal.html#rounding-modes [django-current-timezone]: https://docs.djangoproject.com/en/stable/topics/i18n/timezones/#default-time-zone-and-current-time-zone -[django-docs-select-related]: https://docs.djangoproject.com/en/3.1/ref/models/querysets/#django.db.models.query.QuerySet.select_related +[django-docs-select-related]: https://docs.djangoproject.com/en/stable/ref/models/querysets/#django.db.models.query.QuerySet.select_related diff --git a/docs/api-guide/filtering.md b/docs/api-guide/filtering.md index ff5f3c775..6c80dc754 100644 --- a/docs/api-guide/filtering.md +++ b/docs/api-guide/filtering.md @@ -367,6 +367,6 @@ The [djangorestframework-word-filter][django-rest-framework-word-search-filter] [django-rest-framework-word-search-filter]: https://github.com/trollknurr/django-rest-framework-word-search-filter [django-url-filter]: https://github.com/miki725/django-url-filter [drf-url-filter]: https://github.com/manjitkumar/drf-url-filters -[HStoreField]: https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#hstorefield -[JSONField]: https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#jsonfield +[HStoreField]: https://docs.djangoproject.com/en/stable/ref/contrib/postgres/fields/#hstorefield +[JSONField]: https://docs.djangoproject.com/en/stable/ref/models/fields/#django.db.models.JSONField [postgres-search]: https://docs.djangoproject.com/en/stable/ref/contrib/postgres/search/ diff --git a/docs/api-guide/generic-views.md b/docs/api-guide/generic-views.md index 410e3518d..62a27263c 100644 --- a/docs/api-guide/generic-views.md +++ b/docs/api-guide/generic-views.md @@ -395,4 +395,4 @@ The following third party packages provide additional generic view implementatio [UpdateModelMixin]: #updatemodelmixin [DestroyModelMixin]: #destroymodelmixin [django-rest-multiple-models]: https://github.com/MattBroach/DjangoRestMultipleModels -[django-docs-select-related]: https://docs.djangoproject.com/en/3.1/ref/models/querysets/#django.db.models.query.QuerySet.select_related +[django-docs-select-related]: https://docs.djangoproject.com/en/stable/ref/models/querysets/#django.db.models.query.QuerySet.select_related diff --git a/docs/api-guide/routers.md b/docs/api-guide/routers.md index d6bdeb235..d2be3991f 100644 --- a/docs/api-guide/routers.md +++ b/docs/api-guide/routers.md @@ -350,6 +350,6 @@ The [`DRF-extensions` package][drf-extensions] provides [routers][drf-extensions [drf-extensions-nested-viewsets]: https://chibisov.github.io/drf-extensions/docs/#nested-routes [drf-extensions-collection-level-controllers]: https://chibisov.github.io/drf-extensions/docs/#collection-level-controllers [drf-extensions-customizable-endpoint-names]: https://chibisov.github.io/drf-extensions/docs/#controller-endpoint-name -[url-namespace-docs]: https://docs.djangoproject.com/en/4.0/topics/http/urls/#url-namespaces -[include-api-reference]: https://docs.djangoproject.com/en/4.0/ref/urls/#include -[path-converters-topic-reference]: https://docs.djangoproject.com/en/2.0/topics/http/urls/#path-converters +[url-namespace-docs]: https://docs.djangoproject.com/en/stable/topics/http/urls/#url-namespaces +[include-api-reference]: https://docs.djangoproject.com/en/stable/ref/urls/#include +[path-converters-topic-reference]: https://docs.djangoproject.com/en/stable/topics/http/urls/#path-converters From 33d59fefaa5af04f4bed9312239eb1e5e6def2a2 Mon Sep 17 00:00:00 2001 From: Federico Bond Date: Sun, 25 May 2025 20:07:43 +1000 Subject: [PATCH 07/15] Update Spanish translations (#9701) --- .../locale/es/LC_MESSAGES/django.mo | Bin 10627 -> 12902 bytes .../locale/es/LC_MESSAGES/django.po | 52 +++++++++--------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/rest_framework/locale/es/LC_MESSAGES/django.mo b/rest_framework/locale/es/LC_MESSAGES/django.mo index 16df627fcc901ed5fb7307de1b195c5672dad071..77fe3faec35adc2320fb594953a1770dc60040ed 100644 GIT binary patch delta 4304 zcmb7_TWl298Gz4%F~&9+JHa-Wz`Gd&VL_&cgH_s>1!1QKT?blWDat5qEc_dqm%hzR2M6y;Y?TyTVW$S0H?uM zVKqDn<^6ZyY^ic-@whV1uI+O5h&+>1AE|2xCQ-cYZ+Ft@e^19FF-Ni z58?jxkQLK&3RXc;n1l=AX(*Ao4AH6n2_<-u^4$IuCasnGfX7w?k3912#be%6&h8o$x*QI4pTEcfJ$OV!a2Z zMWM??BJdq3p1%bpCE0LYI3xFb0i-ipF(&IR>3czMBp}D0UOyA zhkBvZP&!;+gc8ZmtB5~yRfxHAa4wYUT?1Fa-SAO(EL?v8#nanR&Q;IMd9)IWp*>I{ z_Y#~0KZIi76-ZsHKf*frDO?Vxrnzk|lXXxc@do6XItj(&cf<92uz~d_@DVr#?Ni`m zP$ISwk}cH@X$;i|--(b~xQKP#L%EvR4%=A22t`ji%S4LnuTVl>NJ8hqdRPy)K#9;O zTnUfEweSNdH86?8J+K-+4Q(j*T!P}*4JZmbb&lVM-K;OecIp3lBw_;_F)00i8g{@N z(16V~cnMz%c@-XDT~5XBf=MXVehK2Nx&>Fm2kA{oNf(soFF>h*vrtm>FSuO#zXfw8 zq=T>wo`BN7XQAZk99#!Kg-^lx#Pb<=5Q^uQVFz45snhz(f*auTPz<>MTj4Dz#kqoT zFNHB!fqr#NCh!!L7k&lhg6mL1^$4fi;SnebEkcRqZgXne;J{>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L$fds_3Pd;YUV>cRe<=al~FJzF=>Zj0ImVz2yWa%8DI(tGwf1mHYg{ diff --git a/rest_framework/locale/es/LC_MESSAGES/django.po b/rest_framework/locale/es/LC_MESSAGES/django.po index a2f7f1a43..b56fa8014 100644 --- a/rest_framework/locale/es/LC_MESSAGES/django.po +++ b/rest_framework/locale/es/LC_MESSAGES/django.po @@ -10,12 +10,13 @@ # Miguel Gonzalez , 2016 # Miguel Gonzalez , 2015-2016 # Sergio Infante , 2015 +# Federico Bond , 2025 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-10-13 21:45+0200\n" -"PO-Revision-Date: 2020-10-13 19:45+0000\n" +"PO-Revision-Date: 2025-05-19 00:05+1000\n" "Last-Translator: Xavier Ordoquy \n" "Language-Team: Spanish (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/es/)\n" "MIME-Version: 1.0\n" @@ -107,7 +108,7 @@ msgstr "Se ha producido un error en el servidor." #: exceptions.py:142 msgid "Invalid input." -msgstr "" +msgstr "Entrada inválida." #: exceptions.py:161 msgid "Malformed request." @@ -150,12 +151,12 @@ msgstr "Solicitud fue regulada (throttled)." #: exceptions.py:224 #, python-brace-format msgid "Expected available in {wait} second." -msgstr "" +msgstr "Se espera que esté disponible en {wait} segundo." #: exceptions.py:225 #, python-brace-format msgid "Expected available in {wait} seconds." -msgstr "" +msgstr "Se espera que esté disponible en {wait} segundos." #: fields.py:316 relations.py:245 relations.py:279 validators.py:90 #: validators.py:183 @@ -168,11 +169,11 @@ msgstr "Este campo no puede ser nulo." #: fields.py:701 msgid "Must be a valid boolean." -msgstr "" +msgstr "Debe ser un booleano válido." #: fields.py:766 msgid "Not a valid string." -msgstr "" +msgstr "No es una cadena válida." #: fields.py:767 msgid "This field may not be blank." @@ -204,9 +205,8 @@ msgstr "Introduzca un \"slug\" válido consistente en letras, números, guiones #: fields.py:839 msgid "" -"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " -"or hyphens." -msgstr "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, or hyphens." +msgstr "Introduzca un “slug” válido compuesto por letras Unicode, números, guiones bajos o medios." #: fields.py:854 msgid "Enter a valid URL." @@ -214,7 +214,7 @@ msgstr "Introduzca una URL válida." #: fields.py:867 msgid "Must be a valid UUID." -msgstr "" +msgstr "Debe ser un UUID válido." #: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." @@ -272,11 +272,11 @@ msgstr "Se esperaba un fecha/hora en vez de una fecha." #: fields.py:1150 #, python-brace-format msgid "Invalid datetime for the timezone \"{timezone}\"." -msgstr "" +msgstr "Fecha y hora inválida para la zona horaria \"{timezone}\"." #: fields.py:1151 msgid "Datetime value out of range." -msgstr "" +msgstr "Valor de fecha y hora fuera de rango." #: fields.py:1236 #, python-brace-format @@ -357,12 +357,12 @@ msgstr "Esta lista no puede estar vacía." #: fields.py:1605 #, python-brace-format msgid "Ensure this field has at least {min_length} elements." -msgstr "" +msgstr "Asegúrese de que este campo tiene al menos {min_length} elementos." #: fields.py:1606 #, python-brace-format msgid "Ensure this field has no more than {max_length} elements." -msgstr "" +msgstr "Asegúrese de que este campo no tiene más de {max_length} elementos." #: fields.py:1682 #, python-brace-format @@ -371,7 +371,7 @@ msgstr "Se esperaba un diccionario de elementos en vez del tipo \"{input_type}\" #: fields.py:1683 msgid "This dictionary may not be empty." -msgstr "" +msgstr "Este diccionario no debe estar vacío." #: fields.py:1755 msgid "Value must be valid JSON." @@ -383,7 +383,7 @@ msgstr "Buscar" #: filters.py:50 msgid "A search term." -msgstr "" +msgstr "Un término de búsqueda." #: filters.py:180 templates/rest_framework/filters/ordering.html:3 msgid "Ordering" @@ -391,7 +391,7 @@ msgstr "Ordenamiento" #: filters.py:181 msgid "Which field to use when ordering the results." -msgstr "" +msgstr "Qué campo usar para ordenar los resultados." #: filters.py:287 msgid "ascending" @@ -403,11 +403,11 @@ msgstr "descendiente" #: pagination.py:174 msgid "A page number within the paginated result set." -msgstr "" +msgstr "Un número de página dentro del conjunto de resultados paginado." #: pagination.py:179 pagination.py:372 pagination.py:590 msgid "Number of results to return per page." -msgstr "" +msgstr "Número de resultados a devolver por página." #: pagination.py:189 msgid "Invalid page." @@ -415,11 +415,11 @@ msgstr "Página inválida." #: pagination.py:374 msgid "The initial index from which to return the results." -msgstr "" +msgstr "El índice inicial a partir del cual devolver los resultados." #: pagination.py:581 msgid "The pagination cursor value." -msgstr "" +msgstr "El valor del cursor de paginación." #: pagination.py:583 msgid "Invalid cursor" @@ -463,20 +463,20 @@ msgstr "Valor inválido." #: schemas/utils.py:32 msgid "unique integer value" -msgstr "" +msgstr "valor de entero único" #: schemas/utils.py:34 msgid "UUID string" -msgstr "" +msgstr "Cadena UUID" #: schemas/utils.py:36 msgid "unique value" -msgstr "" +msgstr "valor único" #: schemas/utils.py:38 #, python-brace-format msgid "A {value_type} identifying this {name}." -msgstr "" +msgstr "Un {value_type} que identifique este {name}." #: serializers.py:337 #, python-brace-format @@ -486,7 +486,7 @@ msgstr "Datos inválidos. Se esperaba un diccionario pero es un {datatype}." #: templates/rest_framework/admin.html:116 #: templates/rest_framework/base.html:136 msgid "Extra Actions" -msgstr "" +msgstr "Acciones extras" #: templates/rest_framework/admin.html:130 #: templates/rest_framework/base.html:150 From e454758fb6edf1dcf5aa5417a388b940c871469c Mon Sep 17 00:00:00 2001 From: Konstantin Alekseev Date: Tue, 10 Jun 2025 14:47:28 +0300 Subject: [PATCH 08/15] Fix regression in unique_together validation with SerializerMethodField (#9712) --- rest_framework/serializers.py | 3 ++- tests/test_validators.py | 37 +++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index 0b87aa8fc..8fe284bc8 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -1469,12 +1469,13 @@ class ModelSerializer(Serializer): model_field.unique_for_year} unique_constraint_names -= {None} + model_fields_names = set(model_fields.keys()) # Include each of the `unique_together` and `UniqueConstraint` field names, # so long as all the field names are included on the serializer. for unique_together_list, queryset, condition_fields, condition in self.get_unique_together_constraints(model): unique_together_list_and_condition_fields = set(unique_together_list) | set(condition_fields) - if set(field_names).issuperset(unique_together_list_and_condition_fields): + if model_fields_names.issuperset(unique_together_list_and_condition_fields): unique_constraint_names |= unique_together_list_and_condition_fields # Now we have all the field names that have uniqueness constraints diff --git a/tests/test_validators.py b/tests/test_validators.py index d19734d98..c594eecbe 100644 --- a/tests/test_validators.py +++ b/tests/test_validators.py @@ -516,6 +516,43 @@ class TestUniquenessTogetherValidation(TestCase): validator.filter_queryset(attrs=data, queryset=queryset, serializer=serializer) assert queryset.called_with == {'race_name': 'bar', 'position': 1} + def test_uniq_together_validation_uses_model_fields_method_field(self): + class TestSerializer(serializers.ModelSerializer): + position = serializers.SerializerMethodField() + + def get_position(self, obj): + return obj.position or 0 + + class Meta: + model = NullUniquenessTogetherModel + fields = ['race_name', 'position'] + + serializer = TestSerializer() + expected = dedent(""" + TestSerializer(): + race_name = CharField(max_length=100) + position = SerializerMethodField() + """) + assert repr(serializer) == expected + + def test_uniq_together_validation_uses_model_fields_with_source_field(self): + class TestSerializer(serializers.ModelSerializer): + pos = serializers.IntegerField(source='position') + + class Meta: + model = NullUniquenessTogetherModel + fields = ['race_name', 'pos'] + + serializer = TestSerializer() + expected = dedent(""" + TestSerializer(): + race_name = CharField(max_length=100, required=True) + pos = IntegerField(source='position') + class Meta: + validators = [] + """) + assert repr(serializer) == expected + class UniqueConstraintModel(models.Model): race_name = models.CharField(max_length=100) From 4bb46c2949fc67a1f8e74c43776833d81df471ed Mon Sep 17 00:00:00 2001 From: Dulat Kushibayev <4339845+kushibayev@users.noreply.github.com> Date: Wed, 25 Jun 2025 10:30:54 +0300 Subject: [PATCH 09/15] Add Kazakh(kk) locale support (#9713) * Add Kazakh(kk) locale support * Header comment update * Refined a translation for improved contextual accuracy --- .../locale/kk/LC_MESSAGES/django.mo | Bin 0 -> 16249 bytes .../locale/kk/LC_MESSAGES/django.po | 578 ++++++++++++++++++ 2 files changed, 578 insertions(+) create mode 100644 rest_framework/locale/kk/LC_MESSAGES/django.mo create mode 100644 rest_framework/locale/kk/LC_MESSAGES/django.po diff --git a/rest_framework/locale/kk/LC_MESSAGES/django.mo b/rest_framework/locale/kk/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..069aa206511195838ed239b82b2d4a7721918aa7 GIT binary patch literal 16249 zcmchddvqLEeaDC5kYYk9;TghXqCy)IOL0OH5+x3K*a3$)NgX*Myv%5KBn{f#5xcXp zg%H>YO;bWkLy6iXJd;vrf!dB^2isB%{iBrr!I@R~qdoMLLn)8ab4pM7hjV&3?dSWu zGqbbOO15!ekFUP-xc7H|_xHYc{I6%Pd(h*zhxSUfb)NSX;cxPXU%KA&e6Rz)4*VZ* z2z>eTJny%_H-j$+?*KJE2G0dQ3jQAWMUWw03J!wb0XKlpJLfjhY0 z2i^>x@!OvFJK%QkY;YRX{C|`^|EmoD5fuIZ0yWzhbsfo` ze;w5PKLW1+2bknS@Ezcrz&`|U0KWkafzNx9lj|_3{#(I|z`Mco!NE#RA{ZF#@ zXTH?)p3UPwd$|IXTyFri{s@#wK9u33py+)Gd=B_`Apg8?^5>1<_dv_9|vC#{wKHve2MRQRq!1kuH=0UY=Iqc7r5m-7Y7!> zIqugDpbPMB@H+7O;57I;j8*>qN$_^?$KZDGYMgQh_%U!4`~mnT@GTgV`rijW1b!Qw z2OGcZ;>sBqDWts{!E3b@u*tP~-0f&jt^Jn27gH z@I~N%fYRG9z?;EMmpMEB2q=F49Mt$Pg6qM50#S+geQ*Rk3uApd7=Sl{3*fuKGjZNq z!7*?KJPcwA-bRd-q23*!`1mL&`d? zTfiky^PGz?#OH&c`2Q^UeDDDHcJMej3cliMau_%Vz7+g9D1E&B`MC;X0@_VISdEQP?ex{$|jb!s$nq(q7s?j8e0op5QAEHVB`r!iJZL|grvD#0z zq#tH&c?vhQIH70yJ==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kH@leR}I@SgJaC>p6Kf~i0=IOh;;o` zI%~g}=PKBv3fJK^E~nzPd*06isq5Czpmbn|(CKm2-@Xy2RA9d+Qfy*e2!Tkh;PSU; zSqX;V4iD{Xw78ZPBUX+TZ7{*QzoV_>R9Y&T9z~oTCyJ(RE8J-|9%m}CdbH3T?9QY3 zuFqNYUs3q@YznetuiOiKyf)h>D7Uz8BE{AKmE=_`OO;1RIFhRl#hH;4oW3)6C$fA^ zuLtZHucsiEXjDd;gz%0&$8>H~9S+wFhUv=yx zcBS>ol9t)6EznH0950uXM>A$MvYBU`_+dq_XO4V+xOp1O&n-d`S|7p|Ocf_(4;W(U zyWuHn-Lix`r(tTh#n*0J-d5i6^s8JRQ}7{XQ@a$OiR882`T!46nBU8W@YBjdrHHZ>iCYLguFH^)h@R06i-UGhl$4aktGW|emb8&>8`Yh zZaqUYjgW0~~ySLCaCH_IDD+gYByxLSDD7KOC*5W zq6g?Jmold>k`8h?LzIZ53i>1Zd1-7iQn0MYDTU orn<58M(&=MZ%$R(5OchuuS+Z5Esy%k4;AxD%UhlwtOE1?A69#59{>OV literal 0 HcmV?d00001 diff --git a/rest_framework/locale/kk/LC_MESSAGES/django.po b/rest_framework/locale/kk/LC_MESSAGES/django.po new file mode 100644 index 000000000..e781e06ec --- /dev/null +++ b/rest_framework/locale/kk/LC_MESSAGES/django.po @@ -0,0 +1,578 @@ +# This file is distributed under the same license as the Django REST framework package. +# Translators: +# Dulat Kushibayev , 2025 +# +msgid "" +msgstr "" +"Project-Id-Version: Django REST framework\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-06-01 23:03+0300\n" +"PO-Revision-Date: 2025-06-01 20:03+0000\n" +"Last-Translator: Dulat Kushibayev \n" +"Language-Team: \n" +"Language: kk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" +#: authentication.py:70 +msgid "Invalid basic header. No credentials provided." +msgstr "Негізгі тақырыптама дұрыс емес. Тіркелгі деректері берілмеген." + +#: authentication.py:73 +msgid "Invalid basic header. Credentials string should not contain spaces." +msgstr "Негізгі тақырыптама дұрыс емес. Тіркелгі деректері бос орындарсыз болуы керек." + +#: authentication.py:84 +msgid "Invalid basic header. Credentials not correctly base64 encoded." +msgstr "Негізгі тақырыптама дұрыс емес. Тіркелгі деректері base64 форматында дұрыс кодталмаған." + +#: authentication.py:101 +msgid "Invalid username/password." +msgstr "Қате пайдаланушы аты немесе құпиясөз." + +#: authentication.py:104 authentication.py:206 +msgid "User inactive or deleted." +msgstr "Пайдаланушы өшірулі немесе жойылған." + +#: authentication.py:184 +msgid "Invalid token header. No credentials provided." +msgstr "Токен тақырыптамасы дұрыс емес. Тіркелгі деректері берілмеген." + +#: authentication.py:187 +msgid "Invalid token header. Token string should not contain spaces." +msgstr "Токен тақырыптамасы дұрыс емес. Токен жолында бос орын болмауы керек." + +#: authentication.py:193 +msgid "" +"Invalid token header. Token string should not contain invalid characters." +msgstr "Токен тақырыптамасы дұрыс емес. Токен құрамында жарамсыз таңбалар болмауы керек." + +#: authentication.py:203 +msgid "Invalid token." +msgstr "Жарамсыз токен." + +#: authtoken/admin.py:28 authtoken/serializers.py:9 +msgid "Username" +msgstr "Пайдаланушы аты" + +#: authtoken/apps.py:7 +msgid "Auth Token" +msgstr "Аутентификация токені" + +#: authtoken/models.py:13 +msgid "Key" +msgstr "Кілт" + +#: authtoken/models.py:16 +msgid "User" +msgstr "Пайдаланушы" + +#: authtoken/models.py:18 +msgid "Created" +msgstr "Құрылған" + +#: authtoken/models.py:27 authtoken/models.py:54 authtoken/serializers.py:19 +msgid "Token" +msgstr "Токен" + +#: authtoken/models.py:28 authtoken/models.py:55 +msgid "Tokens" +msgstr "Токендер" + +#: authtoken/serializers.py:13 +msgid "Password" +msgstr "Құпиясөз" + +#: authtoken/serializers.py:35 +msgid "Unable to log in with provided credentials." +msgstr "Берілген тіркелгі деректерімен кіру мүмкін емес." + +#: authtoken/serializers.py:38 +msgid "Must include \"username\" and \"password\"." +msgstr "\"username\" мен \"password\" енгізілуі керек." + +#: exceptions.py:105 +msgid "A server error occurred." +msgstr "Серверде қате орын алды." + +#: exceptions.py:145 +msgid "Invalid input." +msgstr "Қате енгізу деректері." + +#: exceptions.py:166 +msgid "Malformed request." +msgstr "Сұраныс дұрыс құрылмаған." + +#: exceptions.py:172 +msgid "Incorrect authentication credentials." +msgstr "Аутентификация деректері қате." + +#: exceptions.py:178 +msgid "Authentication credentials were not provided." +msgstr "Аутентификация деректері берілмеген." + +#: exceptions.py:184 +msgid "You do not have permission to perform this action." +msgstr "Бұл әрекетті орындауға рұқсатыңыз жоқ." + +#: exceptions.py:190 +msgid "Not found." +msgstr "Табылмады." + +#: exceptions.py:196 +#, python-brace-format +msgid "Method \"{method}\" not allowed." +msgstr "\"{method}\" әдісіне рұқсат етілмейді." + +#: exceptions.py:207 +msgid "Could not satisfy the request Accept header." +msgstr "Сұраныстағы Accept тақырыбын қанағаттандыру мүмкін емес." + +#: exceptions.py:217 +#, python-brace-format +msgid "Unsupported media type \"{media_type}\" in request." +msgstr "Сұраныстағы \"{media_type}\" медиа түрі қолдау көрсетілмейді." + +#: exceptions.py:228 +msgid "Request was throttled." +msgstr "Сұраныс жиілігі шектелді." + +#: exceptions.py:229 +#, python-brace-format +msgid "Expected available in {wait} second." +msgstr "{wait} секундтан кейін қайта қолжетімді болады." + +#: exceptions.py:230 +#, python-brace-format +msgid "Expected available in {wait} seconds." +msgstr "{wait} секундтан кейін қайта қолжетімді болады." + +#: fields.py:292 relations.py:240 relations.py:276 validators.py:112 +#: validators.py:238 +msgid "This field is required." +msgstr "Бұл мән міндетті." + +#: fields.py:293 +msgid "This field may not be null." +msgstr "Бұл мән null болмауы керек." + +#: fields.py:661 +msgid "Must be a valid boolean." +msgstr "Дұрыс логикалық мән болуы керек." + +#: fields.py:724 +msgid "Not a valid string." +msgstr "Мәтін дұрыс емес." + +#: fields.py:725 +msgid "This field may not be blank." +msgstr "Бұл мән бос болмауы керек." + +#: fields.py:726 fields.py:1881 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} characters." +msgstr "Бұл мән ең көбі {max_length} таңбадан аспауы керек." + +#: fields.py:727 +#, python-brace-format +msgid "Ensure this field has at least {min_length} characters." +msgstr "Бұл мән кемінде {min_length} таңба болуы керек." + +#: fields.py:774 +msgid "Enter a valid email address." +msgstr "Дұрыс электрондық пошта енгізіңіз." + +#: fields.py:785 +msgid "This value does not match the required pattern." +msgstr "Бұл мән қажетті үлгіге сәйкес келмейді." + +#: fields.py:796 +msgid "" +"Enter a valid \"slug\" consisting of letters, numbers, underscores or " +"hyphens." +msgstr "Әріптерден, сандардан, астын сызу және сызықшалардан тұратын дұрыс \"slug\" енгізіңіз." + +#: fields.py:797 +msgid "" +"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, " +"or hyphens." +msgstr "Юникод әріптері, сандар, астын сызу және сызықшалардан тұратын дұрыс \"slug\" енгізіңіз." + +#: fields.py:812 +msgid "Enter a valid URL." +msgstr "Дұрыс URL енгізіңіз." + +#: fields.py:825 +msgid "Must be a valid UUID." +msgstr "Дұрыс UUID болуы керек." + +#: fields.py:861 +msgid "Enter a valid IPv4 or IPv6 address." +msgstr "Дұрыс IPv4 немесе IPv6 адрес енгізіңіз." + +#: fields.py:889 +msgid "A valid integer is required." +msgstr "Дұрыс бүтін сан енгізілуі қажет." + +#: fields.py:890 fields.py:927 fields.py:966 fields.py:1349 +#, python-brace-format +msgid "Ensure this value is less than or equal to {max_value}." +msgstr "Бұл мән {max_value} немесе одан аз болуы керек." + +#: fields.py:891 fields.py:928 fields.py:967 fields.py:1350 +#, python-brace-format +msgid "Ensure this value is greater than or equal to {min_value}." +msgstr "Бұл мән кемінде {min_value} болуы керек." + +#: fields.py:892 fields.py:929 fields.py:971 +msgid "String value too large." +msgstr "Жолдың мәні тым үлкен." + +#: fields.py:926 fields.py:965 +msgid "A valid number is required." +msgstr "Дұрыс сан енгізілуі керек." + +#: fields.py:930 +msgid "Integer value too large to convert to float" +msgstr "Бүтін сан тым үлкен - қалқымалы санға айналдыру мүмкін емес." + +#: fields.py:968 +#, python-brace-format +msgid "Ensure that there are no more than {max_digits} digits in total." +msgstr "Барлығы {max_digits} саннан аспауы керек." + +#: fields.py:969 +#, python-brace-format +msgid "Ensure that there are no more than {max_decimal_places} decimal places." +msgstr "Ондық бөлшектер саны ең көбі {max_decimal_places} болуы керек." + +#: fields.py:970 +#, python-brace-format +msgid "" +"Ensure that there are no more than {max_whole_digits} digits before the " +"decimal point." +msgstr "Ондық нүктеге дейінгі сандар саны ең көбі {max_whole_digits} болуы керек." + +#: fields.py:1129 +#, python-brace-format +msgid "Datetime has wrong format. Use one of these formats instead: {format}." +msgstr "Datetime пішімі дұрыс емес. Осы пішімдердің бірін пайдаланыңыз: {format}." + +#: fields.py:1130 +msgid "Expected a datetime but got a date." +msgstr "Күтілгені - datetime, берілгені - date." + +#: fields.py:1131 +#, python-brace-format +msgid "Invalid datetime for the timezone \"{timezone}\"." +msgstr "\"{timezone}\" уақыт белдеуі үшін күн мен уақыт дұрыс емес." + +#: fields.py:1132 +msgid "Datetime value out of range." +msgstr "Datetime мәні рұқсат етілген ауқымнан тыс." + +#: fields.py:1219 +#, python-brace-format +msgid "Date has wrong format. Use one of these formats instead: {format}." +msgstr "Date пішімі дұрыс емес. Осы пішімдердің бірін пайдаланыңыз: {format}." + +#: fields.py:1220 +msgid "Expected a date but got a datetime." +msgstr "Күтілгені - date, берілгені - datetime." + +#: fields.py:1286 +#, python-brace-format +msgid "Time has wrong format. Use one of these formats instead: {format}." +msgstr "Уақыт пішімі дұрыс емес. Осы пішімдердің бірін пайдаланыңыз: {format}." + +#: fields.py:1348 +#, python-brace-format +msgid "Duration has wrong format. Use one of these formats instead: {format}." +msgstr "Ұзақтық пішімі дұрыс емес. Осы пішімдердің бірін пайдаланыңыз: {format}." + +#: fields.py:1351 +#, python-brace-format +msgid "The number of days must be between {min_days} and {max_days}." +msgstr "Күндер саны {min_days} бен {max_days} аралығында болуы керек." + +#: fields.py:1386 fields.py:1446 +#, python-brace-format +msgid "\"{input}\" is not a valid choice." +msgstr "\"{input}\" - дұрыс таңдау емес." + +#: fields.py:1389 +#, python-brace-format +msgid "More than {count} items..." +msgstr "{count} элементтен артық..." + +#: fields.py:1447 fields.py:1596 relations.py:486 serializers.py:595 +#, python-brace-format +msgid "Expected a list of items but got type \"{input_type}\"." +msgstr "Элементтер тізімі күтілді, бірақ \"{input_type}\" түрі берілген." + +#: fields.py:1448 +msgid "This selection may not be empty." +msgstr "Бұл таңдау бос болмауы керек." + +#: fields.py:1487 +#, python-brace-format +msgid "\"{input}\" is not a valid path choice." +msgstr "\"{input}\" - дұрыс жол таңдауы емес." + +#: fields.py:1507 +msgid "No file was submitted." +msgstr "Файл жіберілмеді." + +#: fields.py:1508 +msgid "The submitted data was not a file. Check the encoding type on the form." +msgstr "Жіберілген деректер файл емес. Формадағы кодтау түрін тексеріңіз." + +#: fields.py:1509 +msgid "No filename could be determined." +msgstr "Файл атауы анықталмады." + +#: fields.py:1510 +msgid "The submitted file is empty." +msgstr "Жіберілген файл бос." + +#: fields.py:1511 +#, python-brace-format +msgid "" +"Ensure this filename has at most {max_length} characters (it has {length})." +msgstr "Файл атауы {max_length} таңбадан аспауы керек (қазір - {length})." + +#: fields.py:1559 +msgid "" +"Upload a valid image. The file you uploaded was either not an image or a " +"corrupted image." +msgstr "Дұрыс кескін жүктеңіз. Жүктелген файл кескін емес немесе бүлінген." + +#: fields.py:1597 relations.py:487 serializers.py:596 +msgid "This list may not be empty." +msgstr "Бұл тізім бос болмауы керек." + +#: fields.py:1598 serializers.py:598 +#, python-brace-format +msgid "Ensure this field has at least {min_length} elements." +msgstr "Бұл мәнде кемінде {min_length} элемент болуы керек." + +#: fields.py:1599 serializers.py:597 +#, python-brace-format +msgid "Ensure this field has no more than {max_length} elements." +msgstr "Бұл мәнде {max_length} элементтен көп болмауы керек." + +#: fields.py:1677 +#, python-brace-format +msgid "Expected a dictionary of items but got type \"{input_type}\"." +msgstr "Элементтер жиыны ретінде сөздік күтілді, бірақ \"{input_type}\" түрі берілген." + +#: fields.py:1678 +msgid "This dictionary may not be empty." +msgstr "Бұл сөздік бос болмауы керек." + +#: fields.py:1750 +msgid "Value must be valid JSON." +msgstr "Мән дұрыс JSON пішімінде болуы керек." + +#: filters.py:72 templates/rest_framework/filters/search.html:2 +#: templates/rest_framework/filters/search.html:8 +msgid "Search" +msgstr "Іздеу" + +#: filters.py:73 +msgid "A search term." +msgstr "Іздеу сөзі." + +#: filters.py:224 templates/rest_framework/filters/ordering.html:3 +msgid "Ordering" +msgstr "Реттеу" + +#: filters.py:225 +msgid "Which field to use when ordering the results." +msgstr "Нәтижелерді реттеу үшін қай мән пайдалану керектігін көрсетеді." + +#: filters.py:341 +msgid "ascending" +msgstr "өсу ретімен" + +#: filters.py:342 +msgid "descending" +msgstr "кему ретімен" + +#: pagination.py:180 +msgid "A page number within the paginated result set." +msgstr "Беттелген нәтиже жиынындағы бет нөмірі." + +#: pagination.py:185 pagination.py:382 pagination.py:599 +msgid "Number of results to return per page." +msgstr "Әр бетте қайтарылатын нәтиже саны." + +#: pagination.py:195 +msgid "Invalid page." +msgstr "Қате бет нөмірі." + +#: pagination.py:384 +msgid "The initial index from which to return the results." +msgstr "Нәтижелер қайтарылатын бастапқы индекс." + +#: pagination.py:590 +msgid "The pagination cursor value." +msgstr "Нәтижелерді беттеуге арналған курсор мәні." + +#: pagination.py:592 +msgid "Invalid cursor" +msgstr "Қате курсор" + +#: relations.py:241 +#, python-brace-format +msgid "Invalid pk \"{pk_value}\" - object does not exist." +msgstr "Қате pk \"{pk_value}\" - нысан табылмады." + +#: relations.py:242 +#, python-brace-format +msgid "Incorrect type. Expected pk value, received {data_type}." +msgstr "Дерек түрі дұрыс емес. Күтілгені - pk мәні, берілгені - {data_type}." + +#: relations.py:277 +msgid "Invalid hyperlink - No URL match." +msgstr "Қате гиперсілтеме - URL сәйкестігі жоқ." + +#: relations.py:278 +msgid "Invalid hyperlink - Incorrect URL match." +msgstr "Қате гиперсілтеме - URL сәйкестігі дұрыс емес." + +#: relations.py:279 +msgid "Invalid hyperlink - Object does not exist." +msgstr "Қате гиперсілтеме - нысан табылмады." + +#: relations.py:280 +#, python-brace-format +msgid "Incorrect type. Expected URL string, received {data_type}." +msgstr "Дерек түрі дұрыс емес. Күтілгені - URL жолы, берілгені - {data_type}" + +#: relations.py:445 +#, python-brace-format +msgid "Object with {slug_name}={value} does not exist." +msgstr "{slug_name}={value} параметрі бар нысан табылмады." + +#: relations.py:446 +msgid "Invalid value." +msgstr "Қате мән." + +#: schemas/utils.py:32 +msgid "unique integer value" +msgstr "бірегей бүтін сан мәні" + +#: schemas/utils.py:34 +msgid "UUID string" +msgstr "UUID жолы" + +#: schemas/utils.py:36 +msgid "unique value" +msgstr "бірегей мән" + +#: schemas/utils.py:38 +#, python-brace-format +msgid "A {value_type} identifying this {name}." +msgstr "{name} нысанын анықтайтын {value_type}." + +#: serializers.py:342 +#, python-brace-format +msgid "Invalid data. Expected a dictionary, but got {datatype}." +msgstr "Деректер қате. Күтілгені - сөздік түрі, берілгені - {datatype}." + +#: templates/rest_framework/admin.html:116 +#: templates/rest_framework/base.html:136 +msgid "Extra Actions" +msgstr "Қосымша әрекеттер" + +#: templates/rest_framework/admin.html:130 +#: templates/rest_framework/base.html:150 +msgid "Filters" +msgstr "Сүзгілер" + +#: templates/rest_framework/base.html:37 +msgid "navbar" +msgstr "навигация панелі" + +#: templates/rest_framework/base.html:75 +msgid "content" +msgstr "мазмұн" + +#: templates/rest_framework/base.html:78 +msgid "request form" +msgstr "сұрау формасы" + +#: templates/rest_framework/base.html:157 +msgid "main content" +msgstr "негізгі бөлім" + +#: templates/rest_framework/base.html:173 +msgid "request info" +msgstr "сұрау ақпараты" + +#: templates/rest_framework/base.html:177 +msgid "response info" +msgstr "жауап ақпараты" + +#: templates/rest_framework/horizontal/radio.html:4 +#: templates/rest_framework/inline/radio.html:3 +#: templates/rest_framework/vertical/radio.html:3 +msgid "None" +msgstr "Ешқайсысы" + +#: templates/rest_framework/horizontal/select_multiple.html:4 +#: templates/rest_framework/inline/select_multiple.html:3 +#: templates/rest_framework/vertical/select_multiple.html:3 +msgid "No items to select." +msgstr "Таңдайтын элементтер жоқ." + +#: validators.py:52 +msgid "This field must be unique." +msgstr "Бұл енгізу жолы бірегей болуы керек." + +#: validators.py:111 +#, python-brace-format +msgid "The fields {field_names} must make a unique set." +msgstr "{field_names} енгізу жолдары бірегей жинақ құрауы тиіс." + +#: validators.py:219 +#, python-brace-format +msgid "Surrogate characters are not allowed: U+{code_point:X}." +msgstr "Суррогат таңбалар рұқсат етілмейді: U+{code_point:X}." + +#: validators.py:309 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" date." +msgstr "\"{date_field}\" күніне бұл енгізу жолы бірегей болуы керек." + +#: validators.py:324 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" month." +msgstr "\"{date_field}\" айына бұл енгізу жолы бірегей болуы керек." + +#: validators.py:337 +#, python-brace-format +msgid "This field must be unique for the \"{date_field}\" year." +msgstr "\"{date_field}\" жылына бұл енгізу жолы бірегей болуы керек." + +#: versioning.py:40 +msgid "Invalid version in \"Accept\" header." +msgstr "\"Accept\" тақырыбында нұсқа дұрыс көрсетілмеген." + +#: versioning.py:71 +msgid "Invalid version in URL path." +msgstr "URL жолында нұсқа қате көрсетілген." + +#: versioning.py:118 +msgid "Invalid version in URL path. Does not match any version namespace." +msgstr "URL жолында нұсқа дұрыс көрсетілмеген. Ешбір нұсқа кеңістігімен сәйкес келмейді." + +#: versioning.py:150 +msgid "Invalid version in hostname." +msgstr "Хост атауында нұсқа қате көрсетілген." + +#: versioning.py:172 +msgid "Invalid version in query parameter." +msgstr "Сұраныс параметрінде нұсқа қате көрсетілген." From 30384947053b1f2b2c9e82cafd1da934d3442a61 Mon Sep 17 00:00:00 2001 From: Peter Thomassen <4242683+peterthomassen@users.noreply.github.com> Date: Thu, 26 Jun 2025 19:39:51 +0200 Subject: [PATCH 10/15] Document that unique constraints cause `required=True` in ModelSerializer (#9725) --- docs/api-guide/fields.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md index d2e6b67e8..888996eec 100644 --- a/docs/api-guide/fields.md +++ b/docs/api-guide/fields.md @@ -42,7 +42,7 @@ Set to false if this field is not required to be present during deserialization. Setting this to `False` also allows the object attribute or dictionary key to be omitted from output when serializing the instance. If the key is not present it will simply not be included in the output representation. -Defaults to `True`. If you're using [Model Serializer](https://www.django-rest-framework.org/api-guide/serializers/#modelserializer) default value will be `False` if you have specified `blank=True` or `default` or `null=True` at your field in your `Model`. +Defaults to `True`. If you're using [Model Serializer](https://www.django-rest-framework.org/api-guide/serializers/#modelserializer), the default value will be `False` when you have specified a `default`, or when the corresponding `Model` field has `blank=True` or `null=True` and is not part of a unique constraint at the same time. (Note that without a `default` value, [unique constraints will cause the field to be required](https://www.django-rest-framework.org/api-guide/validators/#optional-fields).) ### `default` From 70e54f45add6a96f92bbadbcff30fc211f2ce0c3 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 6 Jul 2025 07:39:52 -0700 Subject: [PATCH 11/15] Revert docs back to djangorestframework-guardian (#9734) --- docs/api-guide/permissions.md | 4 ++-- docs/community/third-party-packages.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api-guide/permissions.md b/docs/api-guide/permissions.md index 775888fb6..c6d9f9338 100644 --- a/docs/api-guide/permissions.md +++ b/docs/api-guide/permissions.md @@ -201,7 +201,7 @@ As with `DjangoModelPermissions` you can use custom model permissions by overrid --- -**Note**: If you need object level `view` permissions for `GET`, `HEAD` and `OPTIONS` requests and are using django-guardian for your object-level permissions backend, you'll want to consider using the `DjangoObjectPermissionsFilter` class provided by the [`djangorestframework-guardian2` package][django-rest-framework-guardian2]. It ensures that list endpoints only return results including objects for which the user has appropriate view permissions. +**Note**: If you need object level `view` permissions for `GET`, `HEAD` and `OPTIONS` requests and are using django-guardian for your object-level permissions backend, you'll want to consider using the `DjangoObjectPermissionsFilter` class provided by the [`djangorestframework-guardian` package][django-rest-framework-guardian]. It ensures that list endpoints only return results including objects for which the user has appropriate view permissions. --- @@ -356,6 +356,6 @@ The [Django Rest Framework PSQ][drf-psq] package is an extension that gives supp [rest-framework-roles]: https://github.com/Pithikos/rest-framework-roles [djangorestframework-api-key]: https://florimondmanca.github.io/djangorestframework-api-key/ [django-rest-framework-role-filters]: https://github.com/allisson/django-rest-framework-role-filters -[django-rest-framework-guardian2]: https://github.com/johnthagen/django-rest-framework-guardian2 +[django-rest-framework-guardian]: https://github.com/rpkilby/django-rest-framework-guardian [drf-access-policy]: https://github.com/rsinger86/drf-access-policy [drf-psq]: https://github.com/drf-psq/drf-psq diff --git a/docs/community/third-party-packages.md b/docs/community/third-party-packages.md index d213cac3d..a48cbd606 100644 --- a/docs/community/third-party-packages.md +++ b/docs/community/third-party-packages.md @@ -126,7 +126,7 @@ To submit new content, [create a pull request][drf-create-pr]. * [djangorestframework-chain][djangorestframework-chain] - Allows arbitrary chaining of both relations and lookup filters. * [django-url-filter][django-url-filter] - Allows a safe way to filter data via human-friendly URLs. It is a generic library which is not tied to DRF but it provides easy integration with DRF. * [drf-url-filter][drf-url-filter] is a simple Django app to apply filters on drf `ModelViewSet`'s `Queryset` in a clean, simple and configurable way. It also supports validations on incoming query params and their values. -* [django-rest-framework-guardian2][django-rest-framework-guardian2] - Provides integration with django-guardian, including the `DjangoObjectPermissionsFilter` previously found in DRF. +* [django-rest-framework-guardian][django-rest-framework-guardian] - Provides integration with django-guardian, including the `DjangoObjectPermissionsFilter` previously found in DRF. ### Misc @@ -242,7 +242,7 @@ To submit new content, [create a pull request][drf-create-pr]. [djangorestframework-dataclasses]: https://github.com/oxan/djangorestframework-dataclasses [django-restql]: https://github.com/yezyilomo/django-restql [djangorestframework-mvt]: https://github.com/corteva/djangorestframework-mvt -[django-rest-framework-guardian2]: https://github.com/johnthagen/django-rest-framework-guardian2 +[django-rest-framework-guardian]: https://github.com/rpkilby/django-rest-framework-guardian [drf-viewset-profiler]: https://github.com/fvlima/drf-viewset-profiler [djangorestframework-features]: https://github.com/cloudcode-hungary/django-rest-framework-features/ [django-elasticsearch-dsl-drf]: https://github.com/barseghyanartur/django-elasticsearch-dsl-drf From 2ae8c117dae5d7912760492a1df397e2fcd8c7a4 Mon Sep 17 00:00:00 2001 From: Ali Hassan <124016531+alihassancods@users.noreply.github.com> Date: Mon, 7 Jul 2025 16:11:24 +0500 Subject: [PATCH 12/15] Add note to tutorial about required request in serializer context when using `HyperlinkedModelSerializer` (#9732) * Fix : Updated documentation in tutorial 5 leading to error * Updated docs/tutorial/5-relationships-and-hyperlinked-apis.md Co-authored-by: Bruno Alla * Missing newline --------- Co-authored-by: Bruno Alla --- .../5-relationships-and-hyperlinked-apis.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/tutorial/5-relationships-and-hyperlinked-apis.md b/docs/tutorial/5-relationships-and-hyperlinked-apis.md index f999fdf50..f5aaee2bb 100644 --- a/docs/tutorial/5-relationships-and-hyperlinked-apis.md +++ b/docs/tutorial/5-relationships-and-hyperlinked-apis.md @@ -94,6 +94,22 @@ Notice that we've also added a new `'highlight'` field. This field is of the sa Because we've included format suffixed URLs such as `'.json'`, we also need to indicate on the `highlight` field that any format suffixed hyperlinks it returns should use the `'.html'` suffix. +--- + +**Note:** + +When you are manually instantiating these serializers inside your views (e.g., in `SnippetDetail` or `SnippetList`), you **must** pass `context={'request': request}` so the serializer knows how to build absolute URLs. For example, instead of: + + serializer = SnippetSerializer(snippet) + +You must write: + + serializer = SnippetSerializer(snippet, context={'request': request}) + +If your view is a subclass of `GenericAPIView`, you may use the `get_serializer_context()` as a convenience method. + +--- + ## Making sure our URL patterns are named If we're going to have a hyperlinked API, we need to make sure we name our URL patterns. Let's take a look at which URL patterns we need to name. From 853969c69c815be69513c2f63a41285858a45352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kul=C3=ADk?= Date: Thu, 24 Jul 2025 09:47:47 +0200 Subject: [PATCH 13/15] Fix test with Django 5 when pytz is available (#9715) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix test with Django 5 when pytz is available * fix formatting * remove original condition Co-authored-by: Ülgen Sarıkavak * remove trailing whitespace * further improvements * let's not skip the pytz test - it should always be executed when testing against Django 4 * add comment to test requirements Co-authored-by: Bruno Alla * simplify the pytz import as it should always be available * make isort happy --------- Co-authored-by: Ülgen Sarıkavak Co-authored-by: Bruno Alla --- requirements/requirements-testing.txt | 1 + tests/test_fields.py | 28 +++++++++++++-------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt index 2b39316a0..b1e3c82ec 100644 --- a/requirements/requirements-testing.txt +++ b/requirements/requirements-testing.txt @@ -5,3 +5,4 @@ pytest-django>=4.5.2,<5.0 importlib-metadata<5.0 # temporary pin of attrs attrs==22.1.0 +pytz # Remove when dropping support for Django<5.0 diff --git a/tests/test_fields.py b/tests/test_fields.py index d574b07eb..56693ed7a 100644 --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -9,13 +9,9 @@ from enum import auto from unittest.mock import patch from zoneinfo import ZoneInfo +import django import pytest - -try: - import pytz -except ImportError: - pytz = None - +import pytz from django.core.exceptions import ValidationError as DjangoValidationError from django.db.models import IntegerChoices, TextChoices from django.http import QueryDict @@ -1624,7 +1620,10 @@ class TestCustomTimezoneForDateTimeField(TestCase): assert rendered_date == rendered_date_in_timezone -@pytest.mark.skipif(pytz is None, reason="Django 5.0 has removed pytz; this test should eventually be able to get removed.") +@pytest.mark.skipif( + condition=django.VERSION >= (5,), + reason="Django 5.0 has removed pytz; this test should eventually be able to get removed.", +) class TestPytzNaiveDayLightSavingTimeTimeZoneDateTimeField(FieldValues): """ Invalid values for `DateTimeField` with datetime in DST shift (non-existing or ambiguous) and timezone with DST. @@ -1638,16 +1637,15 @@ class TestPytzNaiveDayLightSavingTimeTimeZoneDateTimeField(FieldValues): } outputs = {} - if pytz: - class MockTimezone(pytz.BaseTzInfo): - @staticmethod - def localize(value, is_dst): - raise pytz.InvalidTimeError() + class MockTimezone(pytz.BaseTzInfo): + @staticmethod + def localize(value, is_dst): + raise pytz.InvalidTimeError() - def __str__(self): - return 'America/New_York' + def __str__(self): + return 'America/New_York' - field = serializers.DateTimeField(default_timezone=MockTimezone()) + field = serializers.DateTimeField(default_timezone=MockTimezone()) @patch('rest_framework.utils.timezone.datetime_ambiguous', return_value=True) From a7d050f5b3388ed9dc69c7770fdbd9654d4639ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sezer=20Bozk=C4=B1r?= <6623948+Natgho@users.noreply.github.com> Date: Fri, 1 Aug 2025 18:33:52 +0300 Subject: [PATCH 14/15] Turkish Translation updates (#9749) --- .../locale/tr/LC_MESSAGES/django.mo | Bin 10073 -> 12731 bytes .../locale/tr/LC_MESSAGES/django.po | 65 +++++++++--------- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/rest_framework/locale/tr/LC_MESSAGES/django.mo b/rest_framework/locale/tr/LC_MESSAGES/django.mo index 6386aab5236ae56a95525a2b2c525baa555c3963..10233c89043c78b78b97724f3543b982d7ada9db 100644 GIT binary patch delta 4619 zcmbW2du$xV9mmHZ5XT`e=VcsHCJ7|aBnM3(flv}BI3xj*xCE02k1%&PwwK%6HM@Iu zY-28!5TXyL+AV#k4K7uMDJi1nq68^vq4=o!ptMwN0ihO9TY&@=Dyj+uE&crV_R=8n zN7a#k`F`2-m(8IA)YY&XF6Ml7m`*bj z&qIm8>&XkH8fVA?4urCC2b6=p2+xL3LW#($kh9g)nTbbgK9u>zP!8S-FNSx(_3%gV za`-Qp;e54$)481Lg|e^=&xen}bKz@nA)Gl&sZYXHP}biB<=`T`01m+n`~lnwUxb&z zb7t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T-` z;s%`>I&)byZ=Y8T#*dr-x86qT|QxDMY%t?6&5C8%T+ znt2umRj`=v)QKVBH;}bG;jML*2ZG z&{k7%sj2$e-tLm9K9nh~zh32f_#*^~a$A>You1DYch^NJyR)eV7`R(Jt=Le4J2?+-gO1^y&^06@)1sd1m0*_&)p9tOk2Qc9;Ef_KY*` z+h^G=IhD?PIldI9Aa}yDYx8~fe|dYHc>aiGNBsxwpZw3K_YKAecH3_(8n!zERrXhb zJ}0*LvSn8;nYFhUM4il~e^_>X;a2D4!V1e-7Cd6vH$&~tNb$K8=WIz%iX99G?2PaW z&av>YWye;WvDd5|&1{JG#|L`%_U^Xlm5tfom94i2BTqXwBUdcvQhA, 2015 # Recep KIRMIZI , 2015 # Ülgen Sarıkavak , 2015 +# Sezer BOZKIR , 2025 msgid "" msgstr "" "Project-Id-Version: Django REST framework\n" @@ -108,7 +109,7 @@ msgstr "Sunucu hatası oluştu." #: exceptions.py:142 msgid "Invalid input." -msgstr "" +msgstr "Geçersiz girdi." #: exceptions.py:161 msgid "Malformed request." @@ -151,12 +152,12 @@ msgstr "Üst üste çok fazla istek yapıldı." #: exceptions.py:224 #, python-brace-format msgid "Expected available in {wait} second." -msgstr "" +msgstr "{wait} saniye içinde erişilebilir olması bekleniyor." #: exceptions.py:225 #, python-brace-format msgid "Expected available in {wait} seconds." -msgstr "" +msgstr "{wait} saniye içinde erişilebilir olması bekleniyor." #: fields.py:316 relations.py:245 relations.py:279 validators.py:90 #: validators.py:183 @@ -169,11 +170,11 @@ msgstr "Bu alan boş bırakılmamalı." #: fields.py:701 msgid "Must be a valid boolean." -msgstr "" +msgstr "Geçerli bir boolean olmalı." #: fields.py:766 msgid "Not a valid string." -msgstr "" +msgstr "Geçerli bir string değil." #: fields.py:767 msgid "This field may not be blank." @@ -215,7 +216,7 @@ msgstr "Geçerli bir URL girin." #: fields.py:867 msgid "Must be a valid UUID." -msgstr "" +msgstr "Geçerli bir UUID olmalı." #: fields.py:903 msgid "Enter a valid IPv4 or IPv6 address." @@ -273,11 +274,11 @@ msgstr "Datetime değeri bekleniyor, ama date değeri geldi." #: fields.py:1150 #, python-brace-format msgid "Invalid datetime for the timezone \"{timezone}\"." -msgstr "" +msgstr "\"{timezone}\" zaman dilimi için geçersiz datetime." #: fields.py:1151 msgid "Datetime value out of range." -msgstr "" +msgstr "Datetime değeri aralığın dışında." #: fields.py:1236 #, python-brace-format @@ -358,12 +359,12 @@ msgstr "Bu liste boş olmamalı." #: fields.py:1605 #, python-brace-format msgid "Ensure this field has at least {min_length} elements." -msgstr "" +msgstr "Bu alanın en az {min_length} eleman içerdiğinden emin olun." #: fields.py:1606 #, python-brace-format msgid "Ensure this field has no more than {max_length} elements." -msgstr "" +msgstr "Bu alanın en fazla {max_length} eleman içerdiğinden emin olun." #: fields.py:1682 #, python-brace-format @@ -372,7 +373,7 @@ msgstr "Sözlük tipi bir değişken beklenirken \"{input_type}\" tipi bir deği #: fields.py:1683 msgid "This dictionary may not be empty." -msgstr "" +msgstr "Bu sözlük boş olmamalı." #: fields.py:1755 msgid "Value must be valid JSON." @@ -384,7 +385,7 @@ msgstr "Arama" #: filters.py:50 msgid "A search term." -msgstr "" +msgstr "Bir arama terimi." #: filters.py:180 templates/rest_framework/filters/ordering.html:3 msgid "Ordering" @@ -392,23 +393,23 @@ msgstr "Sıralama" #: filters.py:181 msgid "Which field to use when ordering the results." -msgstr "" +msgstr "Sonuçların sıralanmasında kullanılacak alan." #: filters.py:287 msgid "ascending" -msgstr "" +msgstr "artan" #: filters.py:288 msgid "descending" -msgstr "" +msgstr "azalan" #: pagination.py:174 msgid "A page number within the paginated result set." -msgstr "" +msgstr "Sayfalanmış sonuç kümesinde bir sayfa numarası." #: pagination.py:179 pagination.py:372 pagination.py:590 msgid "Number of results to return per page." -msgstr "" +msgstr "Her sayfada döndürülecek sonuç sayısı." #: pagination.py:189 msgid "Invalid page." @@ -416,11 +417,11 @@ msgstr "Geçersiz sayfa." #: pagination.py:374 msgid "The initial index from which to return the results." -msgstr "" +msgstr "Döndürülecek sonuçların başlangıç indeksi." #: pagination.py:581 msgid "The pagination cursor value." -msgstr "" +msgstr "Sayfalandırma imleci değeri." #: pagination.py:583 msgid "Invalid cursor" @@ -464,20 +465,20 @@ msgstr "Geçersiz değer." #: schemas/utils.py:32 msgid "unique integer value" -msgstr "" +msgstr "benzersiz tamsayı değeri" #: schemas/utils.py:34 msgid "UUID string" -msgstr "" +msgstr "UUID metni" #: schemas/utils.py:36 msgid "unique value" -msgstr "" +msgstr "benzersiz değer" #: schemas/utils.py:38 #, python-brace-format msgid "A {value_type} identifying this {name}." -msgstr "" +msgstr "Bir {name} öğesini tanımlayan {value_type}." #: serializers.py:337 #, python-brace-format @@ -487,7 +488,7 @@ msgstr "Geçersiz veri. Sözlük bekleniyordu fakat {datatype} geldi. " #: templates/rest_framework/admin.html:116 #: templates/rest_framework/base.html:136 msgid "Extra Actions" -msgstr "" +msgstr "Ekstra Eylemler" #: templates/rest_framework/admin.html:130 #: templates/rest_framework/base.html:150 @@ -496,27 +497,27 @@ msgstr "Filtreler" #: templates/rest_framework/base.html:37 msgid "navbar" -msgstr "" +msgstr "navigasyon çubuğu" #: templates/rest_framework/base.html:75 msgid "content" -msgstr "" +msgstr "içerik" #: templates/rest_framework/base.html:78 msgid "request form" -msgstr "" +msgstr "istek formu" #: templates/rest_framework/base.html:157 msgid "main content" -msgstr "" +msgstr "ana içerik" #: templates/rest_framework/base.html:173 msgid "request info" -msgstr "" +msgstr "istek bilgisi" #: templates/rest_framework/base.html:177 msgid "response info" -msgstr "" +msgstr "cevap bilgisi" #: templates/rest_framework/horizontal/radio.html:4 #: templates/rest_framework/inline/radio.html:3 @@ -542,7 +543,7 @@ msgstr "{field_names} hep birlikte eşsiz bir küme oluşturmalılar." #: validators.py:171 #, python-brace-format msgid "Surrogate characters are not allowed: U+{code_point:X}." -msgstr "" +msgstr "Yerine konulmuş karakterlere izin verilmiyor: U+{code_point:X}." #: validators.py:243 #, python-brace-format @@ -569,7 +570,7 @@ msgstr "URL dizininde geçersiz versiyon." #: versioning.py:116 msgid "Invalid version in URL path. Does not match any version namespace." -msgstr "" +msgstr "Geçersiz versiyon URL dizininde. Hiçbir versiyon ad alanı ile eşleşmiyor." #: versioning.py:148 msgid "Invalid version in hostname." From de018df2aaacb1d2d947c0cfbfaa6d08fb50557d Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 6 Aug 2025 18:40:31 +0100 Subject: [PATCH 15/15] Prepare 3.16.1 release (#9752) --- docs/community/release-notes.md | 75 ++++++++++++++++++++++++++++++--- rest_framework/__init__.py | 2 +- 2 files changed, 70 insertions(+), 7 deletions(-) diff --git a/docs/community/release-notes.md b/docs/community/release-notes.md index c7b82e985..ae59ae000 100644 --- a/docs/community/release-notes.md +++ b/docs/community/release-notes.md @@ -38,20 +38,83 @@ You can determine your currently installed version using `pip show`: ## 3.16.x series +### 3.16.1 + +**Date**: 6th August 2025 + +This release fixes a few bugs, clean-up some old code paths for unsupported Python versions and improve translations. + +#### Minor changes + +* Cleanup optional `backports.zoneinfo` dependency and conditions on unsupported Python 3.8 and lower in [#9681](https://github.com/encode/django-rest-framework/pull/9681). Python versions prior to 3.9 were already unsupported so this shouldn't be a breaking change. + +#### Bug fixes + +* Fix regression in `unique_together` validation with `SerializerMethodField` in [#9712](https://github.com/encode/django-rest-framework/pull/9712) +* Fix `UniqueTogetherValidator` to handle fields with `source` attribute in [#9688](https://github.com/encode/django-rest-framework/pull/9688) +* Drop HTML line breaks on long headers in browsable API in [#9438](https://github.com/encode/django-rest-framework/pull/9438) + +#### Translations + +* Add Kazakh locale support in [#9713](https://github.com/encode/django-rest-framework/pull/9713) +* Update translations for Korean translations in [#9571](https://github.com/encode/django-rest-framework/pull/9571) +* Update German translations in [#9676](https://github.com/encode/django-rest-framework/pull/9676) +* Update Chinese translations in [#9675](https://github.com/encode/django-rest-framework/pull/9675) +* Update Arabic translations-sal in [#9595](https://github.com/encode/django-rest-framework/pull/9595) +* Update Persian translations in [#9576](https://github.com/encode/django-rest-framework/pull/9576) +* Update Spanish translations in [#9701](https://github.com/encode/django-rest-framework/pull/9701) +* Update Turkish Translations in [#9749](https://github.com/encode/django-rest-framework/pull/9749) +* Fix some typos in Brazilian Portuguese translations in [#9673](https://github.com/encode/django-rest-framework/pull/9673) + +#### Documentation + +* Removed reference to GitHub Issues and Discussions in [#9660](https://github.com/encode/django-rest-framework/pull/9660) +* Add `drf-restwind` and update outdated images in `browsable-api.md` in [#9680](https://github.com/encode/django-rest-framework/pull/9680) +* Updated funding page to represent current scope in [#9686](https://github.com/encode/django-rest-framework/pull/9686) +* Fix broken Heroku JSON Schema link in [#9693](https://github.com/encode/django-rest-framework/pull/9693) +* Update Django documentation links to use stable version in [#9698](https://github.com/encode/django-rest-framework/pull/9698) +* Expand docs on unique constraints cause 'required=True' in [#9725](https://github.com/encode/django-rest-framework/pull/9725) +* Revert extension back from `djangorestframework-guardian2` to `djangorestframework-guardian` in [#9734](https://github.com/encode/django-rest-framework/pull/9734) +* Add note to tutorial about required `request` in serializer context when using `HyperlinkedModelSerializer` in [#9732](https://github.com/encode/django-rest-framework/pull/9732) + +#### Internal changes + +* Update GitHub Actions to use Ubuntu 24.04 for testing in [#9677](https://github.com/encode/django-rest-framework/pull/9677) +* Update test matrix to use Django 5.2 stable version in [#9679](https://github.com/encode/django-rest-framework/pull/9679) +* Add `pyupgrade` to `pre-commit` hooks in [#9682](https://github.com/encode/django-rest-framework/pull/9682) +* Fix test with Django 5 when `pytz` is available in [#9715](https://github.com/encode/django-rest-framework/pull/9715) + +#### New Contributors + +* [`@araggohnxd`](https://github.com/araggohnxd) made their first contribution in [#9673](https://github.com/encode/django-rest-framework/pull/9673) +* [`@mbeijen`](https://github.com/mbeijen) made their first contribution in [#9660](https://github.com/encode/django-rest-framework/pull/9660) +* [`@stefan6419846`](https://github.com/stefan6419846) made their first contribution in [#9676](https://github.com/encode/django-rest-framework/pull/9676) +* [`@ren000thomas`](https://github.com/ren000thomas) made their first contribution in [#9675](https://github.com/encode/django-rest-framework/pull/9675) +* [`@ulgens`](https://github.com/ulgens) made their first contribution in [#9682](https://github.com/encode/django-rest-framework/pull/9682) +* [`@bukh-sal`](https://github.com/bukh-sal) made their first contribution in [#9595](https://github.com/encode/django-rest-framework/pull/9595) +* [`@rezatn0934`](https://github.com/rezatn0934) made their first contribution in [#9576](https://github.com/encode/django-rest-framework/pull/9576) +* [`@Rohit10jr`](https://github.com/Rohit10jr) made their first contribution in [#9693](https://github.com/encode/django-rest-framework/pull/9693) +* [`@kushibayev`](https://github.com/kushibayev) made their first contribution in [#9713](https://github.com/encode/django-rest-framework/pull/9713) +* [`@alihassancods`](https://github.com/alihassancods) made their first contribution in [#9732](https://github.com/encode/django-rest-framework/pull/9732) +* [`@kulikjak`](https://github.com/kulikjak) made their first contribution in [#9715](https://github.com/encode/django-rest-framework/pull/9715) +* [`@Natgho`](https://github.com/Natgho) made their first contribution in [#9749](https://github.com/encode/django-rest-framework/pull/9749) + +**Full Changelog**: https://github.com/encode/django-rest-framework/compare/3.16.0...3.16.1 + ### 3.16.0 **Date**: 28th March 2025 This release is considered a significant release to improve upstream support with Django and Python. Some of these may change the behaviour of existing features and pre-existing behaviour. Specifically, some fixes were added to around the support of `UniqueConstraint` with nullable fields which will improve built-in serializer validation. -## Features +#### Features * Add official support for Django 5.1 and its new `LoginRequiredMiddleware` in [#9514](https://github.com/encode/django-rest-framework/pull/9514) and [#9657](https://github.com/encode/django-rest-framework/pull/9657) * Add official Django 5.2a1 support in [#9634](https://github.com/encode/django-rest-framework/pull/9634) * Add support for Python 3.13 in [#9527](https://github.com/encode/django-rest-framework/pull/9527) and [#9556](https://github.com/encode/django-rest-framework/pull/9556) * Support Django 2.1+ test client JSON data automatically serialized in [#6511](https://github.com/encode/django-rest-framework/pull/6511) and fix a regression in [#9615](https://github.com/encode/django-rest-framework/pull/9615) -## Bug fixes +#### Bug fixes * Fix unique together validator to respect condition's fields from `UniqueConstraint` in [#9360](https://github.com/encode/django-rest-framework/pull/9360) * Fix raising on nullable fields part of `UniqueConstraint` in [#9531](https://github.com/encode/django-rest-framework/pull/9531) @@ -62,19 +125,19 @@ This release is considered a significant release to improve upstream support wit * Fix noisy warning and accept integers as min/max values of `DecimalField` in [#9515](https://github.com/encode/django-rest-framework/pull/9515) * Fix usages of `open()` in `setup.py` in [#9661](https://github.com/encode/django-rest-framework/pull/9661) -## Translations +#### Translations * Add some missing Chinese translations in [#9505](https://github.com/encode/django-rest-framework/pull/9505) * Fix spelling mistakes in Farsi language were corrected in [#9521](https://github.com/encode/django-rest-framework/pull/9521) * Fixing and adding missing Brazilian Portuguese translations in [#9535](https://github.com/encode/django-rest-framework/pull/9535) -## Removals +#### Removals * Remove support for Python 3.8 in [#9670](https://github.com/encode/django-rest-framework/pull/9670) * Remove long deprecated code from request wrapper in [#9441](https://github.com/encode/django-rest-framework/pull/9441) * Remove deprecated `AutoSchema._get_reference` method in [#9525](https://github.com/encode/django-rest-framework/pull/9525) -## Documentation and internal changes +#### Documentation and internal changes * Provide tests for hashing of `OperandHolder` in [#9437](https://github.com/encode/django-rest-framework/pull/9437) * Update documentation: Add `adrf` third party package in [#9198](https://github.com/encode/django-rest-framework/pull/9198) @@ -94,7 +157,7 @@ This release is considered a significant release to improve upstream support wit * Fix a number of typos in the test suite in the docs in [#9662](https://github.com/encode/django-rest-framework/pull/9662) * Add `django-pyoidc` as a third party authentication library in [#9667](https://github.com/encode/django-rest-framework/pull/9667) -## New Contributors +#### New Contributors * [`@maerteijn`](https://github.com/maerteijn) made their first contribution in [#9198](https://github.com/encode/django-rest-framework/pull/9198) * [`@FraCata00`](https://github.com/FraCata00) made their first contribution in [#9444](https://github.com/encode/django-rest-framework/pull/9444) diff --git a/rest_framework/__init__.py b/rest_framework/__init__.py index 692ce9cb1..9b9bb6eda 100644 --- a/rest_framework/__init__.py +++ b/rest_framework/__init__.py @@ -8,7 +8,7 @@ ______ _____ _____ _____ __ """ __title__ = 'Django REST framework' -__version__ = '3.16.0' +__version__ = '3.16.1' __author__ = 'Tom Christie' __license__ = 'BSD 3-Clause' __copyright__ = 'Copyright 2011-2023 Encode OSS Ltd'