Compare commits

..

No commits in common. "master" and "3.16.0" have entirely different histories.

81 changed files with 624 additions and 1193 deletions

17
.github/ISSUE_TEMPLATE/1-issue.md vendored Normal file
View File

@ -0,0 +1,17 @@
---
name: Issue
about: Please only raise an issue if you've been advised to do so after discussion. Thanks! 🙏
---
## Checklist
<!--
Note: REST framework is considered feature-complete. New functionality should be implemented outside the core REST framework. For details, please check the docs: https://www.django-rest-framework.org/community/third-party-packages/#about-third-party-packages
-->
- [ ] Raised initially as discussion #...
- [ ] This is not a feature request suitable for implementation outside this project. Please elaborate what it is:
- [ ] compatibility fix for new Django/Python version ...
- [ ] other type of bug fix
- [ ] other type of improvement that does not touch existing code or change existing behavior (e.g. wrapper for new Django field)
- [ ] I have reduced the issue to the simplest possible case.

6
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,6 @@
blank_issues_enabled: false
contact_links:
- name: Discussions
url: https://github.com/encode/django-rest-framework/discussions
about: >
The "Discussions" forum is where you want to start. 💖

View File

@ -9,7 +9,7 @@ on:
jobs:
tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-24.04
runs-on: ubuntu-20.04
strategy:
matrix:
@ -50,7 +50,7 @@ jobs:
test-docs:
name: Test documentation links
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

View File

@ -31,9 +31,3 @@ repos:
hooks:
- id: codespell
exclude: locale|kickstarter-announcement.md|coreapi-0.1.1.js
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
args: ["--py39-plus", "--keep-percent-format"]

View File

@ -2,4 +2,6 @@
At this point in its lifespan we consider Django REST framework to be essentially feature-complete. We may accept pull requests that track the continued development of Django versions, but would prefer not to accept new features or code formatting changes.
Apart from minor documentation changes, the [GitHub discussions page](https://github.com/encode/django-rest-framework/discussions) should generally be your starting point. Please only raise an issue or pull request if you've been recommended to do so after discussion.
The [Contributing guide in the documentation](https://www.django-rest-framework.org/community/contributing/) gives some more information on our process and code of conduct.

View File

@ -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/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
[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

View File

@ -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/stable/topics/http/views/#customizing-error-views
[django-custom-error-views]: https://docs.djangoproject.com/en/dev/topics/http/views/#customizing-error-views
[drf-standardized-errors]: https://github.com/ghazi-git/drf-standardized-errors

View File

@ -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), 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).)
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`.
### `default`
@ -552,7 +552,7 @@ For further examples on `HiddenField` see the [validators](validators.md) docume
---
**Note:** `HiddenField()` does not appear in `partial=True` serializer (when making `PATCH` request).
**Note:** `HiddenField()` does not appear in `partial=True` serializer (when making `PATCH` request). This behavior might change in future, follow updates on [github discussion](https://github.com/encode/django-rest-framework/discussions/8259).
---
@ -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/stable/ref/models/querysets/#django.db.models.query.QuerySet.select_related
[django-docs-select-related]: https://docs.djangoproject.com/en/3.1/ref/models/querysets/#django.db.models.query.QuerySet.select_related

View File

@ -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/stable/ref/contrib/postgres/fields/#hstorefield
[JSONField]: https://docs.djangoproject.com/en/stable/ref/models/fields/#django.db.models.JSONField
[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
[postgres-search]: https://docs.djangoproject.com/en/stable/ref/contrib/postgres/search/

View File

@ -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/stable/ref/models/querysets/#django.db.models.query.QuerySet.select_related
[django-docs-select-related]: https://docs.djangoproject.com/en/3.1/ref/models/querysets/#django.db.models.query.QuerySet.select_related

View File

@ -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-guardian` package][django-rest-framework-guardian]. 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-guardian2` package][django-rest-framework-guardian2]. 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-guardian]: https://github.com/rpkilby/django-rest-framework-guardian
[django-rest-framework-guardian2]: https://github.com/johnthagen/django-rest-framework-guardian2
[drf-access-policy]: https://github.com/rsinger86/drf-access-policy
[drf-psq]: https://github.com/drf-psq/drf-psq

View File

@ -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/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
[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

View File

@ -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://www.heroku.com/blog/json_schema_for_heroku_platform_api/
[cite]: https://blog.heroku.com/archives/2014/1/8/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

View File

@ -110,7 +110,7 @@ You'll need to remember to also set your custom throttle class in the `'DEFAULT_
The built-in throttle implementations are open to [race conditions][race], so under high concurrency they may allow a few extra requests through.
If your project relies on guaranteeing the number of requests during concurrent requests, you will need to implement your own throttle class.
If your project relies on guaranteeing the number of requests during concurrent requests, you will need to implement your own throttle class. See [issue #5181][gh5181] for more details.
---
@ -220,4 +220,5 @@ The following is an example of a rate throttle, that will randomly throttle 1 in
[identifying-clients]: http://oxpedia.org/wiki/index.php?title=AppSuite:Grizzly#Multiple_Proxies_in_front_of_the_cluster
[cache-setting]: https://docs.djangoproject.com/en/stable/ref/settings/#caches
[cache-docs]: https://docs.djangoproject.com/en/stable/topics/cache/#setting-up-the-cache
[gh5181]: https://github.com/encode/django-rest-framework/issues/5181
[race]: https://en.wikipedia.org/wiki/Race_condition#Data_race

View File

@ -166,7 +166,7 @@ If you want the date field to be entirely hidden from the user, then use `Hidden
---
**Note:** `HiddenField()` does not appear in `partial=True` serializer (when making `PATCH` request).
**Note:** `HiddenField()` does not appear in `partial=True` serializer (when making `PATCH` request). This behavior might change in future, follow updates on [github discussion](https://github.com/encode/django-rest-framework/discussions/8259).
---

View File

@ -4,6 +4,8 @@
>
> &mdash; [Tim Berners-Lee][cite]
There are many ways you can contribute to Django REST framework. We'd like it to be a community-led project, so please get involved and help shape the future of the project.
!!! note
At this point in its lifespan we consider Django REST framework to be feature-complete. We focus on pull requests that track the continued development of Django versions, and generally do not accept new features or code formatting changes.
@ -28,9 +30,24 @@ The [Django code of conduct][code-of-conduct] gives a fuller set of guidelines f
# Issues
Our contribution process is that the [GitHub discussions page](https://github.com/encode/django-rest-framework/discussions) should generally be your starting point. Please only raise an issue or pull request if you've been recommended to do so after discussion.
Some tips on good potential issue reporting:
* Django REST framework is considered feature-complete. Please do not file requests to change behavior, unless it is required for security reasons or to maintain compatibility with upcoming Django or Python versions.
* Search the GitHub project page for related items, and make sure you're running the latest version of REST framework before reporting an issue.
* Feature requests will typically be closed with a recommendation that they be implemented outside the core REST framework library (e.g. as third-party libraries). This approach allows us to keep down the maintenance overhead of REST framework, so that the focus can be on continued stability and great documentation.
## Triaging issues
Getting involved in triaging incoming issues is a good way to start contributing. Every single ticket that comes into the ticket tracker needs to be reviewed in order to determine what the next steps should be. Anyone can help out with this, you just need to be willing to
* Read through the ticket - does it make sense, is it missing any context that would help explain it better?
* Is the ticket reported in the correct place, would it be better suited as a discussion on the discussion group?
* If the ticket is a bug report, can you reproduce it? Are you able to write a failing test case that demonstrates the issue and that can be submitted as a pull request?
* If the ticket is a feature request, could the feature request instead be implemented as a third party package?
* If a ticket hasn't had much activity and addresses something you need, then comment on the ticket and try to find out what's needed to get it moving again.
# Development
To start developing on Django REST framework, first create a Fork from the
@ -189,6 +206,7 @@ If you want to draw attention to a note or warning, use a pair of enclosing line
[code-of-conduct]: https://www.djangoproject.com/conduct/
[google-group]: https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework
[so-filter]: https://stackexchange.com/filters/66475/rest-framework
[issues]: https://github.com/encode/django-rest-framework/issues?state=open
[pep-8]: https://www.python.org/dev/peps/pep-0008/
[build-status]: ../img/build-status.png
[pull-requests]: https://help.github.com/articles/using-pull-requests

View File

@ -114,7 +114,7 @@ If you use REST framework commercially we strongly encourage you to invest in it
Signing up for a paid plan will:
* Directly contribute to faster releases, more features, and higher quality software.
* Allow more time to be invested in keeping the package up to date.
* Allow more time to be invested in documentation, issue triage, and community support.
* Safeguard the future development of REST framework.
REST framework continues to be open-source and permissively licensed, but we firmly believe it is in the commercial best-interest for users of the project to invest in its ongoing development.
@ -134,6 +134,18 @@ REST framework continues to be open-source and permissively licensed, but we fir
---
## What future funding will enable
* Realtime API support, using WebSockets. This will consist of documentation and support for using REST framework together with Django Channels, plus integrating WebSocket support into the client libraries.
* Better authentication defaults, possibly bringing JWT & CORS support into the core package.
* Securing the community & operations manager position long-term.
* Opening up and securing a part-time position to focus on ticket triage and resolution.
* Paying for development time on building API client libraries in a range of programming languages. These would be integrated directly into the upcoming API documentation.
Sign up for a paid plan today, and help ensure that REST framework becomes a sustainable, full-time funded project.
---
## What our sponsors and users say
> As a developer, Django REST framework feels like an obvious and natural extension to all the great things that make up Django and it's community. Getting started is easy while providing simple abstractions which makes it flexible and customizable. Contributing and supporting Django REST framework helps ensure its future and one way or another it also helps Django, and the Python ecosystem.
@ -153,8 +165,6 @@ DRF is one of the core reasons why Django is top choice among web frameworks tod
>
> &mdash; Andrew Conti, Django REST framework user
Sign up for a paid plan today, and help ensure that REST framework becomes a sustainable, full-time funded project.
---
## Individual plan

View File

@ -34,6 +34,7 @@ Further notes for maintainers:
* Code changes should come in the form of a pull request - do not push directly to master.
* Maintainers should typically not merge their own pull requests.
* Each issue/pull request should have exactly one label once triaged.
* Search for un-triaged issues with [is:open no:label][un-triaged].
---
@ -156,6 +157,7 @@ The following issues still need to be addressed:
* Document ownership and management of the security mailing list.
[bus-factor]: https://en.wikipedia.org/wiki/Bus_factor
[un-triaged]: https://github.com/encode/django-rest-framework/issues?q=is%3Aopen+no%3Alabel
[transifex-project]: https://www.transifex.com/projects/p/django-rest-framework/
[transifex-client]: https://pypi.org/project/transifex-client/
[translation-memory]: http://docs.transifex.com/guides/tm#let-tm-automatically-populate-translations

View File

@ -32,7 +32,7 @@ We suggest adding your package to the [REST Framework][rest-framework-grid] grid
#### Adding to the Django REST framework docs
Create a [Pull Request][drf-create-pr] on GitHub, and we'll add a link to it from the main REST framework documentation. You can add your package under **Third party packages** of the API Guide section that best applies, like [Authentication][authentication] or [Permissions][permissions]. You can also link your package under the [Third Party Packages][third-party-packages] section.
Create a [Pull Request][drf-create-pr] or [Issue][drf-create-issue] on GitHub, and we'll add a link to it from the main REST framework documentation. You can add your package under **Third party packages** of the API Guide section that best applies, like [Authentication][authentication] or [Permissions][permissions]. You can also link your package under the [Third Party Packages][third-party-packages] section.
#### Announce on the discussion group.
@ -44,7 +44,7 @@ Django REST Framework has a growing community of developers, packages, and resou
Check out a grid detailing all the packages and ecosystem around Django REST Framework at [Django Packages][rest-framework-grid].
To submit new content, [create a pull request][drf-create-pr].
To submit new content, [open an issue][drf-create-issue] or [create a pull request][drf-create-pr].
## Async Support
@ -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-guardian][django-rest-framework-guardian] - Provides integration with django-guardian, including the `DjangoObjectPermissionsFilter` previously found in DRF.
* [django-rest-framework-guardian2][django-rest-framework-guardian2] - Provides integration with django-guardian, including the `DjangoObjectPermissionsFilter` previously found in DRF.
### Misc
@ -160,7 +160,6 @@ To submit new content, [create a pull request][drf-create-pr].
### Customization
* [drf-restwind][drf-restwind] - a modern re-imagining of the Django REST Framework utilizes TailwindCSS and DaisyUI to provide flexible and customizable UI solutions with minimal coding effort.
* [drf-redesign][drf-redesign] - A project that gives a fresh look to the browse-able API using Bootstrap 5.
* [drf-material][drf-material] - A project that gives a sleek and elegant look to the browsable API using Material Design.
@ -175,6 +174,7 @@ To submit new content, [create a pull request][drf-create-pr].
[drf-compat]: https://github.com/encode/django-rest-framework/blob/master/rest_framework/compat.py
[rest-framework-grid]: https://www.djangopackages.com/grids/g/django-rest-framework/
[drf-create-pr]: https://github.com/encode/django-rest-framework/compare
[drf-create-issue]: https://github.com/encode/django-rest-framework/issues/new
[authentication]: ../api-guide/authentication.md
[permissions]: ../api-guide/permissions.md
[third-party-packages]: ../topics/third-party-packages/#existing-third-party-packages
@ -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-guardian]: https://github.com/rpkilby/django-rest-framework-guardian
[django-rest-framework-guardian2]: https://github.com/johnthagen/django-rest-framework-guardian2
[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
@ -255,7 +255,6 @@ To submit new content, [create a pull request][drf-create-pr].
[django-requestlogs]: https://github.com/Raekkeri/django-requestlogs
[drf-standardized-errors]: https://github.com/ghazi-git/drf-standardized-errors
[drf-api-action]: https://github.com/Ori-Roza/drf-api-action
[drf-restwind]: https://github.com/youzarsiph/drf-restwind
[drf-redesign]: https://github.com/youzarsiph/drf-redesign
[drf-material]: https://github.com/youzarsiph/drf-material
[django-pyoidc]: https://github.com/makinacorpus/django_pyoidc
[django-pyoidc] : https://github.com/makinacorpus/django_pyoidc

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

BIN
docs/img/rfm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

BIN
docs/img/rfr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

View File

@ -81,43 +81,22 @@ For more specific CSS tweaks than simply overriding the default bootstrap theme
### Third party packages for customization
You can use a third party package for customization, rather than doing it by yourself. Here is 3 packages for customizing the API:
You can use a third party package for customization, rather than doing it by yourself. Here is 2 packages for customizing the API:
* [drf-restwind][drf-restwind] - a modern re-imagining of the Django REST Framework utilizes TailwindCSS and DaisyUI to provide flexible and customizable UI solutions with minimal coding effort.
* [drf-redesign][drf-redesign] - A package for customizing the API using Bootstrap 5. Modern and sleek design, it comes with the support for dark mode.
* [drf-material][drf-material] - Material design for Django REST Framework.
* [rest-framework-redesign][rest-framework-redesign] - A package for customizing the API using Bootstrap 5. Modern and sleek design, it comes with the support for dark mode.
* [rest-framework-material][rest-framework-material] - Material design for Django REST Framework.
---
![API Root][drf-rw-api-root]
![Django REST Framework Redesign][rfr]
![List View][drf-rw-list-view]
![Detail View][drf-rw-detail-view]
*Screenshots of the drf-restwind*
*Screenshot of the rest-framework-redesign*
---
---
![Django REST Framework Material][rfm]
![API Root][drf-r-api-root]
![List View][drf-r-list-view]
![Detail View][drf-r-detail-view]
*Screenshot of the drf-redesign*
---
![API Root][drf-m-api-root]
![List View][drf-m-api-root]
![Detail View][drf-m-api-root]
*Screenshot of the drf-material*
*Screenshot of the rest-framework-material*
---
@ -218,15 +197,7 @@ There are [a variety of packages for autocomplete widgets][autocomplete-packages
[bcomponentsnav]: https://getbootstrap.com/2.3.2/components.html#navbar
[autocomplete-packages]: https://www.djangopackages.com/grids/g/auto-complete/
[django-autocomplete-light]: https://github.com/yourlabs/django-autocomplete-light
[drf-restwind]: https://github.com/youzarsiph/drf-restwind
[drf-rw-api-root]: ../img/drf-rw-api-root.png
[drf-rw-list-view]: ../img/drf-rw-list-view.png
[drf-rw-detail-view]: ../img/drf-rw-detail-view.png
[drf-redesign]: https://github.com/youzarsiph/drf-redesign
[drf-r-api-root]: ../img/drf-r-api-root.png
[drf-r-list-view]: ../img/drf-r-list-view.png
[drf-r-detail-view]: ../img/drf-r-detail-view.png
[drf-material]: https://github.com/youzarsiph/drf-material
[drf-m-api-root]: ../img/drf-m-api-root.png
[drf-m-list-view]: ../img/drf-m-list-view.png
[drf-m-detail-view]: ../img/drf-m-detail-view.png
[rest-framework-redesign]: https://github.com/youzarsiph/rest-framework-redesign
[rest-framework-material]: https://github.com/youzarsiph/rest-framework-material
[rfr]: ../img/rfr.png
[rfm]: ../img/rfm.png

View File

@ -94,22 +94,6 @@ 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.

View File

@ -42,4 +42,4 @@ class Command(BaseCommand):
username)
)
self.stdout.write(
f'Generated token {token.key} for user {username}')
'Generated token {} for user {}'.format(token.key, username))

View File

@ -111,7 +111,7 @@ def get_attribute(instance, attrs):
# If we raised an Attribute or KeyError here it'd get treated
# as an omitted field in `Field.get_attribute()`. Instead we
# raise a ValueError to ensure the exception is not masked.
raise ValueError(f'Exception raised in callable attribute "{attr}"; original exception was: {exc}')
raise ValueError('Exception raised in callable attribute "{}"; original exception was: {}'.format(attr, exc))
return instance
@ -1103,7 +1103,7 @@ class DecimalField(Field):
if self.localize:
return localize_input(quantized)
return f'{quantized:f}'
return '{:f}'.format(quantized)
def quantize(self, value):
"""
@ -1861,7 +1861,7 @@ class SerializerMethodField(Field):
def bind(self, field_name, parent):
# The method name defaults to `get_{field_name}`.
if self.method_name is None:
self.method_name = f'get_{field_name}'
self.method_name = 'get_{field_name}'.format(field_name=field_name)
super().bind(field_name, parent)

View File

@ -8,7 +8,6 @@
# Bashar Al-Abdulhadi, 2016-2017
# Eyad Toma <d.eyad.t@gmail.com>, 2015,2017
# zak zak <zakaria.bendifallah@gmail.com>, 2020
# Salman Saeed Albukhaitan <ssyb2014@gmail.com>, 2024
msgid ""
msgstr ""
"Project-Id-Version: Django REST framework\n"
@ -25,19 +24,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."
@ -94,7 +93,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\"."
@ -102,11 +101,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."
@ -131,11 +130,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
@ -144,17 +143,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 "متوقع التوفر خلال {wait} ثانية."
msgstr ""
#: exceptions.py:225
#, python-brace-format
msgid "Expected available in {wait} seconds."
msgstr "متوقع التوفر خلال {wait} ثواني."
msgstr ""
#: fields.py:316 relations.py:245 relations.py:279 validators.py:90
#: validators.py:183
@ -167,11 +166,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."
@ -180,16 +179,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."
@ -205,7 +204,7 @@ msgstr "أدخل \"slug\" صالح يحتوي على حروف، أرقام، ش
msgid ""
"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, "
"or hyphens."
msgstr "أدخل \"slug\" صالح يحتوي على حروف يونيكود، أرقام، شُرط سفلية أو واصلات."
msgstr ""
#: fields.py:854
msgid "Enter a valid URL."
@ -213,7 +212,7 @@ msgstr "الرجاء إدخال رابط إلكتروني صالح."
#: fields.py:867
msgid "Must be a valid UUID."
msgstr "يجب أن يكون معرف UUID صالح."
msgstr ""
#: fields.py:903
msgid "Enter a valid IPv4 or IPv6 address."
@ -226,16 +225,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."
@ -250,7 +249,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
@ -262,7 +261,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."
@ -271,11 +270,11 @@ msgstr "متوقع تاريخ و وقت و وجد تاريخ فقط"
#: fields.py:1150
#, python-brace-format
msgid "Invalid datetime for the timezone \"{timezone}\"."
msgstr "تاريخ و وقت غير صالح للمنطقة الزمنية \"{timezone}\"."
msgstr ""
#: fields.py:1151
msgid "Datetime value out of range."
msgstr "قيمة التاريخ و الوقت خارج النطاق."
msgstr ""
#: fields.py:1236
#, python-brace-format
@ -294,12 +293,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
@ -318,7 +317,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."
@ -327,41 +326,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 "تأكد ان عدد العناصر في هذا الحقل لا يقل عن {min_length}."
msgstr ""
#: fields.py:1606
#, python-brace-format
msgid "Ensure this field has no more than {max_length} elements."
msgstr "تأكد ان عدد العناصر في هذا الحقل لا يتجاوز {max_length}."
msgstr ""
#: fields.py:1682
#, python-brace-format
@ -370,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."
@ -382,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"
@ -390,7 +389,7 @@ msgstr "الترتيب"
#: filters.py:181
msgid "Which field to use when ordering the results."
msgstr "أي حقل يجب استخدامه عند ترتيب النتائج."
msgstr ""
#: filters.py:287
msgid "ascending"
@ -402,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."
@ -414,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"
@ -432,24 +431,24 @@ msgstr "معرف العنصر \"{pk_value}\" غير صالح - العنصر غ
#: relations.py:247
#, python-brace-format
msgid "Incorrect type. Expected pk value, received {data_type}."
msgstr "نوع غير صحيح. يتوقع قيمة معرف العنصر، بينما حصل على {data_type}."
msgstr "نوع خاطئ. المتوقع قيمة من pk، لكن المتحصل عليه {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
@ -462,20 +461,20 @@ msgstr "قيمة غير صالحة."
#: schemas/utils.py:32
msgid "unique integer value"
msgstr "رقم صحيح فريد"
msgstr ""
#: schemas/utils.py:34
msgid "UUID string"
msgstr "نص UUID"
msgstr ""
#: schemas/utils.py:36
msgid "unique value"
msgstr "قيمة فريدة"
msgstr ""
#: schemas/utils.py:38
#, python-brace-format
msgid "A {value_type} identifying this {name}."
msgstr "نوع {value_type} يحدد هذا {name}."
msgstr ""
#: serializers.py:337
#, python-brace-format
@ -485,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
@ -494,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
@ -526,7 +525,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."
@ -540,7 +539,7 @@ msgstr "الحقول {field_names} يجب أن تشكل مجموعة فريدة.
#: validators.py:171
#, python-brace-format
msgid "Surrogate characters are not allowed: U+{code_point:X}."
msgstr "لا يُسمح بالحروف البديلة: U+{code_point:X}."
msgstr ""
#: validators.py:243
#, python-brace-format
@ -559,11 +558,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."

View File

@ -11,7 +11,6 @@
# Thomas Tanner, 2015
# Tom Jaster <futur3.tom@googlemail.com>, 2015
# Xavier Ordoquy <xordoquy@linovia.com>, 2015
# stefan6419846, 2025
msgid ""
msgstr ""
"Project-Id-Version: Django REST framework\n"
@ -28,19 +27,19 @@ msgstr ""
#: authentication.py:70
msgid "Invalid basic header. No credentials provided."
msgstr "Ungültiger Basic Header. Keine Zugangsdaten angegeben."
msgstr "Ungültiger basic header. Keine Zugangsdaten angegeben."
#: authentication.py:73
msgid "Invalid basic header. Credentials string should not contain spaces."
msgstr "Ungültiger Basic Header. Zugangsdaten sollen keine Leerzeichen enthalten."
msgstr "Ungültiger basic header. Zugangsdaten sollen keine Leerzeichen enthalten."
#: authentication.py:83
msgid "Invalid basic header. Credentials not correctly base64 encoded."
msgstr "Ungültiger Basic Header. Zugangsdaten sind nicht korrekt mit base64 kodiert."
msgstr "Ungültiger basic header. Zugangsdaten sind nicht korrekt mit base64 kodiert."
#: authentication.py:101
msgid "Invalid username/password."
msgstr "Ungültiger Benutzername/Passwort."
msgstr "Ungültiger Benutzername/Passwort"
#: authentication.py:104 authentication.py:206
msgid "User inactive or deleted."
@ -48,16 +47,16 @@ msgstr "Benutzer inaktiv oder gelöscht."
#: authentication.py:184
msgid "Invalid token header. No credentials provided."
msgstr "Ungültiger Token Header. Keine Zugangsdaten angegeben."
msgstr "Ungültiger token header. Keine Zugangsdaten angegeben."
#: authentication.py:187
msgid "Invalid token header. Token string should not contain spaces."
msgstr "Ungültiger Token Header. Zugangsdaten sollen keine Leerzeichen enthalten."
msgstr "Ungültiger token header. Zugangsdaten sollen keine Leerzeichen enthalten."
#: authentication.py:193
msgid ""
"Invalid token header. Token string should not contain invalid characters."
msgstr "Ungültiger Token Header. Zugangsdaten dürfen keine ungültigen Zeichen enthalten."
msgstr "Ungültiger Token Header. Tokens dürfen keine ungültigen Zeichen enthalten."
#: authentication.py:203
msgid "Invalid token."
@ -109,7 +108,7 @@ msgstr "Ein Serverfehler ist aufgetreten."
#: exceptions.py:142
msgid "Invalid input."
msgstr "Ungültige Eingabe."
msgstr ""
#: exceptions.py:161
msgid "Malformed request."
@ -125,7 +124,7 @@ msgstr "Anmeldedaten fehlen."
#: exceptions.py:179
msgid "You do not have permission to perform this action."
msgstr "Sie sind nicht berechtigt, diese Aktion durchzuführen."
msgstr "Sie sind nicht berechtigt diese Aktion durchzuführen."
#: exceptions.py:185
msgid "Not found."
@ -152,17 +151,17 @@ msgstr "Die Anfrage wurde gedrosselt."
#: exceptions.py:224
#, python-brace-format
msgid "Expected available in {wait} second."
msgstr "Erwarte Verfügbarkeit in {wait} Sekunde."
msgstr ""
#: exceptions.py:225
#, python-brace-format
msgid "Expected available in {wait} seconds."
msgstr "Erwarte Verfügbarkeit in {wait} Sekunden."
msgstr ""
#: fields.py:316 relations.py:245 relations.py:279 validators.py:90
#: validators.py:183
msgid "This field is required."
msgstr "Dieses Feld ist zwingend erforderlich."
msgstr "Dieses Feld ist erforderlich."
#: fields.py:317
msgid "This field may not be null."
@ -170,11 +169,11 @@ msgstr "Dieses Feld darf nicht null sein."
#: fields.py:701
msgid "Must be a valid boolean."
msgstr "Muss ein gültiger Wahrheitswert sein."
msgstr ""
#: fields.py:766
msgid "Not a valid string."
msgstr "Kein gültiger String."
msgstr ""
#: fields.py:767
msgid "This field may not be blank."
@ -208,7 +207,7 @@ msgstr "Gib ein gültiges \"slug\" aus Buchstaben, Ziffern, Unterstrichen und Mi
msgid ""
"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, "
"or hyphens."
msgstr "Gib ein gültiges \"slug\" aus Unicode-Buchstaben, Ziffern, Unterstrichen und Minuszeichen ein."
msgstr ""
#: fields.py:854
msgid "Enter a valid URL."
@ -216,11 +215,11 @@ msgstr "Gib eine gültige URL ein."
#: fields.py:867
msgid "Must be a valid UUID."
msgstr "Muss eine gültige UUID sein."
msgstr ""
#: fields.py:903
msgid "Enter a valid IPv4 or IPv6 address."
msgstr "Geben Sie eine gültige IPv4 oder IPv6 Adresse an."
msgstr "Geben Sie eine gültige IPv4 oder IPv6 Adresse an"
#: fields.py:931
msgid "A valid integer is required."
@ -274,11 +273,11 @@ msgstr "Erwarte eine Datums- und Zeitangabe, erhielt aber ein Datum."
#: fields.py:1150
#, python-brace-format
msgid "Invalid datetime for the timezone \"{timezone}\"."
msgstr "Ungültige Datumsangabe für die Zeitzone \"{timezone}\"."
msgstr ""
#: fields.py:1151
msgid "Datetime value out of range."
msgstr "Datumsangabe außerhalb des Bereichs."
msgstr ""
#: fields.py:1236
#, python-brace-format
@ -359,12 +358,12 @@ msgstr "Diese Liste darf nicht leer sein."
#: fields.py:1605
#, python-brace-format
msgid "Ensure this field has at least {min_length} elements."
msgstr "Dieses Feld muss mindestens {min_length} Einträge enthalten."
msgstr ""
#: fields.py:1606
#, python-brace-format
msgid "Ensure this field has no more than {max_length} elements."
msgstr "Dieses Feld darf nicht mehr als {max_length} Einträge enthalten."
msgstr ""
#: fields.py:1682
#, python-brace-format
@ -373,7 +372,7 @@ msgstr "Erwartete ein Dictionary mit Elementen, erhielt aber den Typ \"{input_ty
#: fields.py:1683
msgid "This dictionary may not be empty."
msgstr "Dieses Dictionary darf nicht leer sein."
msgstr ""
#: fields.py:1755
msgid "Value must be valid JSON."
@ -385,7 +384,7 @@ msgstr "Suche"
#: filters.py:50
msgid "A search term."
msgstr "Ein Suchbegriff."
msgstr ""
#: filters.py:180 templates/rest_framework/filters/ordering.html:3
msgid "Ordering"
@ -393,7 +392,7 @@ msgstr "Sortierung"
#: filters.py:181
msgid "Which field to use when ordering the results."
msgstr "Feld, das zum Sortieren der Ergebnisse verwendet werden soll."
msgstr ""
#: filters.py:287
msgid "ascending"
@ -405,11 +404,11 @@ msgstr "Absteigend"
#: pagination.py:174
msgid "A page number within the paginated result set."
msgstr "Eine Seitenzahl in der paginierten Ergebnismenge."
msgstr ""
#: pagination.py:179 pagination.py:372 pagination.py:590
msgid "Number of results to return per page."
msgstr "Anzahl der pro Seite zurückzugebenden Ergebnisse."
msgstr ""
#: pagination.py:189
msgid "Invalid page."
@ -417,11 +416,11 @@ msgstr "Ungültige Seite."
#: pagination.py:374
msgid "The initial index from which to return the results."
msgstr "Der initiale Index, von dem die Ergebnisse zurückgegeben werden sollen."
msgstr ""
#: pagination.py:581
msgid "The pagination cursor value."
msgstr "Der Zeigerwert für die Paginierung"
msgstr ""
#: pagination.py:583
msgid "Invalid cursor"
@ -435,7 +434,7 @@ msgstr "Ungültiger pk \"{pk_value}\" - Object existiert nicht."
#: relations.py:247
#, python-brace-format
msgid "Incorrect type. Expected pk value, received {data_type}."
msgstr "Falscher Typ. Erwarte pk-Wert, erhielt aber {data_type}."
msgstr "Falscher Typ. Erwarte pk Wert, erhielt aber {data_type}."
#: relations.py:280
msgid "Invalid hyperlink - No URL match."
@ -452,7 +451,7 @@ msgstr "Ungültiger Hyperlink - Objekt existiert nicht."
#: relations.py:283
#, python-brace-format
msgid "Incorrect type. Expected URL string, received {data_type}."
msgstr "Falscher Typ. Erwarte URL-Zeichenkette, erhielt aber {data_type}."
msgstr "Falscher Typ. Erwarte URL Zeichenkette, erhielt aber {data_type}."
#: relations.py:448
#, python-brace-format
@ -465,20 +464,20 @@ msgstr "Ungültiger Wert."
#: schemas/utils.py:32
msgid "unique integer value"
msgstr "eindeutiger Ganzzahl-Wert"
msgstr ""
#: schemas/utils.py:34
msgid "UUID string"
msgstr "UUID-String"
msgstr ""
#: schemas/utils.py:36
msgid "unique value"
msgstr "eindeutiger Wert"
msgstr ""
#: schemas/utils.py:38
#, python-brace-format
msgid "A {value_type} identifying this {name}."
msgstr "Ein {value_type}, der {name} identifiziert."
msgstr ""
#: serializers.py:337
#, python-brace-format
@ -488,7 +487,7 @@ msgstr "Ungültige Daten. Dictionary erwartet, aber {datatype} erhalten."
#: templates/rest_framework/admin.html:116
#: templates/rest_framework/base.html:136
msgid "Extra Actions"
msgstr "Zusätzliche Aktionen"
msgstr ""
#: templates/rest_framework/admin.html:130
#: templates/rest_framework/base.html:150
@ -497,27 +496,27 @@ msgstr "Filter"
#: templates/rest_framework/base.html:37
msgid "navbar"
msgstr "Navigation"
msgstr ""
#: templates/rest_framework/base.html:75
msgid "content"
msgstr "Inhalt"
msgstr ""
#: templates/rest_framework/base.html:78
msgid "request form"
msgstr "Anfrage-Formular"
msgstr ""
#: templates/rest_framework/base.html:157
msgid "main content"
msgstr "Hauptteil"
msgstr ""
#: templates/rest_framework/base.html:173
msgid "request info"
msgstr "Anfrage-Informationen"
msgstr ""
#: templates/rest_framework/base.html:177
msgid "response info"
msgstr "Antwort-Informationen"
msgstr ""
#: templates/rest_framework/horizontal/radio.html:4
#: templates/rest_framework/inline/radio.html:3
@ -543,7 +542,7 @@ msgstr "Die Felder {field_names} müssen eine eindeutige Menge bilden."
#: validators.py:171
#, python-brace-format
msgid "Surrogate characters are not allowed: U+{code_point:X}."
msgstr "Ersatzzeichen sind nicht erlaubt: U+{code_point:X}."
msgstr ""
#: validators.py:243
#, python-brace-format
@ -566,7 +565,7 @@ msgstr "Ungültige Version in der \"Accept\" Kopfzeile."
#: versioning.py:71
msgid "Invalid version in URL path."
msgstr "Ungültige Version im URL-Pfad."
msgstr "Ungültige Version im URL Pfad."
#: versioning.py:116
msgid "Invalid version in URL path. Does not match any version namespace."

View File

@ -10,13 +10,12 @@
# Miguel Gonzalez <migonzalvar@gmail.com>, 2016
# Miguel Gonzalez <migonzalvar@gmail.com>, 2015-2016
# Sergio Infante <rsinfante@gmail.com>, 2015
# Federico Bond <federicobond@gmail.com>, 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: 2025-05-19 00:05+1000\n"
"PO-Revision-Date: 2020-10-13 19:45+0000\n"
"Last-Translator: Xavier Ordoquy <xordoquy@linovia.com>\n"
"Language-Team: Spanish (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/es/)\n"
"MIME-Version: 1.0\n"
@ -108,7 +107,7 @@ msgstr "Se ha producido un error en el servidor."
#: exceptions.py:142
msgid "Invalid input."
msgstr "Entrada inválida."
msgstr ""
#: exceptions.py:161
msgid "Malformed request."
@ -151,12 +150,12 @@ msgstr "Solicitud fue regulada (throttled)."
#: exceptions.py:224
#, python-brace-format
msgid "Expected available in {wait} second."
msgstr "Se espera que esté disponible en {wait} segundo."
msgstr ""
#: exceptions.py:225
#, python-brace-format
msgid "Expected available in {wait} seconds."
msgstr "Se espera que esté disponible en {wait} segundos."
msgstr ""
#: fields.py:316 relations.py:245 relations.py:279 validators.py:90
#: validators.py:183
@ -169,11 +168,11 @@ msgstr "Este campo no puede ser nulo."
#: fields.py:701
msgid "Must be a valid boolean."
msgstr "Debe ser un booleano válido."
msgstr ""
#: fields.py:766
msgid "Not a valid string."
msgstr "No es una cadena válida."
msgstr ""
#: fields.py:767
msgid "This field may not be blank."
@ -205,8 +204,9 @@ 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 "Introduzca un “slug” válido compuesto por letras Unicode, números, guiones bajos o medios."
"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, "
"or hyphens."
msgstr ""
#: 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 "Debe ser un UUID válido."
msgstr ""
#: 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 "Fecha y hora inválida para la zona horaria \"{timezone}\"."
msgstr ""
#: fields.py:1151
msgid "Datetime value out of range."
msgstr "Valor de fecha y hora fuera de rango."
msgstr ""
#: 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 "Asegúrese de que este campo tiene al menos {min_length} elementos."
msgstr ""
#: fields.py:1606
#, python-brace-format
msgid "Ensure this field has no more than {max_length} elements."
msgstr "Asegúrese de que este campo no tiene más de {max_length} elementos."
msgstr ""
#: 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 "Este diccionario no debe estar vacío."
msgstr ""
#: fields.py:1755
msgid "Value must be valid JSON."
@ -383,7 +383,7 @@ msgstr "Buscar"
#: filters.py:50
msgid "A search term."
msgstr "Un término de búsqueda."
msgstr ""
#: 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 "Qué campo usar para ordenar los resultados."
msgstr ""
#: filters.py:287
msgid "ascending"
@ -403,11 +403,11 @@ msgstr "descendiente"
#: pagination.py:174
msgid "A page number within the paginated result set."
msgstr "Un número de página dentro del conjunto de resultados paginado."
msgstr ""
#: pagination.py:179 pagination.py:372 pagination.py:590
msgid "Number of results to return per page."
msgstr "Número de resultados a devolver por página."
msgstr ""
#: 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 "El índice inicial a partir del cual devolver los resultados."
msgstr ""
#: pagination.py:581
msgid "The pagination cursor value."
msgstr "El valor del cursor de paginación."
msgstr ""
#: pagination.py:583
msgid "Invalid cursor"
@ -463,20 +463,20 @@ msgstr "Valor inválido."
#: schemas/utils.py:32
msgid "unique integer value"
msgstr "valor de entero único"
msgstr ""
#: schemas/utils.py:34
msgid "UUID string"
msgstr "Cadena UUID"
msgstr ""
#: schemas/utils.py:36
msgid "unique value"
msgstr "valor único"
msgstr ""
#: schemas/utils.py:38
#, python-brace-format
msgid "A {value_type} identifying this {name}."
msgstr "Un {value_type} que identifique este {name}."
msgstr ""
#: 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 "Acciones extras"
msgstr ""
#: templates/rest_framework/admin.html:130
#: templates/rest_framework/base.html:150

View File

@ -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 "انتظار می‌رود در {wait} ثانیه در دسترس باشد."
msgstr ""
#: exceptions.py:225
#, python-brace-format
msgid "Expected available in {wait} seconds."
msgstr "انتظار می‌رود در {wait} ثانیه در دسترس باشد."
msgstr ""
#: 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 "باید یک UUID معتبر باشد."
msgstr ""
#: 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 "تاریخ و زمان برای منطقه زمانی \"{timezone}\" نامعتبر است."
msgstr ""
#: 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 "اطمینان حاصل کنید که این فیلد حداقل {min_length} عنصر دارد."
msgstr ""
#: fields.py:1606
#, python-brace-format
msgid "Ensure this field has no more than {max_length} elements."
msgstr "اطمینان حاصل کنید که این فیلد بیش از {max_length} عنصر ندارد."
msgstr ""
#: 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 "رشته UUID"
msgstr ""
#: schemas/utils.py:36
msgid "unique value"
msgstr "مقدار یکتا"
msgstr ""
#: schemas/utils.py:38
#, python-brace-format
msgid "A {value_type} identifying this {name}."
msgstr "یک {value_type} که این {name} را شناسایی میکند."
msgstr ""
#: 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 "کاراکترهای جایگزین مجاز نیستند: U+{code_point:X}."
msgstr ""
#: validators.py:243
#, python-brace-format

View File

@ -1,578 +0,0 @@
# This file is distributed under the same license as the Django REST framework package.
# Translators:
# Dulat Kushibayev <kushibayev@gmail.com>, 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 <kushibayev@gmail.com>\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 "Сұраныс параметрінде нұсқа қате көрсетілген."

View File

@ -1,37 +1,37 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
#
# Translators:
# JAEGYUN JUNG <twicegoddessana1229@gmail.com>, 2024
# Hochul Kwak <rhkrghcjf@gmail.com>, 2018
# GarakdongBigBoy <novelview9@gmail.com>, 2017
# Hochul Kwak <rhkrghcjf@gmail.com>, 2018
# Joon Hwan 김준환 <xncbf12@gmail.com>, 2017
# SUN CHOI <best2378@gmail.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: Django REST framework\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-22 16:13+0900\n"
"POT-Creation-Date: 2020-10-13 21:45+0200\n"
"PO-Revision-Date: 2020-10-13 19:45+0000\n"
"Last-Translator: JAEGYUN JUNG <twicegoddessana1229@gmail.com>\n"
"Language: ko_KR\n"
"Last-Translator: Xavier Ordoquy <xordoquy@linovia.com>\n"
"Language-Team: Korean (Korea) (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/ko_KR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ko_KR\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: authentication.py:70
msgid "Invalid basic header. No credentials provided."
msgstr "기본 헤더가 유효하지 않습니다. 인증 데이터가 제공되지 않았습니다."
msgstr "기본 헤더(basic header)가 유효하지 않습니다. 인증데이터(credentials)가 제공되지 않았습니다."
#: authentication.py:73
msgid "Invalid basic header. Credentials string should not contain spaces."
msgstr "기본 헤더가 유효하지 않습니다. 인증 데이터 문자열은 공백을 포함하지 않아야 합니다."
msgstr "기본 헤더(basic header)가 유효하지 않습니다. 인증데이터(credentials) 문자열은 빈칸(spaces)을 포함하지 않아야 합니다."
#: authentication.py:84
#: authentication.py:83
msgid "Invalid basic header. Credentials not correctly base64 encoded."
msgstr "기본 헤더가 유효하지 않습니다. 인증 데이터가 올바르게 base64 인코딩되지 않았습니다."
msgstr "기본 헤더(basic header)가 유효하지 않습니다. 인증데이터(credentials)가 base64로 적절히 부호화(encode)되지 않았습니다."
#: authentication.py:101
msgid "Invalid username/password."
@ -43,11 +43,11 @@ msgstr "계정이 중지되었거나 삭제되었습니다."
#: authentication.py:184
msgid "Invalid token header. No credentials provided."
msgstr "토큰 헤더가 유효하지 않습니다. 인증 데이터가 제공되지 않았습니다."
msgstr "토큰 헤더가 유효하지 않습니다. 인증데이터(credentials)가 제공되지 않았습니다."
#: authentication.py:187
msgid "Invalid token header. Token string should not contain spaces."
msgstr "토큰 헤더가 유효하지 않습니다. 토큰 문자열은 공백을 포함하지 않아야 합니다."
msgstr "토큰 헤더가 유효하지 않습니다. 토큰 문자열은 빈칸(spaces)을 포함하지 않아야 합니다."
#: authentication.py:193
msgid ""
@ -58,10 +58,6 @@ msgstr "토큰 헤더가 유효하지 않습니다. 토큰 문자열은 유효
msgid "Invalid token."
msgstr "토큰이 유효하지 않습니다."
#: authtoken/admin.py:28 authtoken/serializers.py:9
msgid "Username"
msgstr "사용자 이름"
#: authtoken/apps.py:7
msgid "Auth Token"
msgstr "인증 토큰"
@ -72,19 +68,23 @@ msgstr "키"
#: authtoken/models.py:16
msgid "User"
msgstr "사용자"
msgstr "유저"
#: authtoken/models.py:18
msgid "Created"
msgstr "생성일시"
msgstr "생성"
#: authtoken/models.py:27 authtoken/models.py:54 authtoken/serializers.py:19
#: authtoken/models.py:27 authtoken/serializers.py:19
msgid "Token"
msgstr "토큰"
#: authtoken/models.py:28 authtoken/models.py:55
#: authtoken/models.py:28
msgid "Tokens"
msgstr "토큰(들)"
msgstr ""
#: authtoken/serializers.py:9
msgid "Username"
msgstr "유저이름"
#: authtoken/serializers.py:13
msgid "Password"
@ -92,398 +92,390 @@ msgstr "비밀번호"
#: authtoken/serializers.py:35
msgid "Unable to log in with provided credentials."
msgstr "제공된 인증 데이터로는 로그인할 수 없습니다."
msgstr "제공된 인증데이터(credentials)로는 로그인할 수 없습니다."
#: authtoken/serializers.py:38
msgid "Must include \"username\" and \"password\"."
msgstr "\"아이디\"와 \"비밀번호\"를 포함해야 합니다."
#: exceptions.py:105
#: exceptions.py:102
msgid "A server error occurred."
msgstr "서버 장애가 발생했습니다."
#: exceptions.py:145
#: exceptions.py:142
msgid "Invalid input."
msgstr "유효하지 않은 입력입니다."
msgstr ""
#: exceptions.py:166
#: exceptions.py:161
msgid "Malformed request."
msgstr "잘못된 요청입니다."
#: exceptions.py:172
#: exceptions.py:167
msgid "Incorrect authentication credentials."
msgstr "자격 인증 데이터가 올바르지 않습니다."
msgstr "자격 인증데이터(authentication credentials)가 정확하지 않습니다."
#: exceptions.py:178
#: exceptions.py:173
msgid "Authentication credentials were not provided."
msgstr "자격 인증 데이터가 제공되지 않았습니다."
msgstr "자격 인증데이터(authentication credentials)가 제공되지 않았습니다."
#: exceptions.py:184
#: exceptions.py:179
msgid "You do not have permission to perform this action."
msgstr "이 작업을 수행할 권한이 없습니다."
msgstr "이 작업을 수행할 권한(permission)이 없습니다."
#: exceptions.py:190
#: exceptions.py:185
msgid "Not found."
msgstr "찾을 수 없습니다."
#: exceptions.py:196
#: exceptions.py:191
#, python-brace-format
msgid "Method \"{method}\" not allowed."
msgstr "메서드 \"{method}\"는 허용되지 않습니다."
msgstr "메소드(Method) \"{method}\"는 허용되지 않습니다."
#: exceptions.py:207
#: exceptions.py:202
msgid "Could not satisfy the request Accept header."
msgstr "요청 Accept 헤더를 만족시킬 수 없습니다."
msgstr "Accept header 요청을 만족할 수 없습니다."
#: exceptions.py:217
#: exceptions.py:212
#, python-brace-format
msgid "Unsupported media type \"{media_type}\" in request."
msgstr "요청된 \"{media_type}\"가 지원되지 않는 미디어 형태입니다."
#: exceptions.py:228
#: exceptions.py:223
msgid "Request was throttled."
msgstr "요청이 제한되었습니다."
msgstr "요청이 지연(throttled)되었습니다."
#: exceptions.py:229
#: exceptions.py:224
#, python-brace-format
msgid "Expected available in {wait} second."
msgstr "{wait} 초 후에 사용 가능합니다."
msgstr ""
#: exceptions.py:230
#: exceptions.py:225
#, python-brace-format
msgid "Expected available in {wait} seconds."
msgstr "{wait} 초 후에 사용 가능합니다."
msgstr ""
#: fields.py:292 relations.py:240 relations.py:276 validators.py:99
#: validators.py:219
#: fields.py:316 relations.py:245 relations.py:279 validators.py:90
#: validators.py:183
msgid "This field is required."
msgstr "이 필드는 필수 항목입니다."
#: fields.py:293
#: fields.py:317
msgid "This field may not be null."
msgstr "이 필드는 null일 수 없습니다."
#: fields.py:661
#: fields.py:701
msgid "Must be a valid boolean."
msgstr "유효한 불리언이어야 합니다."
msgstr ""
#: fields.py:724
#: fields.py:766
msgid "Not a valid string."
msgstr "유효한 문자열이 아닙니다."
msgstr ""
#: fields.py:725
#: fields.py:767
msgid "This field may not be blank."
msgstr "이 필드는 blank일 수 없습니다."
#: fields.py:726 fields.py:1881
#: 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:727
#: fields.py:769
#, python-brace-format
msgid "Ensure this field has at least {min_length} characters."
msgstr "이 필드의 글자 수가 적어도 {min_length} 이상인지 확인하세요."
msgstr "이 필드의 글자 수가 적어도 {min_length} 이상인지 확인하십시오."
#: fields.py:774
#: fields.py:816
msgid "Enter a valid email address."
msgstr "유효한 이메일 주소를 입력하세요."
msgstr "유효한 이메일 주소를 입력하십시오."
#: fields.py:785
#: fields.py:827
msgid "This value does not match the required pattern."
msgstr "이 값은 요구되는 패턴과 일치하지 않습니다."
msgstr "형식에 맞지 않는 값입니다."
#: fields.py:796
#: fields.py:838
msgid ""
"Enter a valid \"slug\" consisting of letters, numbers, underscores or "
"hyphens."
msgstr "문자, 숫자, 밑줄( _ ) 또는 하이픈( - )으로 이루어진 유효한 \"slug\"를 입력하세요."
msgstr "문자, 숫자, 밑줄( _ ) 또는 하이픈( - )으로 이루어진 유효한 \"slug\"를 입력하십시오."
#: fields.py:797
#: fields.py:839
msgid ""
"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, "
"or hyphens."
msgstr "유니코드 문자, 숫자, 밑줄( _ ) 또는 하이픈( - )으로 이루어진 유효한 \"slug\"를 입력하세요."
msgstr ""
#: fields.py:812
#: fields.py:854
msgid "Enter a valid URL."
msgstr "유효한 URL을 입력하세요."
msgstr "유효한 URL을 입력하십시오."
#: fields.py:825
#: fields.py:867
msgid "Must be a valid UUID."
msgstr "유효한 UUID 이어야 합니다."
msgstr ""
#: fields.py:861
#: fields.py:903
msgid "Enter a valid IPv4 or IPv6 address."
msgstr "유효한 IPv4 또는 IPv6 주소를 입력하세요."
msgstr "유효한 IPv4 또는 IPv6 주소를 입력하십시오."
#: fields.py:889
#: fields.py:931
msgid "A valid integer is required."
msgstr "유효한 정수를 입력하세요."
msgstr "유효한 정수(integer)를 넣어주세요."
#: fields.py:890 fields.py:927 fields.py:966 fields.py:1349
#: 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:891 fields.py:928 fields.py:967 fields.py:1350
#: 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:892 fields.py:929 fields.py:971
#: fields.py:934 fields.py:971 fields.py:1010
msgid "String value too large."
msgstr "문자열 값이 너무 니다."
msgstr "문자열 값이 너무 니다."
#: fields.py:926 fields.py:965
#: fields.py:968 fields.py:1004
msgid "A valid number is required."
msgstr "유효한 숫자를 입력하세요."
msgstr "유효한 숫자를 넣어주세요."
#: fields.py:930
msgid "Integer value too large to convert to float"
msgstr "정수 값이 너무 커서 부동 소수점으로 변환할 수 없습니다."
#: fields.py:968
#: fields.py:1007
#, python-brace-format
msgid "Ensure that there are no more than {max_digits} digits in total."
msgstr "총 자릿수가 {max_digits}을(를) 초과하지 않는지 확인하세요."
msgstr "전체 숫자(digits)가 {max_digits} 이하인지 확인하십시오."
#: fields.py:969
#: fields.py:1008
#, python-brace-format
msgid "Ensure that there are no more than {max_decimal_places} decimal places."
msgstr "소수점 이하 자릿수가 {max_decimal_places}을(를) 초과하지 않는지 확인하세요."
msgid ""
"Ensure that there are no more than {max_decimal_places} decimal places."
msgstr "소수점 자릿수가 {max_decimal_places} 이하인지 확인하십시오."
#: fields.py:970
#: fields.py:1009
#, python-brace-format
msgid ""
"Ensure that there are no more than {max_whole_digits} digits before the "
"decimal point."
msgstr "소수점 앞 자릿수가 {max_whole_digits}을(를) 초과하지 않는지 확인하세요."
msgstr "소수점 자리 앞에 숫자(digits)가 {max_whole_digits} 이하인지 확인하십시오."
#: fields.py:1129
#: fields.py:1148
#, python-brace-format
msgid "Datetime has wrong format. Use one of these formats instead: {format}."
msgstr "Datetime의 포멧이 잘못되었습니다. 이 형식들 중 한가지를 사용하세요: {format}."
#: fields.py:1130
#: fields.py:1149
msgid "Expected a datetime but got a date."
msgstr "datatime이 예상되었지만 date를 받았습니다."
msgstr "예상된 datatime 대신 date를 받았습니다."
#: fields.py:1131
#: fields.py:1150
#, python-brace-format
msgid "Invalid datetime for the timezone \"{timezone}\"."
msgstr "\"{timezone}\" 시간대에 대한 유효하지 않은 datetime 입니다."
msgstr ""
#: fields.py:1132
#: fields.py:1151
msgid "Datetime value out of range."
msgstr "Datetime 값이 범위를 벗어났습니다."
msgstr ""
#: fields.py:1219
#: fields.py:1236
#, python-brace-format
msgid "Date has wrong format. Use one of these formats instead: {format}."
msgstr "Date의 포멧이 잘못되었습니다. 이 형식들 중 한가지를 사용하세요: {format}."
#: fields.py:1220
#: fields.py:1237
msgid "Expected a date but got a datetime."
msgstr "예상된 date 대신 datetime을 받았습니다."
#: fields.py:1286
#: fields.py:1303
#, python-brace-format
msgid "Time has wrong format. Use one of these formats instead: {format}."
msgstr "Time의 포멧이 잘못되었습니다. 이 형식들 중 한가지를 사용하세요: {format}."
#: fields.py:1348
#: fields.py:1365
#, python-brace-format
msgid "Duration has wrong format. Use one of these formats instead: {format}."
msgstr "Duration의 포멧이 잘못되었습니다. 이 형식들 중 한가지를 사용하세요: {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
#: fields.py:1399 fields.py:1456
#, python-brace-format
msgid "\"{input}\" is not a valid choice."
msgstr "\"{input}\"은 유효하지 않은 선택입니다."
msgstr "\"{input}\"이 유효하지 않은 선택(choice)입니다."
#: fields.py:1389
#: fields.py:1402
#, python-brace-format
msgid "More than {count} items..."
msgstr "{count}개 이상의 아이템이 있습니다..."
msgstr ""
#: fields.py:1447 fields.py:1596 relations.py:486 serializers.py:593
#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570
#, python-brace-format
msgid "Expected a list of items but got type \"{input_type}\"."
msgstr "아이템 리스트가 예상되었으나 \"{input_type}\"를 받았습니다."
#: fields.py:1448
#: fields.py:1458
msgid "This selection may not be empty."
msgstr "이 선택 항목은 비워 둘 수 없습니다."
#: fields.py:1487
#: fields.py:1495
#, python-brace-format
msgid "\"{input}\" is not a valid path choice."
msgstr "\"{input}\" 유효하지 않은 경로 선택입니다."
msgstr "\"{input}\" 유효하지 않은 경로 선택입니다."
#: fields.py:1507
#: fields.py:1514
msgid "No file was submitted."
msgstr "파일이 제출되지 않았습니다."
#: fields.py:1508
msgid "The submitted data was not a file. Check the encoding type on the form."
#: fields.py:1515
msgid ""
"The submitted data was not a file. Check the encoding type on the form."
msgstr "제출된 데이터는 파일이 아닙니다. 제출된 서식의 인코딩 형식을 확인하세요."
#: fields.py:1509
#: fields.py:1516
msgid "No filename could be determined."
msgstr "파일명을 알 수 없습니다."
#: fields.py:1510
#: fields.py:1517
msgid "The submitted file is empty."
msgstr "제출한 파일이 비어있습니다."
#: fields.py:1511
#: 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:1559
#: 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:1597 relations.py:487 serializers.py:594
#: fields.py:1604 relations.py:486 serializers.py:571
msgid "This list may not be empty."
msgstr "이 리스트는 비워 둘 수 없습니다."
#: fields.py:1598 serializers.py:596
#: fields.py:1605
#, python-brace-format
msgid "Ensure this field has at least {min_length} elements."
msgstr "이 필드가 최소 {min_length} 개의 요소를 가지는지 확인하세요."
msgstr ""
#: fields.py:1599 serializers.py:595
#: fields.py:1606
#, python-brace-format
msgid "Ensure this field has no more than {max_length} elements."
msgstr "이 필드가 최대 {max_length} 개의 요소를 가지는지 확인하세요."
msgstr ""
#: fields.py:1677
#: fields.py:1682
#, python-brace-format
msgid "Expected a dictionary of items but got type \"{input_type}\"."
msgstr "아이템 딕셔너리가 예상되었으나 \"{input_type}\" 타입을 받았습니다."
#: fields.py:1678
#: fields.py:1683
msgid "This dictionary may not be empty."
msgstr "이 딕셔너리는 비어있을 수 없습니다."
msgstr ""
#: fields.py:1750
#: fields.py:1755
msgid "Value must be valid JSON."
msgstr "유효한 JSON 값이어야 합니다."
msgstr "Value 는 유효한 JSON형식이어야 합니다."
#: filters.py:72 templates/rest_framework/filters/search.html:2
#: templates/rest_framework/filters/search.html:8
#: filters.py:49 templates/rest_framework/filters/search.html:2
msgid "Search"
msgstr "검색"
#: filters.py:73
#: filters.py:50
msgid "A search term."
msgstr "검색어."
msgstr ""
#: filters.py:224 templates/rest_framework/filters/ordering.html:3
#: filters.py:180 templates/rest_framework/filters/ordering.html:3
msgid "Ordering"
msgstr "순서"
#: filters.py:225
#: filters.py:181
msgid "Which field to use when ordering the results."
msgstr "결과 정렬 시 사용할 필드."
msgstr ""
#: filters.py:341
#: filters.py:287
msgid "ascending"
msgstr "오름차순"
#: filters.py:342
#: filters.py:288
msgid "descending"
msgstr "내림차순"
#: pagination.py:180
#: pagination.py:174
msgid "A page number within the paginated result set."
msgstr "페이지네이션된 결과 집합 내의 페이지 번호."
msgstr ""
#: pagination.py:185 pagination.py:382 pagination.py:599
#: pagination.py:179 pagination.py:372 pagination.py:590
msgid "Number of results to return per page."
msgstr "페이지당 반환할 결과 수."
msgstr ""
#: pagination.py:195
#: pagination.py:189
msgid "Invalid page."
msgstr "페이지가 유효하지 않습니다."
#: pagination.py:384
#: pagination.py:374
msgid "The initial index from which to return the results."
msgstr "결과를 반환할 초기 인덱스."
msgstr ""
#: pagination.py:590
#: pagination.py:581
msgid "The pagination cursor value."
msgstr "페이지네이션 커서 값."
msgstr ""
#: pagination.py:592
#: pagination.py:583
msgid "Invalid cursor"
msgstr "커서가 유효하지 않습니다."
msgstr "커서(cursor)가 유효하지 않습니다."
#: relations.py:241
#: relations.py:246
#, python-brace-format
msgid "Invalid pk \"{pk_value}\" - object does not exist."
msgstr "유효하지 않은 pk \"{pk_value}\" - 객체가 존재하지 않습니다."
#: relations.py:242
#: relations.py:247
#, python-brace-format
msgid "Incorrect type. Expected pk value, received {data_type}."
msgstr "잘못된 형식입니다. pk 값이 예상되었지만, {data_type}을(를) 받았습니다."
msgstr "잘못된 형식입니다. pk 값 대신 {data_type}를 받았습니다."
#: relations.py:277
#: relations.py:280
msgid "Invalid hyperlink - No URL match."
msgstr "유효하지 않은 하이퍼링크 - 일치하는 URL이 없습니다."
#: relations.py:278
#: relations.py:281
msgid "Invalid hyperlink - Incorrect URL match."
msgstr "유효하지 않은 하이퍼링크 - URL이 일치하지 않습니다."
#: relations.py:279
#: relations.py:282
msgid "Invalid hyperlink - Object does not exist."
msgstr "유효하지 않은 하이퍼링크 - 객체가 존재하지 않습니다."
#: relations.py:280
#: relations.py:283
#, python-brace-format
msgid "Incorrect type. Expected URL string, received {data_type}."
msgstr "잘못된 형식입니다. URL 문자열을 예상했으나 {data_type}을 받았습니다."
#: relations.py:445
#: relations.py:448
#, python-brace-format
msgid "Object with {slug_name}={value} does not exist."
msgstr "{slug_name}={value} 객체가 존재하지 않습니다."
#: relations.py:446
#: relations.py:449
msgid "Invalid value."
msgstr "값이 유효하지 않습니다."
#: schemas/utils.py:32
msgid "unique integer value"
msgstr "고유한 정수 값"
msgstr ""
#: schemas/utils.py:34
msgid "UUID string"
msgstr "UUID 문자열"
msgstr ""
#: schemas/utils.py:36
msgid "unique value"
msgstr "고유한 값"
msgstr ""
#: schemas/utils.py:38
#, python-brace-format
msgid "A {value_type} identifying this {name}."
msgstr "{name}을 식별하는 {value_type}."
msgstr ""
#: serializers.py:340
#: serializers.py:337
#, python-brace-format
msgid "Invalid data. Expected a dictionary, but got {datatype}."
msgstr "유효하지 않은 데이터. 딕셔너리(dictionary)대신 {datatype}를 받았습니다."
@ -491,7 +483,7 @@ msgstr "유효하지 않은 데이터. 딕셔너리(dictionary)대신 {datatype}
#: templates/rest_framework/admin.html:116
#: templates/rest_framework/base.html:136
msgid "Extra Actions"
msgstr "추가 Action들"
msgstr ""
#: templates/rest_framework/admin.html:130
#: templates/rest_framework/base.html:150
@ -500,33 +492,33 @@ 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
#: templates/rest_framework/vertical/radio.html:3
msgid "None"
msgstr "없음"
msgstr ""
#: templates/rest_framework/horizontal/select_multiple.html:4
#: templates/rest_framework/inline/select_multiple.html:3
@ -536,49 +528,49 @@ msgstr "선택할 아이템이 없습니다."
#: validators.py:39
msgid "This field must be unique."
msgstr "이 필드는 반드시 고유해야 합니다."
msgstr "이 필드는 반드시 고유(unique)해야 합니다."
#: validators.py:98
#: validators.py:89
#, python-brace-format
msgid "The fields {field_names} must make a unique set."
msgstr "필드 {field_names} 는 반드시 고유해야 합니다."
msgstr "필드 {field_names} 는 반드시 고유(unique)해야 합니다."
#: validators.py:200
#: validators.py:171
#, python-brace-format
msgid "Surrogate characters are not allowed: U+{code_point:X}."
msgstr "대체(surrogate) 문자는 허용되지 않습니다: U+{code_point:X}."
msgstr ""
#: validators.py:290
#: validators.py:243
#, python-brace-format
msgid "This field must be unique for the \"{date_field}\" date."
msgstr "이 필드는 \"{date_field}\" 날짜에 대해 고유해야 합니다."
msgstr "이 필드는 고유(unique)한 \"{date_field}\" 날짜를 갖습니다."
#: validators.py:305
#: validators.py:258
#, python-brace-format
msgid "This field must be unique for the \"{date_field}\" month."
msgstr "이 필드는 \"{date_field}\" 월에 대해 고유해야 합니다."
msgstr "이 필드는 고유(unique)한 \"{date_field}\" 월을 갖습니다. "
#: validators.py:318
#: validators.py:271
#, python-brace-format
msgid "This field must be unique for the \"{date_field}\" year."
msgstr "이 필드는 \"{date_field}\" 연도에 대해 고유해야 합니다."
msgstr "이 필드는 고유(unique)한 \"{date_field}\" 년을 갖습니다. "
#: versioning.py:40
msgid "Invalid version in \"Accept\" header."
msgstr "\"Accept\" 헤더의 버전이 유효하지 않습니다."
msgstr "\"Accept\" 헤더(header)의 버전이 유효하지 않습니다."
#: versioning.py:71
msgid "Invalid version in URL path."
msgstr "URL 경로의 버전이 유효하지 않습니다."
msgstr "URL path의 버전이 유효하지 않습니다."
#: versioning.py:118
#: versioning.py:116
msgid "Invalid version in URL path. Does not match any version namespace."
msgstr "URL 경로에 유효하지 않은 버전이 있습니다. 버전 네임스페이스와 일치하지 않습니다."
msgstr "URL 경로에 유효하지 않은 버전이 있습니다. 버전 네임 스페이스와 일치하지 않습니다."
#: versioning.py:150
#: versioning.py:148
msgid "Invalid version in hostname."
msgstr "hostname 내 버전이 유효하지 않습니다."
msgstr "hostname내 버전이 유효하지 않습니다."
#: versioning.py:172
#: versioning.py:170
msgid "Invalid version in query parameter."
msgstr "쿼리 파라메터 내 버전이 유효하지 않습니다."
msgstr "쿼리 파라메터내 버전이 유효하지 않습니다."

View File

@ -1,7 +1,7 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
#
# Translators:
# Cloves Oliveira <clovesolivier23@gmail.com>, 2020
# Craig Blaszczyk <masterjakul@gmail.com>, 2015
@ -10,7 +10,6 @@
# Hugo Leonardo Chalhoub Mendonça <hugoleonardocm@live.com>, 2015
# Jonatas Baldin <jonatas.baldin@gmail.com>, 2017
# Gabriel Mitelman Tkacz <gmtkacz@proton.me>, 2024
# Matheus Oliveira <moliveiracdev@gmail.com>, 2025
msgid ""
msgstr ""
"Project-Id-Version: Django REST framework\n"
@ -142,7 +141,7 @@ msgstr "Não foi possível satisfazer a requisição do cabeçalho Accept."
#: exceptions.py:212
#, python-brace-format
msgid "Unsupported media type \"{media_type}\" in request."
msgstr "Tipo de mídia \"{media_type}\" no pedido não é suportado."
msgstr "Tipo de mídia \"{media_type}\" no pedido não é suportado."
#: exceptions.py:223
msgid "Request was throttled."
@ -201,17 +200,17 @@ msgstr "Este valor não corresponde ao padrão exigido."
msgid ""
"Enter a valid \"slug\" consisting of letters, numbers, underscores or "
"hyphens."
msgstr "Insira um \"slug\" válido que consista de letras, números, sublinhados ou hífens."
msgstr "Entrar um \"slug\" válido que consista de letras, números, sublinhados ou hífens."
#: fields.py:839
msgid ""
"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, "
"or hyphens."
msgstr "Insira um \"slug\" válido que consista de letras Unicode, números, sublinhados ou hífens."
msgstr "Digite um \"slug\" válido que consista de letras Unicode, números, sublinhados ou hífens."
#: fields.py:854
msgid "Enter a valid URL."
msgstr "Insira um URL válido."
msgstr "Entrar um URL válido."
#: fields.py:867
msgid "Must be a valid UUID."
@ -291,12 +290,12 @@ msgstr "Necessário uma data mas recebeu uma data e hora."
#: fields.py:1303
#, python-brace-format
msgid "Time has wrong format. Use one of these formats instead: {format}."
msgstr "Formato inválido para tempo. Use um dos formatos a seguir: {format}."
msgstr "Formato inválido para Tempo. Use um dos formatos a seguir: {format}."
#: fields.py:1365
#, python-brace-format
msgid "Duration has wrong format. Use one of these formats instead: {format}."
msgstr "Formato inválido para duração. Use um dos formatos a seguir: {format}."
msgstr "Formato inválido para Duração. Use um dos formatos a seguir: {format}."
#: fields.py:1399 fields.py:1456
#, python-brace-format
@ -349,7 +348,7 @@ msgstr "Certifique-se de que o nome do arquivo tem menos de {max_length} caracte
msgid ""
"Upload a valid image. The file you uploaded was either not an image or a "
"corrupted image."
msgstr "Faça upload de uma imagem válida. O arquivo enviado não é um arquivo de imagem ou está corrompido."
msgstr "Fazer upload de uma imagem válida. O arquivo enviado não é um arquivo de imagem ou está corrompido."
#: fields.py:1604 relations.py:486 serializers.py:571
msgid "This list may not be empty."
@ -376,7 +375,7 @@ msgstr "Este dicionário não pode estar vazio."
#: fields.py:1755
msgid "Value must be valid JSON."
msgstr "Valor deve ser JSON válido."
msgstr "Valor devo ser JSON válido."
#: filters.py:49 templates/rest_framework/filters/search.html:2
msgid "Search"
@ -396,11 +395,11 @@ msgstr "Qual campo usar ao ordenar os resultados."
#: filters.py:287
msgid "ascending"
msgstr "crescente"
msgstr "ascendente"
#: filters.py:288
msgid "descending"
msgstr "decrescente"
msgstr "descendente"
#: pagination.py:174
msgid "A page number within the paginated result set."
@ -532,7 +531,7 @@ msgstr "Nenhum item para escholher."
#: validators.py:39
msgid "This field must be unique."
msgstr "Esse campo deve ser único."
msgstr "Esse campo deve ser único."
#: validators.py:89
#, python-brace-format

View File

@ -104,7 +104,7 @@ msgstr "服务器出现了错误。"
#: exceptions.py:142
msgid "Invalid input."
msgstr "无效的输入。"
msgstr ""
#: exceptions.py:161
msgid "Malformed request."
@ -142,17 +142,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 "预计 {wait} 秒后可用。"
msgstr ""
#: exceptions.py:225
#, python-brace-format
msgid "Expected available in {wait} seconds."
msgstr "预计 {wait} 秒后可用。"
msgstr ""
#: fields.py:316 relations.py:245 relations.py:279 validators.py:90
#: validators.py:183
@ -165,11 +165,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."
@ -203,7 +203,7 @@ msgstr "请输入合法的“短语“,只能包含字母,数字,下划线
msgid ""
"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, "
"or hyphens."
msgstr "请输入有效的“slug”由 Unicode 字母、数字、下划线或连字符组成。"
msgstr ""
#: fields.py:854
msgid "Enter a valid URL."
@ -211,7 +211,7 @@ msgstr "请输入合法的URL。"
#: fields.py:867
msgid "Must be a valid UUID."
msgstr "必须是有效的 UUID。"
msgstr ""
#: fields.py:903
msgid "Enter a valid IPv4 or IPv6 address."
@ -269,11 +269,11 @@ msgstr "期望为日期时间,获得的是日期。"
#: fields.py:1150
#, python-brace-format
msgid "Invalid datetime for the timezone \"{timezone}\"."
msgstr "时区“{timezone}”的时间格式无效。"
msgstr ""
#: fields.py:1151
msgid "Datetime value out of range."
msgstr "时间数值超出有效范围。"
msgstr ""
#: fields.py:1236
#, python-brace-format
@ -354,12 +354,12 @@ msgstr "列表不能为空。"
#: fields.py:1605
#, python-brace-format
msgid "Ensure this field has at least {min_length} elements."
msgstr "该字段必须包含至少 {min_length} 个元素。"
msgstr ""
#: fields.py:1606
#, python-brace-format
msgid "Ensure this field has no more than {max_length} elements."
msgstr "该字段不能超过 {max_length} 个元素。"
msgstr ""
#: fields.py:1682
#, python-brace-format
@ -368,7 +368,7 @@ msgstr "期望是包含类目的字典,得到类型为 “{input_type}”。"
#: fields.py:1683
msgid "This dictionary may not be empty."
msgstr "该字典不能为空。"
msgstr ""
#: fields.py:1755
msgid "Value must be valid JSON."
@ -380,7 +380,7 @@ msgstr " 搜索"
#: filters.py:50
msgid "A search term."
msgstr "搜索关键词。"
msgstr ""
#: filters.py:180 templates/rest_framework/filters/ordering.html:3
msgid "Ordering"
@ -388,7 +388,7 @@ msgstr "排序"
#: filters.py:181
msgid "Which field to use when ordering the results."
msgstr "用于排序结果的字段。"
msgstr ""
#: filters.py:287
msgid "ascending"
@ -400,11 +400,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."
@ -412,11 +412,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"
@ -460,20 +460,20 @@ msgstr "无效值。"
#: schemas/utils.py:32
msgid "unique integer value"
msgstr "唯一整数值"
msgstr ""
#: schemas/utils.py:34
msgid "UUID string"
msgstr "UUID 字符串"
msgstr ""
#: schemas/utils.py:36
msgid "unique value"
msgstr "唯一值"
msgstr ""
#: schemas/utils.py:38
#, python-brace-format
msgid "A {value_type} identifying this {name}."
msgstr "标识此 {name} 的 {value_type}。"
msgstr ""
#: serializers.py:337
#, python-brace-format
@ -483,7 +483,7 @@ msgstr "无效数据。期待为字典类型,得到的是 {datatype} 。"
#: 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
@ -492,27 +492,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
@ -538,7 +538,7 @@ msgstr "字段 {field_names} 必须能构成唯一集合。"
#: validators.py:171
#, python-brace-format
msgid "Surrogate characters are not allowed: U+{code_point:X}."
msgstr "不允许使用代理字符: U+{code_point:X}。"
msgstr ""
#: validators.py:243
#, python-brace-format

View File

@ -65,7 +65,7 @@ class DefaultContentNegotiation(BaseContentNegotiation):
full_media_type = ';'.join(
(renderer.media_type,) +
tuple(
f'{key}={value}'
'{}={}'.format(key, value)
for key, value in media_type_wrapper.params.items()
)
)

View File

@ -225,7 +225,7 @@ class DjangoModelPermissions(BasePermission):
if hasattr(view, 'get_queryset'):
queryset = view.get_queryset()
assert queryset is not None, (
f'{view.__class__.__name__}.get_queryset() returned None'
'{}.get_queryset() returned None'.format(view.__class__.__name__)
)
return queryset
return view.queryset

View File

@ -66,7 +66,7 @@ class Response(SimpleTemplateResponse):
content_type = self.content_type
if content_type is None and charset is not None:
content_type = f"{media_type}; charset={charset}"
content_type = "{}; charset={}".format(media_type, charset)
elif content_type is None:
content_type = media_type
self['Content-Type'] = content_type

View File

@ -68,7 +68,7 @@ class LinkNode(dict):
current_val = self.methods_counter[preferred_key]
self.methods_counter[preferred_key] += 1
key = f'{preferred_key}_{current_val}'
key = '{}_{}'.format(preferred_key, current_val)
if key not in self:
return key

View File

@ -82,7 +82,7 @@ class SchemaGenerator(BaseSchemaGenerator):
continue
if components_schemas[k] == components[k]:
continue
warnings.warn(f'Schema component "{k}" has been overridden with a different value.')
warnings.warn('Schema component "{}" has been overridden with a different value.'.format(k))
components_schemas.update(components)
@ -644,7 +644,7 @@ class AutoSchema(ViewInspector):
return self.get_serializer(path, method)
def get_reference(self, serializer):
return {'$ref': f'#/components/schemas/{self.get_component_name(serializer)}'}
return {'$ref': '#/components/schemas/{}'.format(self.get_component_name(serializer))}
def get_request_body(self, path, method):
if method not in ('PUT', 'PATCH', 'POST'):

View File

@ -1469,13 +1469,12 @@ 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 model_fields_names.issuperset(unique_together_list_and_condition_fields):
if set(field_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

View File

@ -176,7 +176,7 @@
<div class="response-info" aria-label="{% trans "response info" %}">
<pre class="prettyprint"><span class="meta nocode"><b>HTTP {{ response.status_code }} {{ response.status_text }}</b>{% for key, val in response_headers|items %}
<b>{{ key }}:</b> <span class="lit">{{ val|urlize }}</span>{% endfor %}
<b>{{ key }}:</b> <span class="lit">{{ val|break_long_headers|urlize }}</span>{% endfor %}
</span>{{ content|urlize }}</pre>
</div>

View File

@ -313,3 +313,14 @@ 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('<br> ' + ', <br>'.join(escape(header).split(',')))
return header

View File

@ -66,7 +66,7 @@ def get_unique_validators(field_name, model_field):
"""
Returns a list of UniqueValidators that should be applied to the field.
"""
field_set = {field_name}
field_set = set([field_name])
conditions = {
c.condition
for c in model_field.model._meta.constraints

View File

@ -1,4 +1,5 @@
import contextlib
import sys
from collections.abc import Mapping, MutableMapping
from django.utils.encoding import force_str
@ -28,20 +29,21 @@ class ReturnDict(dict):
# but preserve the raw data.
return (dict, (dict(self),))
# These are basically copied from OrderedDict, with `serializer` added.
def __or__(self, other):
if not isinstance(other, dict):
return NotImplemented
new = self.__class__(self, serializer=self.serializer)
new.update(other)
return new
if sys.version_info >= (3, 9):
# These are basically copied from OrderedDict, with `serializer` added.
def __or__(self, other):
if not isinstance(other, dict):
return NotImplemented
new = self.__class__(self, serializer=self.serializer)
new.update(other)
return new
def __ror__(self, other):
if not isinstance(other, dict):
return NotImplemented
new = self.__class__(other, serializer=self.serializer)
new.update(self)
return new
def __ror__(self, other):
if not isinstance(other, dict):
return NotImplemented
new = self.__class__(other, serializer=self.serializer)
new.update(self)
return new
class ReturnList(list):

View File

@ -188,8 +188,7 @@ class UniqueTogetherValidator:
if attrs[field_name] != getattr(serializer.instance, field_name)
]
condition_sources = (serializer.fields[field_name].source for field_name in self.condition_fields)
condition_kwargs = {source: attrs[source] for source in condition_sources}
condition_kwargs = {source: attrs[source] for source in self.condition_fields}
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)

View File

@ -81,7 +81,7 @@ setup(
author_email='tom@tomchristie.com', # SEE NOTE BELOW (*)
packages=find_packages(exclude=['tests*']),
include_package_data=True,
install_requires=["django>=4.2"],
install_requires=["django>=4.2", 'backports.zoneinfo;python_version<"3.9"'],
python_requires=">=3.9",
zip_safe=False,
classifiers=[

View File

@ -1234,7 +1234,7 @@ class TestURLNamingCollisions(TestCase):
for method, suffix in zip(methods, suffixes):
if suffix is not None:
key = f'{method}_{suffix}'
key = '{}_{}'.format(method, suffix)
else:
key = method
assert loc[key].url == url

View File

@ -70,7 +70,7 @@ class GenerateSchemaTests(TestCase):
def test_accepts_custom_schema_generator(self):
call_command('generateschema',
f'--generator_class={__name__}.{CustomSchemaGenerator.__name__}',
'--generator_class={}.{}'.format(__name__, CustomSchemaGenerator.__name__),
stdout=self.out)
out_json = yaml.safe_load(self.out.getvalue())
assert out_json == CustomSchemaGenerator.SCHEMA
@ -78,7 +78,7 @@ class GenerateSchemaTests(TestCase):
def test_writes_schema_to_file_on_parameter(self):
fd, path = tempfile.mkstemp()
try:
call_command('generateschema', f'--file={path}', stdout=self.out)
call_command('generateschema', '--file={}'.format(path), stdout=self.out)
# nothing on stdout
assert not self.out.getvalue()

View File

@ -43,12 +43,12 @@ class ExceptionTestCase(TestCase):
exception = Throttled(wait=2)
assert exception.get_full_details() == {
'message': f'Request was throttled. Expected available in {2} seconds.',
'message': 'Request was throttled. Expected available in {} seconds.'.format(2),
'code': 'throttled'}
exception = Throttled(wait=2, detail='Slow down!')
assert exception.get_full_details() == {
'message': f'Slow down! Expected available in {2} seconds.',
'message': 'Slow down! Expected available in {} seconds.'.format(2),
'code': 'throttled'}

View File

@ -2,12 +2,12 @@ import datetime
import math
import os
import re
import sys
import uuid
import warnings
from decimal import ROUND_DOWN, ROUND_UP, Decimal
from enum import auto
from unittest.mock import patch
from zoneinfo import ZoneInfo
import pytest
@ -30,6 +30,11 @@ from rest_framework.fields import (
)
from tests.models import UUIDForeignKeyTarget
if sys.version_info >= (3, 9):
from zoneinfo import ZoneInfo
else:
from backports.zoneinfo import ZoneInfo
utc = datetime.timezone.utc
# Tests for helper functions.
@ -636,6 +641,10 @@ class Test5087Regression:
class TestTyping(TestCase):
@pytest.mark.skipif(
sys.version_info < (3, 7),
reason="subscriptable classes requires Python 3.7 or higher",
)
def test_field_is_subscriptable(self):
assert serializers.Field is serializers.Field["foo"]
@ -662,7 +671,7 @@ class FieldValues:
"""
for input_value, expected_output in get_items(self.valid_inputs):
assert self.field.run_validation(input_value) == expected_output, \
f'input value: {repr(input_value)}'
'input value: {}'.format(repr(input_value))
def test_invalid_inputs(self, *args):
"""
@ -672,12 +681,12 @@ class FieldValues:
with pytest.raises(serializers.ValidationError) as exc_info:
self.field.run_validation(input_value)
assert exc_info.value.detail == expected_failure, \
f'input value: {repr(input_value)}'
'input value: {}'.format(repr(input_value))
def test_outputs(self, *args):
for output_value, expected_output in get_items(self.outputs):
assert self.field.to_representation(output_value) == expected_output, \
f'output value: {repr(output_value)}'
'output value: {}'.format(repr(output_value))
# Boolean types...
@ -1422,7 +1431,7 @@ class TestDateField(FieldValues):
outputs = {
datetime.date(2001, 1, 1): '2001-01-01',
'2001-01-01': '2001-01-01',
'2016-01-10': '2016-01-10',
str('2016-01-10'): '2016-01-10',
None: None,
'': None,
}
@ -1489,7 +1498,7 @@ class TestDateTimeField(FieldValues):
datetime.datetime(2001, 1, 1, 13, 00): '2001-01-01T13:00:00Z',
datetime.datetime(2001, 1, 1, 13, 00, tzinfo=utc): '2001-01-01T13:00:00Z',
'2001-01-01T00:00:00': '2001-01-01T00:00:00',
'2016-01-10T00:00:00': '2016-01-10T00:00:00',
str('2016-01-10T00:00:00'): '2016-01-10T00:00:00',
None: None,
'': None,
}

View File

@ -1,3 +1,5 @@
import sys
import pytest
from django.db import models
from django.http import Http404
@ -289,7 +291,7 @@ class TestInstanceView(TestCase):
"""
data = {'text': 'foo'}
filtered_out_pk = BasicModel.objects.filter(text='filtered out')[0].pk
request = factory.put(f'/{filtered_out_pk}', data, format='json')
request = factory.put('/{}'.format(filtered_out_pk), data, format='json')
response = self.view(request, pk=filtered_out_pk).render()
assert response.status_code == status.HTTP_404_NOT_FOUND
@ -701,11 +703,23 @@ class TestSerializer(TestCase):
class TestTyping(TestCase):
@pytest.mark.skipif(
sys.version_info < (3, 7),
reason="subscriptable classes requires Python 3.7 or higher",
)
def test_genericview_is_subscriptable(self):
assert generics.GenericAPIView is generics.GenericAPIView["foo"]
@pytest.mark.skipif(
sys.version_info < (3, 7),
reason="subscriptable classes requires Python 3.7 or higher",
)
def test_listview_is_subscriptable(self):
assert generics.ListAPIView is generics.ListAPIView["foo"]
@pytest.mark.skipif(
sys.version_info < (3, 7),
reason="subscriptable classes requires Python 3.7 or higher",
)
def test_instanceview_is_subscriptable(self):
assert generics.RetrieveAPIView is generics.RetrieveAPIView["foo"]

View File

@ -9,6 +9,7 @@ import datetime
import decimal
import json # noqa
import re
import sys
import tempfile
import pytest
@ -396,6 +397,10 @@ class TestDurationFieldMapping(TestCase):
fields = '__all__'
expected = dedent("""
TestSerializer():
id = IntegerField(label='ID', read_only=True)
duration_field = DurationField(max_value=datetime.timedelta(3), min_value=datetime.timedelta(1))
""") if sys.version_info < (3, 7) else dedent("""
TestSerializer():
id = IntegerField(label='ID', read_only=True)
duration_field = DurationField(max_value=datetime.timedelta(days=3), min_value=datetime.timedelta(days=1))

View File

@ -536,7 +536,7 @@ class TestLimitOffset:
content = self.get_paginated_content(queryset)
next_limit = self.pagination.default_limit
next_offset = self.pagination.default_limit
next_url = f'http://testserver/?limit={next_limit}&offset={next_offset}'
next_url = 'http://testserver/?limit={}&offset={}'.format(next_limit, next_offset)
assert queryset == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
assert content.get('next') == next_url
@ -549,7 +549,7 @@ class TestLimitOffset:
content = self.get_paginated_content(queryset)
next_limit = self.pagination.default_limit
next_offset = self.pagination.default_limit
next_url = f'http://testserver/?limit={next_limit}&offset={next_offset}'
next_url = 'http://testserver/?limit={}&offset={}'.format(next_limit, next_offset)
assert queryset == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
assert content.get('next') == next_url
@ -565,9 +565,9 @@ class TestLimitOffset:
max_limit = self.pagination.max_limit
next_offset = offset + max_limit
prev_offset = offset - max_limit
base_url = f'http://testserver/?limit={max_limit}'
next_url = base_url + f'&offset={next_offset}'
prev_url = base_url + f'&offset={prev_offset}'
base_url = 'http://testserver/?limit={}'.format(max_limit)
next_url = base_url + '&offset={}'.format(next_offset)
prev_url = base_url + '&offset={}'.format(prev_offset)
assert queryset == list(range(51, 66))
assert content.get('next') == next_url
assert content.get('previous') == prev_url

View File

@ -353,7 +353,7 @@ class ObjectPermissionsIntegrationTests(TestCase):
'delete': f('delete', model_name)
}
for perm in perms.values():
perm = f'{app_label}.{perm}'
perm = '{}.{}'.format(app_label, perm)
assign_perm(perm, everyone)
everyone.user_set.add(*users.values())
@ -718,7 +718,7 @@ class PermissionsCompositionTests(TestCase):
assert hasperm is False
def test_operand_holder_is_hashable(self):
assert hash(permissions.IsAuthenticated & permissions.IsAdminUser)
assert hash((permissions.IsAuthenticated & permissions.IsAdminUser))
def test_operand_holder_hash_same_for_same_operands_and_operator(self):
first_operand_holder = (

View File

@ -586,7 +586,7 @@ class OneToOnePrimaryKeyTests(TestCase):
source = OneToOnePKSourceSerializer(data={'name': 'source-2', 'target': target_pk})
# Then: The source is valid with the serializer
if not source.is_valid():
self.fail(f"Expected OneToOnePKTargetSerializer to be valid but had errors: {source.errors}")
self.fail("Expected OneToOnePKTargetSerializer to be valid but had errors: {}".format(source.errors))
# Then: Saving the serializer creates a new object
new_source = source.save()
# Then: The new object has the same pk as the target object

View File

@ -408,7 +408,7 @@ class UnicodeJSONRendererTests(TestCase):
obj = {'should_escape': '\u2028\u2029'}
renderer = JSONRenderer()
content = renderer.render(obj, 'application/json')
self.assertEqual(content, b'{"should_escape":"\\u2028\\u2029"}')
self.assertEqual(content, '{"should_escape":"\\u2028\\u2029"}'.encode())
class AsciiJSONRendererTests(TestCase):
@ -421,7 +421,7 @@ class AsciiJSONRendererTests(TestCase):
obj = {'countries': ['United Kingdom', 'France', 'España']}
renderer = AsciiJSONRenderer()
content = renderer.render(obj, 'application/json')
self.assertEqual(content, b'{"countries":["United Kingdom","France","Espa\\u00f1a"]}')
self.assertEqual(content, '{"countries":["United Kingdom","France","Espa\\u00f1a"]}'.encode())
# Tests for caching issue, #346

View File

@ -3,6 +3,7 @@ Tests for content parsing, and form-overloaded content parsing.
"""
import copy
import os.path
import sys
import tempfile
import pytest
@ -374,5 +375,9 @@ class TestDeepcopy(TestCase):
class TestTyping(TestCase):
@pytest.mark.skipif(
sys.version_info < (3, 7),
reason="subscriptable classes requires Python 3.7 or higher",
)
def test_request_is_subscriptable(self):
assert Request is Request["foo"]

View File

@ -1,3 +1,6 @@
import sys
import pytest
from django.test import TestCase, override_settings
from django.urls import include, path, re_path
@ -267,7 +270,7 @@ class Issue807Tests(TestCase):
"""
headers = {"HTTP_ACCEPT": RendererC.media_type}
resp = self.client.get('/', **headers)
expected = f"{RendererC.media_type}; charset={RendererC.charset}"
expected = "{}; charset={}".format(RendererC.media_type, RendererC.charset)
self.assertEqual(expected, resp['Content-Type'])
def test_content_type_set_explicitly_on_response(self):
@ -286,5 +289,9 @@ class Issue807Tests(TestCase):
class TestTyping(TestCase):
@pytest.mark.skipif(
sys.version_info < (3, 7),
reason="subscriptable classes requires Python 3.7 or higher",
)
def test_response_is_subscriptable(self):
assert Response is Response["foo"]

View File

@ -447,9 +447,9 @@ class TestDynamicListAndDetailRouter(TestCase):
url_path = endpoint.url_path
if method_name.startswith('list_'):
assert route.url == f'^{{prefix}}/{url_path}{{trailing_slash}}$'
assert route.url == '^{{prefix}}/{0}{{trailing_slash}}$'.format(url_path)
else:
assert route.url == f'^{{prefix}}/{{lookup}}/{url_path}{{trailing_slash}}$'
assert route.url == '^{{prefix}}/{{lookup}}/{0}{{trailing_slash}}$'.format(url_path)
# check method to function mapping
if method_name.endswith('_post'):
method_map = 'post'
@ -488,14 +488,14 @@ class TestRegexUrlPath(URLPatternsTestCase, TestCase):
def test_regex_url_path_list(self):
kwarg = '1234'
response = self.client.get(f'/regex/list/{kwarg}/')
response = self.client.get('/regex/list/{}/'.format(kwarg))
assert response.status_code == 200
assert json.loads(response.content.decode()) == {'kwarg': kwarg}
def test_regex_url_path_detail(self):
pk = '1'
kwarg = '1234'
response = self.client.get(f'/regex/{pk}/detail/{kwarg}/')
response = self.client.get('/regex/{}/detail/{}/'.format(pk, kwarg))
assert response.status_code == 200
assert json.loads(response.content.decode()) == {'pk': pk, 'kwarg': kwarg}
@ -557,14 +557,14 @@ class TestUrlPath(URLPatternsTestCase, TestCase):
def test_list_extra_action(self):
kwarg = 1234
response = self.client.get(f'/path/list/{kwarg}/')
response = self.client.get('/path/list/{}/'.format(kwarg))
assert response.status_code == 200
assert json.loads(response.content.decode()) == {'kwarg': kwarg}
def test_detail_extra_action(self):
pk = '1'
kwarg = 1234
response = self.client.get(f'/path/{pk}/detail/{kwarg}/')
response = self.client.get('/path/{}/detail/{}/'.format(pk, kwarg))
assert response.status_code == 200
assert json.loads(response.content.decode()) == {'pk': pk, 'kwarg': kwarg}

View File

@ -1,6 +1,7 @@
import inspect
import pickle
import re
import sys
from collections import ChainMap
from collections.abc import Mapping
@ -204,6 +205,10 @@ class TestSerializer:
exceptions.ErrorDetail(string='Raised error', code='invalid')
]}
@pytest.mark.skipif(
sys.version_info < (3, 7),
reason="subscriptable classes requires Python 3.7 or higher",
)
def test_serializer_is_subscriptable(self):
assert serializers.Serializer is serializers.Serializer["foo"]
@ -738,6 +743,10 @@ class TestDeclaredFieldInheritance:
class Test8301Regression:
@pytest.mark.skipif(
sys.version_info < (3, 9),
reason="dictionary union operator requires Python 3.9 or higher",
)
def test_ReturnDict_merging(self):
# Serializer.data returns ReturnDict, this is essentially a test for that.

View File

@ -1,3 +1,5 @@
import sys
import pytest
from django.http import QueryDict
from django.utils.datastructures import MultiValueDict
@ -58,6 +60,10 @@ class TestListSerializer:
assert serializer.is_valid()
assert serializer.validated_data == expected_output
@pytest.mark.skipif(
sys.version_info < (3, 7),
reason="subscriptable classes requires Python 3.7 or higher",
)
def test_list_serializer_is_subscriptable(self):
assert serializers.ListSerializer is serializers.ListSerializer["foo"]

View File

@ -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, format_value,
get_pagination_html, schema_links
add_nested_class, add_query_param, as_string, break_long_headers,
format_value, get_pagination_html, schema_links
)
from rest_framework.test import APIRequestFactory
@ -234,6 +234,11 @@ 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 = '<br> ' + ', <br>'.join(header.split(','))
assert break_long_headers(header) == expected_header
class Issue1386Tests(TestCase):
"""

View File

@ -148,14 +148,14 @@ class TestMaxValueValidatorValidation(TestCase):
def test_max_value_validation_success(self):
obj = ValidationMaxValueValidatorModel.objects.create(number_value=100)
request = factory.patch(f'/{obj.pk}', {'number_value': 98}, format='json')
request = factory.patch('/{}'.format(obj.pk), {'number_value': 98}, format='json')
view = UpdateMaxValueValidationModel().as_view()
response = view(request, pk=obj.pk).render()
assert response.status_code == status.HTTP_200_OK
def test_max_value_validation_fail(self):
obj = ValidationMaxValueValidatorModel.objects.create(number_value=100)
request = factory.patch(f'/{obj.pk}', {'number_value': 101}, format='json')
request = factory.patch('/{}'.format(obj.pk), {'number_value': 101}, format='json')
view = UpdateMaxValueValidationModel().as_view()
response = view(request, pk=obj.pk).render()
assert response.content == b'{"number_value":["Ensure this value is less than or equal to 100."]}'

View File

@ -516,43 +516,6 @@ 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 = [<UniqueTogetherValidator(queryset=NullUniquenessTogetherModel.objects.all(), fields=('race_name', 'pos'))>]
""")
assert repr(serializer) == expected
class UniqueConstraintModel(models.Model):
race_name = models.CharField(max_length=100)
@ -720,24 +683,6 @@ 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`
# ----------------------------------

View File

@ -19,7 +19,7 @@ deps =
django42: Django>=4.2,<5.0
django50: Django>=5.0,<5.1
django51: Django>=5.1,<5.2
django52: Django>=5.2,<6.0
django52: Django>=5.2b1,<6.0
djangomain: https://github.com/django/django/archive/main.tar.gz
-rrequirements/requirements-testing.txt
-rrequirements/requirements-optionals.txt