mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
Add package/module docstrings
This commit is contained in:
parent
a7b2f50ffe
commit
a958a3e8bd
|
@ -1,14 +1,25 @@
|
||||||
# We expose a minimal "public" API directly from `schemas`. This covers the
|
"""
|
||||||
# basic use-cases:
|
rest_framework.schemas
|
||||||
#
|
|
||||||
# from rest_framework.schemas import (
|
schemas:
|
||||||
# AutoSchema,
|
__init__.py
|
||||||
# ManualSchema,
|
generators.py # Top-down schema generation
|
||||||
# get_schema_view,
|
inspectors.py # Per-endpoint view introspection
|
||||||
# SchemaGenerator,
|
utils.py # Shared helper functions
|
||||||
# )
|
views.py # Houses `SchemaView`, `APIView` subclass.
|
||||||
#
|
|
||||||
# Other access should target the submodules directly
|
We expose a minimal "public" API directly from `schemas`. This covers the
|
||||||
|
basic use-cases:
|
||||||
|
|
||||||
|
from rest_framework.schemas import (
|
||||||
|
AutoSchema,
|
||||||
|
ManualSchema,
|
||||||
|
get_schema_view,
|
||||||
|
SchemaGenerator,
|
||||||
|
)
|
||||||
|
|
||||||
|
Other access should target the submodules directly
|
||||||
|
"""
|
||||||
from .generators import SchemaGenerator
|
from .generators import SchemaGenerator
|
||||||
from .inspectors import AutoSchema, ManualSchema # noqa
|
from .inspectors import AutoSchema, ManualSchema # noqa
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
"""
|
||||||
|
generators.py # Top-down schema generation
|
||||||
|
|
||||||
|
See schemas.__init__.py for package overview.
|
||||||
|
"""
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from importlib import import_module
|
from importlib import import_module
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
"""
|
||||||
|
inspectors.py # Per-endpoint view introspection
|
||||||
|
|
||||||
|
See schemas.__init__.py for package overview.
|
||||||
|
"""
|
||||||
import re
|
import re
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
"""
|
||||||
|
utils.py # Shared helper functions
|
||||||
|
|
||||||
|
See schemas.__init__.py for package overview.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
def is_list_view(path, method, view):
|
def is_list_view(path, method, view):
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
"""
|
||||||
|
views.py # Houses `SchemaView`, `APIView` subclass.
|
||||||
|
|
||||||
|
See schemas.__init__.py for package overview.
|
||||||
|
"""
|
||||||
from rest_framework import exceptions, renderers
|
from rest_framework import exceptions, renderers
|
||||||
from rest_framework.response import Response
|
from rest_framework.response import Response
|
||||||
from rest_framework.settings import api_settings
|
from rest_framework.settings import api_settings
|
||||||
|
|
Loading…
Reference in New Issue
Block a user