Django REST framework 3.11
The 3.11 release adds support for Django 3.0.
Our supported Python versions are now: 3.5, 3.6, 3.7, and 3.8.
Our supported Django versions are now: 1.11, 2.0, 2.1, 2.2, and 3.0.
This release will be the last to support Python 3.5 or Django 1.11.
* OpenAPI Schema Generation Improvements
* Validator / Default Context
3.10.3
Include API version in OpenAPI schema generation, defaulting to empty string.
Add pagination properties to OpenAPI response schemas.
Add missing "description" property to OpenAPI response schemas.
Only include "required" for non-empty cases in OpenAPI schemas.
Fix response schemas for "DELETE" case in OpenAPI schemas.
Use an array type for list view response schemas.
Use consistent lowerInitialCamelCase style in OpenAPI operation IDs.
Fix minLength/maxLength/minItems/maxItems properties in OpenAPI schemas.
Only call FileField.url once in serialization, for improved performance.
Fix an edge case where throttling calcualtions could error after a configuration change.
3.10.2
Various OpenAPI schema fixes.
Ability to specify urlconf in include_docs_urls.
3.10.1
Don't include autocomplete fields on TokenAuth admin, since it forces constraints on custom user models & admin.
Require uritemplate for OpenAPI schema generation, but not coreapi.
3.10.0
Switch to OpenAPI schema generation.
Drop Python 2 support.
Add generateschema --generator_class CLI option
Updated PyYaml dependency for OpenAPI schema generation to pyyaml>=5.1
Resolve DeprecationWarning with markdown.
Use user.get_username in templates, in preference to user.username.
Fix for cursor pagination issue that could occur after object deletions.
Fix for nullable fields with source="*"
Always apply all throttle classes during throttling checks.
Updates to jQuery and Markdown dependencies.
Don't strict disallow redundant SerializerMethodField field name arguments.
Don't render extra actions in browable API if not authenticated.
Strip null characters from search parameters.
3.9.3
This is the last Django REST Framework release that will support Python 2. Be sure to upgrade to Python 3 before upgrading to Django REST Framework 3.10.
Adjusted the compat check for django-guardian to allow the last guardian version (v1.4.9) compatible with Python 2
3.9.2:
Routers: invalidate _urls cache on register()
Deferred schema renderer creation to avoid requiring pyyaml.
Added 'request_forms' block to base.html
Fixed SchemaView to reset renderer on exception.
Update Django Guardian dependency.
Ensured support for Django 2.2.
Made templates compatible with session-based CSRF.
Adjusted field validators to accept non-list iterables.
Added SearchFilter.get_search_fields() hook.
Fix DeprecationWarning when accessing collections.abc classes via collections
Allowed Q objects in limit_choices_to introspection.
Added lazy evaluation to composed permissions.
Add negation ~ operator to permissions composition
Avoided calling distinct on annotated fields in SearchFilter.
Introduced RemovedInDRF…Warning classes to simplify deprecations.
3.9.1
Resolve XSS issue in browsable API.
Upgrade Bootstrap to 3.4.0 to resolve XSS issue.
Resolve issues with composable permissions.
Respect limit_choices_to on foreign keys.
3.9.0:
Improvements to ViewSet extra actions
Fix action support for ViewSet suffixes
Allow action docs sections
Deprecate the Router.register base_name argument in favor of basename.
Deprecate the Router.get_default_base_name method in favor of Router.get_default_basename.
Change CharField to disallow null bytes. To revert to the old behavior, subclass CharField and remove ProhibitNullCharactersValidator from the validators. python class NullableCharField(serializers.CharField): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.validators = [v for v in self.validators if not isinstance(v, ProhibitNullCharactersValidator)]
Add OpenAPIRenderer and generate_schema management command.
Add OpenAPIRenderer by default, and add schema docs.
Allow permissions to be composed
Allow nullable BooleanField in Django 2.1
Add testing of Python 3.7 support
Test using Django 2.1 final release.
Added djangorestframework-datatables to third-party packages
Change ISO 8601 date format to exclude year/month
Update all pypi.python.org URLs to pypi.org
Ensure that html forms (multipart form data) respect optional fields
Allow hashing of ErrorDetail.
Correct schema parsing for JSONField
Render descriptions (from help_text) using safe
Removed input value from deault_error_message
Added min_value/max_value support in DurationField
Fixed instance being overwritten in pk-only optimization try/except block
Fixed AttributeError from items filter when value is None
Fixed Javascript e.indexOf is not a function error
Fix schemas for extra actions
Improved get_error_detail to use error_dict/error_list
Imprvied URLs in Admin renderer
Add "Community" section to docs, minor cleanup
Moved guardian imports out of compat
Deprecate the DjangoObjectPermissionsFilter class, moved to the djangorestframework-guardian package.
Drop Django 1.10 support
Only catch TypeError/ValueError for object lookups
Handle models without .objects manager in ModelSerializer.
Improve ModelSerializer.create() error message.
Fix CSRF cookie check failure when using session auth with django 1.11.6+
Updated JWT docs.
Fix autoescape not getting passed to urlize_quoted_links filter
Version 3.8.1:
Use old url_name behavior in route decorators
For list_route and detail_route maintain the old behavior of url_name,
basing it on the url_path instead of the function name.
Version 3.8:
Breaking Change: Alter read_only plus default behaviour.
Correct allow_null behaviour when required=False
Refactor dynamic route generation and improve viewset action introspectibility.
Fix formatting of the 3.7.4 release note
Docs: Update DRF Writable Nested Serializers references
Docs: Fixed typo in auth URLs example.
Improve composite field child errors
Disable HTML inputs for dict/list fields
Fix typo in HostNameVersioning doc
Use rsplit to get module and classname for imports
Formalize URLPatternsTestCase
Add exception translation test
Test staticfiles
Add drf-yasg to documentation and schema 3rd party packages
Remove unused compat._resolve_model()
Drop compat workaround for unsupported Python 3.2
Prefer iter(dict) over iter(dict.keys())
Pass python_requires argument to setuptools
Remove unused links from docs
Prefer https protocol for links in docs when available
Add HStoreField, postgres fields tests
Always fully qualify ValidationError in docs
Remove unreachable code from ManualSchema
Allowed customising API documentation code samples
Updated docs to use pip show
Load 'static' instead of 'staticfiles' in templates
Fixed a typo in fields docs
Refer to "NamespaceVersioning" instead of "NamespacedVersioning" in the documentation
ErrorDetail: add __eq__/__ne__ and __repr__
Replace background-attachment: fixed in docs
Make 404 & 403 responses consistent with exceptions.APIException output
Small fix to API documentation: schemas
Fix schema generation for PrimaryKeyRelatedField
Represent serializer DictField as an Object in schema
Added docs example reimplementing ObtainAuthToken
Add schema to the ObtainAuthToken view
Fix request formdata handling
Fix authtoken views imports
Update pytest, isort
Fixed active timezone handling for non ISO8601 datetimes.
Made TemplateHTMLRenderer render IntegerField inputs when value is 0.
Corrected endpoint in tutorial instructions
Add Django Rest Framework Role Filters to Third party packages
Use single copy of static assets. Update jQuery
Changes ternary conditionals to be PEP308 compliant
Added links to 'A Todo List API with React' and 'Blog API' tutorials
Fix comment typo in ModelSerializer
Add admin to installed apps to avoid test failures.
Fixed schema for UUIDField in SimpleMetadata.
Corrected docs on router include with namespaces.
Test using model objects for dotted source default
Allow traversing nullable related fields
Added: Tutorial: Django REST with React (Django 2.0)
Add LimitOffsetPagination.get_count to allow method override
Don't show hidden fields in metadata
Enable OrderingFilter to handle an empty tuple (or list) for the 'ordering' field.
Added generic 500 and 400 JSON error handlers.
3.7.7:
Fix typo to include *.mo locale files to packaging.
3.7.6:
Add missing *.ico icon files to packaging.
3.7.5
Add missing *.woff2 font files to packaging.
Add missing *.mo locale files to packaging.
3.7.4:
Schema: Extract method for manual_fields processing
Allows for easier customisation of manual_fields processing, for example to provide per-method manual fields. AutoSchema adds get_manual_fields, as the intended override point, and a utility method update_fields, to handle by-name field replacement from a list, which, in general, you are not expected to override.
Version 3.7.3:
Fix AppRegistryNotReady error importing contrib.auth views
Version 3.7.2:
Fixed Django 2.1 compatibility due to removal of django.contrib.auth.login()/logout() views.
Add missing import for TextLexer.
Adding examples and documentation for caching
Include date and date-time format for schema generation
Use triple backticks for markdown code blocks
Interactive docs - make bottom sidebar items sticky
Clarify pagination system check
Stop JSONBoundField mangling invalid JSON
Have JSONField render as textarea in Browsable API
Schema: Exclude OPTIONS/HEAD for ViewSet actions
Fix ordering for dotted sources
Fix: Fields with allow_null=True should imply a default serialization value
Ensure Location header is strictly a 'str', not subclass.
Add import to example in api-guide/parsers
Catch OverflowError for "out of range" datetimes
Add djangorestframework-rapidjson to third party packages
Increase test coverage for drf_create_token command
Add trove classifier for Python 3.6 support.
Add pip cache support to the Travis CI configuration
Rename [wheel] section to [bdist_wheel] as the former is legacy
Fix invalid escape sequence deprecation warnings
Add interactive docs error template
Add rounding parameter to DecimalField
Fix all BytesWarning caught during tests
Use dict and set literals instead of calls to dict() and set()
Change ImageField validation pattern, use validators from DjangoImageField
Fix processing unicode symbols in query_string by Python 2
Version 3.7.1
Fix Interactive documentation always uses false for boolean fields in requests
Improve compatibility with Django 2.0 alpha.
Improved handling of schema naming collisions
Added additional docs and tests around providing a default value for dotted source fields
Ignore any invalidly formed query parameters for OrderingFilter.
Improve memory footprint when reading large JSON requests.
Fix schema generation for pagination.
Fix exception when HTML_CUTOFF is set to None.
Fix browsable API not supporting multipart/form-data correctly.
Fixed test_hyperlinked_related_lookup_url_encoded_exists.
Make sure max_length is in FileField kwargs.
Fix list_route & detail_route with kwargs contains curly bracket in url_path
Add Django manage command to create a DRF user Token.
Ensure API documentation templates do not check for user authentication
Fix special case where OneToOneField is also primary key.
Added aria-label and a new region for accessibility purposes in base.html
Quote nested API parameters in api.js.
Set ViewSet args/kwargs/request before dispatch.
Added unicode support to SlugField.
Fix HiddenField appears in Raw Data form initial content.
Raise validation error on invalid timezone parsing.
Fix SearchFilter to-many behavior/performance.
Simplified chained comparisons and minor code fixes.
RemoteUserAuthentication, docs, and tests.
Revert "Cached the field's root and context property"
Fix introspection of list field in schema.
Fix interactive docs for multiple nested and extra methods.
Fix/remove undefined template var "schema"
The 3.5 release is the second in a planned series that is addressing schema generation, hypermedia support, API client libraries, and finally realtime support.
either because they themselves are not ready or because a
dependency isn't. This is annotated by
PYTHON_VERSIONS_INCOMPATIBLE= 33 # not yet ported as of x.y.z
or
PYTHON_VERSIONS_INCOMPATIBLE= 33 # py-foo, py-bar
respectively, please use the same style for other packages,
and check during updates.
Use versioned_dependencies.mk where applicable.
Use REPLACE_PYTHON instead of handcoded alternatives, where applicable.
Reorder Makefile sections into standard order, where applicable.
Remove PYTHON_VERSIONS_INCLUDE_3X lines since that will be default
with the next commit.
Whitespace cleanups and other nits corrected, where necessary.
Remove devel/py-ctypes (only needed by and supporting python24).
Remove PYTHON_VERSIONS_ACCEPTED and PYTHON_VERSIONS_INCOMPATIBLE
lines that just mirror defaults now.
Miscellaneous cleanup while editing all these files.
make it easy to build well-connected, self-describing RESTful Web APIs.
Features:
* Automatically provides an awesome Django admin style browse-able
self-documenting API.
* Clean, simple, views for Resources, using Django's new class based views.
* Support for ModelResources with out-of-the-box default implementations and
input validation.
* Pluggable parsers, renderers, authentication and permissions - Easy to
customise.
* Content type negotiation using HTTP Accept headers.
* Optional support for forms as input validation.
* Modular architecture - MixIn classes can be used without requiring the
Resource or ModelResource classes.