mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-10-22 11:44:35 +03:00
Deployed 9b3d03a
with MkDocs version: 1.6.0
This commit is contained in:
parent
8adc11522d
commit
86ac2157af
|
@ -873,7 +873,6 @@ REST_FRAMEWORK = {
|
|||
<h2 id="django-pyoidc"><a class="toclink" href="#django-pyoidc">django-pyoidc</a></h2>
|
||||
<p>[dango-pyoidc][django_pyoidc] adds support for OpenID Connect (OIDC) authentication. This allows you to delegate user management to an Identity Provider, which can be used to implement Single-Sign-On (SSO). It provides support for most uses-cases, such as customizing how token info are mapped to user models, using OIDC audiences for access control, etc.</p>
|
||||
<p>More information can be found in the <a href="https://django-pyoidc.readthedocs.io/latest/index.html">Documentation</a>.</p>
|
||||
<p>[django-pyoidc] : https://github.com/makinacorpus/django_pyoidc</p>
|
||||
|
||||
|
||||
</div> <!--/span-->
|
||||
|
|
|
@ -683,7 +683,7 @@ def delete_password(self, request, pk=None):
|
|||
'http://localhost:8000/api/users/1/set_password'
|
||||
</code></pre>
|
||||
<p>Alternatively, you can use the <code>url_name</code> attribute set by the <code>@action</code> decorator.</p>
|
||||
<pre><code class="language-pycon">>>> view.reverse_action(view.set_password.url_name, args=['1'])
|
||||
<pre><code class="language-pycon">>>> view.reverse_action(view.set_password.url_name, args=["1"])
|
||||
'http://localhost:8000/api/users/1/set_password'
|
||||
</code></pre>
|
||||
<p>The <code>url_name</code> argument for <code>.reverse_action()</code> should match the same argument to the <code>@action</code> decorator. Additionally, this method can be used to reverse the default actions, such as <code>list</code> and <code>create</code>.</p>
|
||||
|
|
|
@ -495,11 +495,9 @@ be extracted from the class docstring:</p>
|
|||
|
||||
permission_classes = [permissions.IsAuthenticatedOrReadOnly]
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
...
|
||||
def get(self, request, *args, **kwargs): ...
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
...
|
||||
def post(self, request, *args, **kwargs): ...
|
||||
</code></pre>
|
||||
<h2 id="validator-default-context"><a class="toclink" href="#validator-default-context">Validator / Default Context</a></h2>
|
||||
<p>In some circumstances a Validator class or a Default class may need to access the serializer field with which it is called, or the <code>.context</code> with which the serializer was instantiated. In particular:</p>
|
||||
|
@ -514,15 +512,13 @@ be extracted from the class docstring:</p>
|
|||
<pre><code class="language-python">class CustomValidator:
|
||||
requires_context = True
|
||||
|
||||
def __call__(self, value, serializer_field):
|
||||
...
|
||||
def __call__(self, value, serializer_field): ...
|
||||
</code></pre>
|
||||
<p>Default implementations will look like this:</p>
|
||||
<pre><code class="language-python">class CustomDefault:
|
||||
requires_context = True
|
||||
|
||||
def __call__(self, serializer_field):
|
||||
...
|
||||
def __call__(self, serializer_field): ...
|
||||
</code></pre>
|
||||
<hr />
|
||||
<h2 id="funding"><a class="toclink" href="#funding">Funding</a></h2>
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user