Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: Discussions
url: https://github.com/encode/django-rest-framework/discussions
url: https://github.com/django-commons/django-rest-framework/discussions
about: >
The "Discussions" forum is where you want to start. 💖
Please note that at this point in its lifespan, we consider Django REST framework to be feature-complete.
101 changes: 101 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Publish Python 🐍 distribution 📦 to PyPI

on:
push:
tags:
# Order matters, the last rule that applies to a tag
# is the one that takes effect:
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-including-and-excluding-branches-and-tags
- '*'
# There should be no dev tags created, but to be safe,
# let's not publish them.
- '!*.dev*'

env:
PYPI_URL: https://pypi.org/p/djangorestframework

jobs:

build:
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install pypa/build
run:
python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: ${{ env.PYPI_URL }}
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v5
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.13

github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Download all the dists
uses: actions/download-artifact@v5
with:
name: python-package-distributions
path: dist/
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
103 changes: 103 additions & 0 deletions .github/workflows/test_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Test Python 🐍 distribution 📦 to TestPyPI

on:
workflow_dispatch:
inputs:
iteration:
description: 'A unique iteration for the run. The tag will be suffixed with .devyyyymmdd<iteration>'
type: string
required: true
default: "0"
schedule:
# Run the second day of every month.
- cron: "12 3 2 * *"
push:
tags:
- '*'

env:
PYPI_TEST_URL: https://test.pypi.org/p/djangorestframework
# The environment key that overrides the version number
DEV_VERSION_ENV_KEY: BEST_PRACTICES_VERSION_DEV

jobs:
create-dev-version:
# Generate the dev version suffix based on the current date.
# Tag name:
# <version>.dev<yyyymmdd><iteration>
name: Create dev version string
runs-on: ubuntu-latest
outputs:
dev_version: ${{ steps.output-dev-version.outputs.dev_version }}
steps:
- name: Set date suffix
id: set-date
run: echo "suffix=dev$(date +%Y%m%d)" >> $GITHUB_ENV
- name: Determine Iteration Value
id: set-iteration
# If the action is running on a schedule, default iteration to 0
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "iteration=${{ github.event.inputs.iteration }}" >> $GITHUB_ENV
else
echo "iteration=0" >> $GITHUB_ENV
fi
- name: Output dev version
id: output-dev-version
# Don't output a dev version if the push was for a tag.
run: |
if [[ "${{ startsWith(github.ref, 'refs/tags') }}" == "true" ]]; then
echo "dev_version=" >> "$GITHUB_OUTPUT"
else
echo "dev_version=${{ env.suffix }}${{ env.iteration }}" >> "$GITHUB_OUTPUT"
fi

build:
name: Build distribution 📦
needs:
- create-dev-version
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
run:
python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
env:
DEV_VERSION: ${{needs.create-dev-version.outputs.dev_version}}
run: ${{ env.DEV_VERSION_ENV_KEY }}="${{ env.DEV_VERSION }}" python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build
runs-on: ubuntu-latest

environment:
name: testpypi
url: ${{ env.PYPI_TEST_URL }}

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1.12
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
3 changes: 3 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Code of Conduct

Django REST Framework utilizes the [Django Commons Code of Conduct](https://github.com/django-commons/membership/blob/main/CODE_OF_CONDUCT.md).
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +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 open a pull request if you've been recommended to do so **after discussion**.
Apart from minor documentation changes, the [GitHub discussions page](https://github.com/django-commons/django-rest-framework/discussions) should generally be your starting point. Please only open a 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.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ For questions and support, use the [REST framework discussion group][group], or

Please see the [security policy][security-policy].

[build-status-image]: https://github.com/encode/django-rest-framework/actions/workflows/main.yml/badge.svg
[build-status]: https://github.com/encode/django-rest-framework/actions/workflows/main.yml
[build-status-image]: https://github.com/django-commons/django-rest-framework/actions/workflows/main.yml/badge.svg
[build-status]: https://github.com/django-commons/django-rest-framework/actions/workflows/main.yml
[coverage-status-image]: https://img.shields.io/codecov/c/github/encode/django-rest-framework/main.svg
[codecov]: https://codecov.io/github/encode/django-rest-framework?branch=main
[pypi-version]: https://img.shields.io/pypi/v/djangorestframework.svg
Expand Down Expand Up @@ -223,4 +223,4 @@ Please see the [security policy][security-policy].
[image]: https://www.django-rest-framework.org/img/quickstart.png

[docs]: https://www.django-rest-framework.org/
[security-policy]: https://github.com/encode/django-rest-framework/security/policy
[security-policy]: https://github.com/django-commons/django-rest-framework/security/policy
2 changes: 1 addition & 1 deletion docs/api-guide/throttling.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,5 +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
[gh5181]: https://github.com/django-commons/django-rest-framework/issues/5181
[race]: https://en.wikipedia.org/wiki/Race_condition#Data_race
4 changes: 2 additions & 2 deletions docs/community/3.0-announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -957,9 +957,9 @@ The 3.1 release is planned to address improvements in the following components:

The 3.2 release is planned to introduce an alternative admin-style interface to the browsable API.

You can follow development on the GitHub site, where we use [milestones to indicate planning timescales](https://github.com/encode/django-rest-framework/milestones).
You can follow development on the GitHub site, where we use [milestones to indicate planning timescales](https://github.com/django-commons/django-rest-framework/milestones).

[kickstarter]: https://www.kickstarter.com/projects/tomchristie/django-rest-framework-3
[sponsors]: https://www.django-rest-framework.org/community/kickstarter-announcement/#sponsors
[mixins.py]: https://github.com/encode/django-rest-framework/blob/main/rest_framework/mixins.py
[mixins.py]: https://github.com/django-commons/django-rest-framework/blob/main/rest_framework/mixins.py
[django-localization]: https://docs.djangoproject.com/en/stable/topics/i18n/translation/#localization-how-to-create-language-files
2 changes: 1 addition & 1 deletion docs/community/3.10-announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,6 @@ continued development by **[signing up for a paid plan][funding]**.

*Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [ESG](https://software.esg-usa.com/), [Rollbar](https://rollbar.com/?utm_source=django&utm_medium=sponsorship&utm_campaign=freetrial), [Cadre](https://cadre.com), [Kloudless](https://hubs.ly/H0f30Lf0), and [Lights On Software](https://lightsonsoftware.com).*

[legacy-core-api-docs]:https://github.com/encode/django-rest-framework/blob/3.14.0/docs/coreapi/index.md
[legacy-core-api-docs]:https://github.com/django-commons/django-rest-framework/blob/3.14.0/docs/coreapi/index.md
[sponsors]: https://fund.django-rest-framework.org/topics/funding/#our-sponsors
[funding]: funding.md
2 changes: 1 addition & 1 deletion docs/community/3.13-announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ aliases = serializers.ListField(child=serializers.CharField())

This change has been made because using positional arguments here *does not* result in the expected behaviour.

See Pull Request [#7632](https://github.com/encode/django-rest-framework/pull/7632) for more details.
See Pull Request [#7632](https://github.com/django-commons/django-rest-framework/pull/7632) for more details.
6 changes: 3 additions & 3 deletions docs/community/3.14-announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ Calling `serializer_instance.is_valid(True)` is no longer acceptable syntax.
If you'd like to use the `raise_exception` argument, you must use it as a
keyword argument.

See Pull Request [#7952](https://github.com/encode/django-rest-framework/pull/7952) for more details.
See Pull Request [#7952](https://github.com/django-commons/django-rest-framework/pull/7952) for more details.

## `ManyRelatedField` supports returning the default when the source attribute doesn't exist.

Previously, if you used a serializer field with `many=True` with a dot notated source field
that didn't exist, it would raise an `AttributeError`. Now it will return the default or be
skipped depending on the other arguments.

See Pull Request [#7574](https://github.com/encode/django-rest-framework/pull/7574) for more details.
See Pull Request [#7574](https://github.com/django-commons/django-rest-framework/pull/7574) for more details.


## Make Open API `get_reference` public.
Expand All @@ -55,7 +55,7 @@ When OR-ing two permissions, the request has to pass either class's `has_permiss

Previously, both class's `has_permission()` was ignored when OR-ing two permissions together.

See Pull Request [#7522](https://github.com/encode/django-rest-framework/pull/7522) for more details.
See Pull Request [#7522](https://github.com/django-commons/django-rest-framework/pull/7522) for more details.

## Minor fixes and improvements

Expand Down
2 changes: 1 addition & 1 deletion docs/community/3.2-announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This interface is intended to act as a more user-friendly interface to the API.

We've also fixed a huge number of issues, and made numerous cleanups and improvements.

Over the course of the 3.1.x series we've [resolved nearly 600 tickets](https://github.com/encode/django-rest-framework/issues?utf8=%E2%9C%93&q=closed%3A%3E2015-03-05) on our GitHub issue tracker. This means we're currently running at a rate of **closing around 100 issues or pull requests per month**.
Over the course of the 3.1.x series we've [resolved nearly 600 tickets](https://github.com/django-commons/django-rest-framework/issues?utf8=%E2%9C%93&q=closed%3A%3E2015-03-05) on our GitHub issue tracker. This means we're currently running at a rate of **closing around 100 issues or pull requests per month**.

None of this would have been possible without the support of our wonderful Kickstarter backers. If you're looking for a job in Django development we'd strongly recommend taking [a look through our sponsors](https://www.django-rest-framework.org/community/kickstarter-announcement/#sponsors) and finding out who's hiring.

Expand Down
12 changes: 6 additions & 6 deletions docs/community/3.4-announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,16 @@ The full set of itemized release notes [are available here][release-notes].
[moss]: mozilla-grant.md
[funding]: funding.md
[core-api]: https://www.coreapi.org/
[command-line-client]: https://github.com/encode/django-rest-framework/blob/3.4.7/docs/topics/api-clients.md#command-line-client
[client-library]: https://github.com/encode/django-rest-framework/blob/3.4.7/docs/topics/api-clients.md#python-client-library
[command-line-client]: https://github.com/django-commons/django-rest-framework/blob/3.4.7/docs/topics/api-clients.md#command-line-client
[client-library]: https://github.com/django-commons/django-rest-framework/blob/3.4.7/docs/topics/api-clients.md#python-client-library
[core-json]: https://www.coreapi.org/specification/encoding/#core-json-encoding
[swagger]: https://openapis.org/specification
[hyperschema]: https://json-schema.org/latest/json-schema-hypermedia.html
[api-blueprint]: https://apiblueprint.org/
[tut-7]: https://github.com/encode/django-rest-framework/blob/3.4.7/docs/tutorial/7-schemas-and-client-libraries.md
[tut-7]: https://github.com/django-commons/django-rest-framework/blob/3.4.7/docs/tutorial/7-schemas-and-client-libraries.md
[schema-generation]: ../api-guide/schemas.md
[api-clients]: https://github.com/encode/django-rest-framework/blob/3.14.0/docs/topics/api-clients.md
[milestone]: https://github.com/encode/django-rest-framework/milestone/35
[api-clients]: https://github.com/django-commons/django-rest-framework/blob/3.14.0/docs/topics/api-clients.md
[milestone]: https://github.com/django-commons/django-rest-framework/milestone/35
[release-notes]: ./release-notes.md#34x-series
[metadata]: ../api-guide/metadata.md#custom-metadata-classes
[gh3751]: https://github.com/encode/django-rest-framework/issues/3751
[gh3751]: https://github.com/django-commons/django-rest-framework/issues/3751
4 changes: 2 additions & 2 deletions docs/community/3.6-announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,5 +195,5 @@ on realtime support, for the 3.7 release.
[sponsors]: https://fund.django-rest-framework.org/topics/funding/#our-sponsors
[funding]: funding.md
[api-docs]: ../topics/documenting-your-api.md
[js-docs]: https://github.com/encode/django-rest-framework/blob/3.14.0/docs/topics/api-clients.md#javascript-client-library
[py-docs]: https://github.com/encode/django-rest-framework/blob/3.14.0/docs/topics/api-clients.md#python-client-library
[js-docs]: https://github.com/django-commons/django-rest-framework/blob/3.14.0/docs/topics/api-clients.md#javascript-client-library
[py-docs]: https://github.com/django-commons/django-rest-framework/blob/3.14.0/docs/topics/api-clients.md#python-client-library
2 changes: 1 addition & 1 deletion docs/community/3.7-announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ REST framework 3.7 supports Django versions 1.10, 1.11, and 2.0 alpha.

There are a large number of minor fixes and improvements in this release. See the [release notes](release-notes.md) page for a complete listing.

The number of [open tickets against the project](https://github.com/encode/django-rest-framework/issues) currently at its lowest number in quite some time, and we're continuing to focus on reducing these to a manageable amount.
The number of [open tickets against the project](https://github.com/django-commons/django-rest-framework/issues) currently at its lowest number in quite some time, and we're continuing to focus on reducing these to a manageable amount.

---

Expand Down
4 changes: 2 additions & 2 deletions docs/community/3.8-announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ We're currently working towards moving to using [OpenAPI][openapi] as our defaul
We're doing some consolidation in order to make this happen. It's planned that 3.9 will drop the `coreapi` and `coreschema` libraries, and instead use `apistar` for the API documentation generation, schema generation, and API client libraries.

[funding]: funding.md
[gh5886]: https://github.com/encode/django-rest-framework/issues/5886
[gh5705]: https://github.com/encode/django-rest-framework/issues/5705
[gh5886]: https://github.com/django-commons/django-rest-framework/issues/5886
[gh5705]: https://github.com/django-commons/django-rest-framework/issues/5705
[openapi]: https://www.openapis.org/
6 changes: 3 additions & 3 deletions docs/community/3.9-announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ package. Please use this instead.

See [#5990][gh5990].

[gh5990]: https://github.com/encode/django-rest-framework/pull/5990
[gh5990]: https://github.com/django-commons/django-rest-framework/pull/5990

`base_name` and `get_default_base_name()` are pending deprecation. They will be deprecated in 3.10 and removed entirely in 3.11.

Expand Down Expand Up @@ -204,7 +204,7 @@ ASGI.


[funding]: funding.md
[gh5886]: https://github.com/encode/django-rest-framework/issues/5886
[gh5705]: https://github.com/encode/django-rest-framework/issues/5705
[gh5886]: https://github.com/django-commons/django-rest-framework/issues/5886
[gh5705]: https://github.com/django-commons/django-rest-framework/issues/5705
[openapi]: https://www.openapis.org/
[sponsors]: https://fund.django-rest-framework.org/topics/funding/#our-sponsors
Loading